Skip to content

Commit 7d982df

Browse files
committed
Update comments in action
1 parent 71ed805 commit 7d982df

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

.github/workflows/new-linter-checklist.yaml

+1-4
Original file line numberDiff line numberDiff line change
@@ -18,16 +18,13 @@ jobs:
1818
- uses: actions/checkout@v4
1919
- name: Add checklist
2020
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.
2422
comment_exist=$(gh pr view "$NUMBER" \
2523
--json comments \
2624
--jq '.comments[].author | select(.login=="github-actions") | .login' \
2725
| wc -l)
2826
[ "$comment_exist" -gt 0 ] && edit_last="--edit-last"
2927
30-
# Comment on the PR with the checklist.
3128
gh pr comment "$NUMBER" --body "$(cat .github/new-linter-checklist.md)" $edit_last
3229
env:
3330
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)