Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,11 @@ findInCwdOrParent() {
configureGit() {
# This should be the default but it's important that it's set correctly
git config --global core.quotePath true

if [[ "${ADD_SAFE_DIRECTORY:-false}" = [Tt]rue ]]; then
# This prevents errors due to different file ownership from outside the container
git config --global --add safe.directory $PWD
fi
}

getEventByPath() {
Expand Down Expand Up @@ -121,7 +126,7 @@ getChangedFiles() {
else
echo "File \`$line\` was moved or deleted."
fi
done < <(git diff --name-only "${HEAD_COMMIT}..${BASE_COMMIT}")
done < <(git diff --name-only --relative "${HEAD_COMMIT}..${BASE_COMMIT}" -- .)
elif $have_last && $have_commits ; then
echo "Missing starting commit, new repo?"
# We know that core.quotePath is true
Expand All @@ -145,6 +150,11 @@ getChangedFiles() {
echo "eclint version: $(eclint --version)"
configureGit

if [ -n "${REPOSITORY_PATH+set}" ]; then
echo "Changing directory to $REPOSITORY_PATH"
cd "$REPOSITORY_PATH"
fi

echo "Looking for .editorconfig file in current directory or parents..."
findInCwdOrParent .editorconfig

Expand Down