Skip to content

Commit 6a04fac

Browse files
authored
fix: Adds step to close existing PRs. (#227)
1 parent 964c742 commit 6a04fac

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

.github/workflows/release.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,16 @@ jobs:
6464
- name: Deploy to Firebase Hosting
6565
run: firebase deploy --only hosting
6666

67+
- name: Close Existing PRs (temp-build-branch to main)
68+
run: |
69+
EXISTING_PR=$(gh pr list --base main --head temp-build-branch --state open --json number -q '.[].number')
70+
if [[ -n "$EXISTING_PR" ]]; then
71+
echo "Found existing open PR(s) for temp-build-branch to main: $EXISTING_PR"
72+
gh pr close "$EXISTING_PR"
73+
fi
74+
env:
75+
GH_TOKEN: ${{ secrets.GH_MERGE_TOKEN }}
76+
6777
- name: Create temporary branch
6878
run: git checkout -b temp-build-branch
6979

0 commit comments

Comments
 (0)