Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 2dca782

Browse files
committed
Fix change note check to accept changes to itself
The file is not removed from the triggers, as we still want to check that the workflow file itself is correct.
1 parent e88cc31 commit 2dca782

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

.github/workflows/check-change-note.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,5 +24,7 @@ jobs:
2424
env:
2525
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2626
run: |
27-
gh api 'repos/${{github.repository}}/pulls/${{github.event.number}}/files' --paginate --jq 'any(.[].filename ; test("/change-notes/.*[.]md$"))' |
27+
gh api 'repos/${{github.repository}}/pulls/${{github.event.number}}/files' --paginate --jq \
28+
'any(.[].filename ; test("/change-notes/.*[.]md$")) or
29+
all(.[].filename ; .==".github/workflows/check-change-note.yml")' |
2830
grep true -c

0 commit comments

Comments
 (0)