Skip to content

Fixed syntax for workflow #2

Fixed syntax for workflow

Fixed syntax for workflow #2

name: Vault Audit Thread Resolved

Check failure on line 1 in .github/workflows/vault-audit-thread-resolved.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/vault-audit-thread-resolved.yml

Invalid workflow file

(Line: 8, Col: 3): Unexpected value 'pull_request_review_thread'
# Fires when any PR review thread is resolved. Calls the cre-docs override-check
# reusable workflow to re-evaluate whether all blocking vault audit findings are resolved
# and updates the commit status accordingly.
on:
pull_request_review_thread:
types: [resolved]
jobs:
check-auth:
runs-on: ubuntu-latest
permissions:
pull-requests: read
outputs:
authorized: ${{ steps.auth.outputs.authorized }}
steps:
- name: Check resolver authorization
id: auth
env:
GH_TOKEN: ${{ github.token }}
run: |
RESOLVER="${{ github.event.sender.login }}"
PERMISSION=$(gh api /repos/${{ github.repository }}/collaborators/$RESOLVER/permission \
--jq '.permission' 2>/dev/null || echo "none")
if [[ "$PERMISSION" == "write" || "$PERMISSION" == "admin" ]]; then
echo "authorized=true" >> $GITHUB_OUTPUT
else
echo "authorized=false" >> $GITHUB_OUTPUT
fi
# Reusable workflows must be called as a top-level job, not a step
run-override-check:
needs: check-auth
if: needs.check-auth.outputs.authorized == 'true'
uses: smartcontractkit/cre-docs/.github/workflows/vault-audit-override-check.yml@main
permissions:
statuses: write
pull-requests: read
with:
pr_number: ${{ github.event.pull_request.number }}
head_sha: ${{ github.event.pull_request.head.sha }}
chainlink_repo: ${{ github.repository }}
secrets:
CHAINLINK_TOKEN: ${{ github.token }}