Compare commits
1 Commits
master
...
github-act
| Author | SHA1 | Date |
|---|---|---|
|
|
0c062910ac |
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in New Issue