Skip to content

Commit a27fd97

Browse files
committed
Add safeguard against existing PR already created
1 parent b2a135c commit a27fd97

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

.github/workflows/pre_commit_update_workflow.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,10 @@ jobs:
5959
if: ${{ env.UP_TO_DATE == 'false' }}
6060
run: |
6161
cd update-pre-commit-deps
62+
# Close any existing PR and replace with most up-to-date changes
63+
gh pr close update-pre-commit-deps \
64+
--comment "This PR was closed to create a new, updated PR." || \
65+
echo "No existing PR to close and replace."
6266
gh pr create \
6367
--title "Update pre-commit and its dependencies" \
6468
--body "This PR was auto-generated to update pre-commit and its dependencies." \

0 commit comments

Comments
 (0)