Skip to content

Commit

Permalink
MINOR: Only look for the CI workflow pending approval (apache#18200)
Browse files Browse the repository at this point in the history
Reviewers: Chia-Ping Tsai <[email protected]>
  • Loading branch information
mumrah authored Dec 16, 2024
1 parent bac8928 commit 9b55881
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .github/workflows/pr-labeled.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,11 @@ jobs:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PR_NUMBER: ${{ github.event.number }}
SHA: ${{ github.event.pull_request.head.sha }}
# Find the CI workflow run that is pending approval and approve it
run: |
set +e
echo "Found 'ci-approved' label on PR #$PR_NUMBER."
RUN_ID=$(gh run list -L 1 -c $SHA -s action_required --json databaseId --jq '.[].databaseId')
RUN_ID=$(gh run list -L 1 -c $SHA -s action_required -w CI --json databaseId --jq '.[].databaseId')
if [ -z "$RUN_ID" ]; then
echo "No workflow run found for SHA $SHA";
exit 0;
Expand Down

0 comments on commit 9b55881

Please sign in to comment.