File tree Expand file tree Collapse file tree 1 file changed +1
-4
lines changed Expand file tree Collapse file tree 1 file changed +1
-4
lines changed Original file line number Diff line number Diff line change @@ -18,16 +18,13 @@ jobs:
18
18
- uses : actions/checkout@v4
19
19
- name : Add checklist
20
20
run : |
21
- # This is just safety to not spam with new comments if the tag is
22
- # removed and added back multiple times maliciously. It will reset the
23
- # checklist but the previous values will be in the edit history.
21
+ # Avoid adding multiple comments for the same PR.
24
22
comment_exist=$(gh pr view "$NUMBER" \
25
23
--json comments \
26
24
--jq '.comments[].author | select(.login=="github-actions") | .login' \
27
25
| wc -l)
28
26
[ "$comment_exist" -gt 0 ] && edit_last="--edit-last"
29
27
30
- # Comment on the PR with the checklist.
31
28
gh pr comment "$NUMBER" --body "$(cat .github/new-linter-checklist.md)" $edit_last
32
29
env :
33
30
GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
You can’t perform that action at this time.
0 commit comments