Skip to content

Commit

Permalink
Adding id
Browse files Browse the repository at this point in the history
  • Loading branch information
aeisenberg committed Jul 18, 2024
1 parent 718c424 commit 51a3a3c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion .github/workflows/autofix-reminder.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,16 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Check existing labels
id: label_check
shell: bash
run: |
gh api "repos/${GITHUB_REPOSITORY}/issues/${PR_NUMBER}/labels" | jq -r '.[].name' > labels.txt
if grep -q -x -e "${REQUIRES_AUTOFIX_LABEL}" labels.txt || grep -q -x -e "${DOES_NOT_REQUIRE_AUTOFIX_LABEL}" labels.txt; then
echo "should_continue=false" >> $GITHUB_OUTPUT
echo "Stopping workflow due to label presence."
echo "should_continue=false" >> $GITHUB_OUTPUT
else
echo "Add $REQUIRES_AUTOFIX_LABEL label."
echo "should_continue=true" >> $GITHUB_OUTPUT
fi
Expand All @@ -48,4 +50,5 @@ jobs:

- name: Comment on PR
if: steps.label_check.outputs.should_continue == 'true'
id: label_check
run: gh api "repos/${GITHUB_REPOSITORY}/issues/${PR_NUMBER}/comments" -X POST --field body="This pull request updates `.ql`, `.qll`, or `.qhelp` files, Please validate that autofixes generated based on these changes are valid. See [the documentation](https://github.com/github/codeql-team/blob/main/docs/best-practices/validating-autofix-for-query-changes.md) (internal access required). If autofix validation is not required, please add the label '${DOES_NOT_REQUIRE_AUTOFIX_LABEL}' to this pull request."

0 comments on commit 51a3a3c

Please sign in to comment.