We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents be38693 + 82cfb49 commit 32c2546Copy full SHA for 32c2546
.github/workflows/release-pr-checker.yaml
@@ -77,6 +77,13 @@ jobs:
77
- uses: actions/checkout@v4
78
with:
79
sparse-checkout: .
80
- - run:
81
- # There are branch protection rules in place, to override them, we need to pass --admin option
82
- gh pr merge $PR_NUMBER --merge --delete-branch --admin
+ - run: |
+ # Check if PR is open before attempting to merge
+ PR_STATE=$(gh pr view $PR_NUMBER --json state -q .state)
83
+ if [ "$PR_STATE" = "OPEN" ]; then
84
+ # There are branch protection rules in place, to override them, we need to pass --admin option
85
+ gh pr merge $PR_NUMBER --merge --delete-branch --admin
86
+ else
87
+ echo "PR #$PR_NUMBER is not open (current state: $PR_STATE). Skipping merge."
88
+ exit 1
89
+ fi
0 commit comments