Skip to content

Commit

Permalink
pass check if there is no PR number. (#1337)
Browse files Browse the repository at this point in the history
  • Loading branch information
n-g authored Oct 15, 2024
1 parent f82e1bc commit 4dc9578
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/require-reviewers.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,11 @@ jobs:
jq -r ".pull_request.number" "$GITHUB_EVENT_PATH" | tee number.json
ISSUE_NUMBER=$(cat number.json | tr -d '\n')
if [ "$ISSUE_NUMBER" == "null" ]; then
echo "Not a PR - do not reqire reviewers"
exit 0
fi
curl \
--url https://api.github.com/repos/${{ github.repository }}/pulls/$ISSUE_NUMBER/reviews \
--header 'authorization: Bearer ${{ secrets.GITHUB_TOKEN }}' \
Expand Down

0 comments on commit 4dc9578

Please sign in to comment.