File tree 1 file changed +4
-1
lines changed
1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change 46
46
REMOVED_LABEL=${{ github.event.label.name }}
47
47
if [ "$REMOVED_LABEL" == "sl-require-admin-action" ]; then
48
48
echo "The sl-require-admin-action label cannot be removed. Failing the job."
49
- gh pr comment $PR_NUMBER --repo ${{ github.repository }} --body "The sl-require-admin-action label cannot be removed once it has been added."
49
+ COMMENTS=$(gh pr view $PR_NUMBER --repo ${{ github.repository }} --json comments --jq '.comments[].body')
50
+ if ! echo "$COMMENTS" | grep -q "The sl-require-admin-action label cannot be removed once it has been added."; then
51
+ gh pr comment $PR_NUMBER --repo ${{ github.repository }} --body "The sl-require-admin-action label cannot be removed once it has been added."
52
+ fi
50
53
exit 1
51
54
else
52
55
echo "A different label was removed. Passing the job."
You can’t perform that action at this time.
0 commit comments