forked from orange-cloudfoundry/k3s-boshrelease
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
new rename-previously-merged-renovate-PRs-that-block-automerge.bash
- Loading branch information
1 parent
0b36070
commit 84847ee
Showing
1 changed file
with
22 additions
and
0 deletions.
There are no files selected for viewing
22 changes: 22 additions & 0 deletions
22
rename-previously-merged-renovate-PRs-that-block-automerge.bash
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#!/bin/bash | ||
|
||
set -x | ||
set -f # disable file name expansion, especially in for loops | ||
|
||
LIMIT="300" | ||
|
||
echo "Renaming renovate PRs that were merged before the branch was reset and forced pushed" | ||
PRS=$(gh pr list \ | ||
--limit ${LIMIT} \ | ||
--app "renovate" \ | ||
--repo orange-cloudfoundry/k3s-packages-boshrelease \ | ||
--search "is:merged" \ | ||
--json number \ | ||
| jq -r '.[].number' ) | ||
echo "first PRs (maxed at ${LIMIT}} to rename are: ${PRS}" | ||
for p in $PRS; do | ||
gh --repo orange-cloudfoundry/k3s-packages-boshrelease pr edit $p --title "merged renovate PR $p onto a branch forced pushed. renamed to not block new automerges" | ||
gh --repo orange-cloudfoundry/k3s-packages-boshrelease pr comment $p --body "through rename-previously-merged-renovate-PRs-that-block-automerge.bash: this PR was likely blocking automerge, see https://github.com/orange-cloudfoundry/k3s-packages-boshrelease/pull/52#issuecomment-1876989204 for diagnostics steps" | ||
done; | ||
|
||
echo "please rerun this command to check not more PR beyond $LIMIT is left to process" |