Skip to content

Commit

Permalink
Issue checkstyle#15412: New workflow shall run only active PRs
Browse files Browse the repository at this point in the history
  • Loading branch information
piyush kumar sadangi authored and romani committed Aug 2, 2024
1 parent d751f18 commit 6a3ab01
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions .github/workflows/regression-report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,19 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v4

- name: Check PR status
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PR_URL: ${{ github.event.issue.pull_request.url }}
run: |
PR_STATE=$(curl --fail-with-body -s -H "Authorization: token $GITHUB_TOKEN" \
-H "Accept: application/vnd.github.v3+json" \
"$PR_URL" | jq -r .state)
if [ "$PR_STATE" != "open" ]; then
echo "PR is not active"
exit 1
fi
- name: Parse comment
id: parse
env:
Expand Down

0 comments on commit 6a3ab01

Please sign in to comment.