Compare commits

...

1 Commits

Author SHA1 Message Date
Dan Stillman 0c062910ac WIP 2021-01-30 08:56:26 -05:00
2 changed files with 16 additions and 9 deletions

View File

@ -36,6 +36,12 @@ get_translators_to_check() {
TRANSLATORS_TO_CHECK=""
# Push to master
if [ "${GITHUB_REF:-}" = "refs/heads/master" ]; then
local before_commit=$(jq -r '.before' $(echo $GITHUB_EVENT_PATH))
TRANSLATORS_TO_CHECK=$(git diff $before_commit --name-only | grep -e "^[^/]*.js$")
# Pull request
else
# Gets parent commits. Either one or two hashes
local parent_commits=($(git show --no-patch --format="%P" HEAD))
# Size of $parent_commits array
@ -45,4 +51,5 @@ get_translators_to_check() {
else
TRANSLATORS_TO_CHECK=$(git diff $(git rev-list "$(git rev-list --first-parent ^origin/master HEAD | tail -n1)^^!") --name-only | grep -e "^[^/]*.js$")
fi
fi
}

View File

@ -40,8 +40,8 @@ jobs:
- name: Install node packages
run: npm ci
#- name: Debugging with tmate
# uses: mxschmitt/action-tmate@v3.1
- name: Debugging with tmate
uses: mxschmitt/action-tmate@v3.1
- name: Lint
run: ./lint.sh