Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
0xDEnYO committed Sep 5, 2024
1 parent 187dec7 commit 7aa640b
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/verifyAudit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ jobs:
echo "now checking if the the auditor has approved this PR"
# Fetch all reviews for the specified pull request
REVIEWS=$(gh pr reviews $PR_NUMBER --json author,state --jq '.[] | {author: .author.login, state: .state}')
REVIEWS=$(gh pr review $PR_NUMBER --json author,state --jq '.[] | {author: .author.login, state: .state}')
# Check if the PR was approved by the target user
Expand All @@ -323,9 +323,10 @@ jobs:
done <<< "$PROTECTED_CONTRACTS"
- name: Assign label "AuditCompleted" if all checks passed
if: ${{ env.CONTINUE == 'true' }}
uses: actions-ecosystem/action-add-labels@v1
id: assign_label
with:
github_token: ${{ secrets.GIT_ACTIONS_BOT_PAT_CLASSIC }} # we use the token of the git action user so the label protection check will pass
labels: ${{ env.CONTINUE == 'true' && 'AuditCompleted' || 'AuditNotRequired' }} # if the action made it until here and CONTINUE was true then all checks passed. It CONTINUE was false then no audit is required
number: ${{ github.event.pull_request.number }}
labels: 'AuditCompleted'
number: ${{ env.PR_NUMBER }}

0 comments on commit 7aa640b

Please sign in to comment.