Skip to content

Fix PR update-in-place behavior and title prefix for bump-versions-pr.sh - #15

Merged
fdevans merged 2 commits into
mainfrom
add-version-bump-pr-skill
Aug 18, 2026
Merged

Fix PR update-in-place behavior and title prefix for bump-versions-pr.sh#15
fdevans merged 2 commits into
mainfrom
add-version-bump-pr-skill

Conversation

@fdevans

@fdevans fdevans commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

What

Two follow-up fixes to bump-versions-pr.sh, both written after #14 had
already merged - they never actually landed until now (pushed to the same
branch name post-merge by mistake).

  1. Prefix generated PR titles/commits with [RUN-0000], matching the org's
    shared Renovate commitMessagePrefix convention - 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.
  2. Stable per-repo branch name (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 create error on an
    already-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.sh proactive version-bump PR
sweep. These are correctness fixes to that script, not new scope.

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.
@fdevans
fdevans requested review from a team and a lite review from Copilot August 18, 2026 18:02
@fdevans
fdevans merged commit 0e70610 into main Aug 18, 2026
1 check passed

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 via gh 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)"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants