Fix PR update-in-place behavior and title prefix for bump-versions-pr.sh - #15
Merged
Conversation
Matches the org's shared Renovate commitMessagePrefix convention - some consuming repos' PR checks key off that prefix. Applied it retroactively to the three already-open PRs (rundeck#10470, rundeckpro#4960, ua-runner#203) via gh pr edit.
The branch name was date-stamped (bump-plugin-versions-YYYYMMDD), so re-running same-day would hit an unhandled 'gh pr create' error on an already-existing PR (and abort before restoring the original branch), and re-running on a later day would open a second, unrelated PR alongside whatever was still open from before. Now each repo gets one stable branch (bump-plugin-versions, no date). Every run checks for an already-open PR against it first, rebuilds the branch fresh off current main, force-pushes, and either edits the existing PR (title + body) or creates a new one if the last one was merged/closed. Matches how Renovate's own PRs behave. Left the three already-open PRs (rundeck#10470, rundeckpro#4960, ua-runner#203) on their old dated branch names as-is rather than migrating them - not worth the risk for PRs already ready to merge. Future runs use the new stable-branch behavior once those land.
Contributor
There was a problem hiding this comment.
Pull request overview
This PR applies two follow-up correctness fixes to the skills/rundeck-plugin-versions/scripts/bump-versions-pr.sh “proactive PR sweep” so repeated runs update a single PR in-place (Renovate-style) and ensure PR/commit titles include the required [RUN-0000] prefix that some downstream checks depend on.
Changes:
- Switch Workflow C to use a stable per-repo branch name (
bump-plugin-versions) and force-push updates so reruns update the same open PR viagh pr edit. - Prefix generated commit messages and PR titles with
[RUN-0000]. - Document the new stable-branch/update-in-place behavior in the skill docs.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| skills/rundeck-plugin-versions/SKILL.md | Documents stable branch + update-in-place PR behavior for Workflow C. |
| skills/rundeck-plugin-versions/scripts/bump-versions-pr.sh | Implements stable branch regeneration + PR edit/create logic and adds [RUN-0000] title/commit prefix. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+132
to
+135
| local branch="bump-plugin-versions" | ||
| local existing_pr | ||
| existing_pr="$(gh pr list --repo "$repo_slug" --head "$branch" --state open --json number -q '.[0].number' 2>/dev/null || true)" | ||
|
|
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Two follow-up fixes to
bump-versions-pr.sh, both written after #14 hadalready merged - they never actually landed until now (pushed to the same
branch name post-merge by mistake).
[RUN-0000], matching the org'sshared Renovate
commitMessagePrefixconvention - some consuming repos'PR checks key off that prefix. Already applied retroactively to the three
already-open PRs (rundeck#10470, rundeckpro#4960, ua-runner#203) via
gh pr edit.bump-plugin-versions, no date suffix)instead of a date-stamped one. The dated name meant re-running the script
same-day would hit an unhandled
gh pr createerror on analready-existing PR (aborting before the branch-restore step), and
re-running on a later day would open a duplicate PR alongside whatever
was still open. Now every run checks for an existing open PR on that
branch first, rebuilds the branch fresh off current
main, force-pushes,and either edits the existing PR or opens a new one if the last one was
merged/closed - matching how Renovate's own PRs behave.
Why
Same as #14 - this is the
bump-versions-pr.shproactive version-bump PRsweep. These are correctness fixes to that script, not new scope.