Skip to content

feat: support stable branch ranges in backport commands - #856

Draft
joshtrichards wants to merge 16 commits into
masterfrom
jtr/feat-backport-branch-ranges
Draft

joshtrichards wants to merge 16 commits into
masterfrom
jtr/feat-backport-branch-ranges

Conversation

@joshtrichards

Copy link
Copy Markdown
Member

Summary

Allow backport requests to target an inclusive range of stable branches in a single comment.

For example:

/backport to stable28..stable35

creates one backport task for each branch from stable28 through stable35.

Partial and forced requests are supported as well:

/backport abc1234 def5678 to stable28..stable35
/backport! to stable28..stable35

Changes:

  • Add structured backport request parsing.
  • Support inclusive stable<number>..stable<number> ranges.
  • Limit ranges to 10 branches per request.
  • Reject descending ranges and leading-zero branch numbers.
  • Reject command-prefix lookalikes such as /backporting.
  • Expand each parsed branch range into an individual backport task.
  • Preserve existing single-branch and commit-specific syntax.
  • Cache full-request commit lookup while processing multiple backport comments after a PR is merged.
  • Keep backport processing sequential through the existing queue.
  • Add parser and task fan-out tests.

Existing commands continue to work.

The existing branch-specific backport pipeline remains unchanged; ranges are expanded into normal single-branch tasks before entering the queue.

🤖 AI (if applicable)

  • The content of this PR was partly or fully generated using AI (N/A)

Assisted-by: Copilot:gpt-5.6-luna

Signed-off-by: Josh <josh.t.richards@gmail.com>
Assisted-by: Copilot:gpt-5.6-luna

Signed-off-by: Josh <josh.t.richards@gmail.com>
Assisted-by: Copilot:gpt-5.6-luna

Signed-off-by: Josh <josh.t.richards@gmail.com>
Create one backport task per target branch.

Assisted-by: Copilot:gpt-5.6-luna

Signed-off-by: Josh <josh.t.richards@gmail.com>
Signed-off-by: Josh <josh.t.richards@gmail.com>
Use the parser and fan out tasks in webhook handling

Signed-off-by: Josh <josh.t.richards@gmail.com>
In the original issue_comment.created handler, adding the label was best-effort. Didn't mean to change this in the new version.

Signed-off-by: Josh <josh.t.richards@gmail.com>
Assisted-by: Copilot:gpt-5.6-luna

Signed-off-by: Josh <josh.t.richards@gmail.com>
Signed-off-by: Josh <josh.t.richards@gmail.com>
Assisted-by: Copilot:gpt-5.6-luna

Signed-off-by: Josh <josh.t.richards@gmail.com>
Signed-off-by: Josh <josh.t.richards@gmail.com>
Assisted-by: Copilot:gpt-5.6-luna

Signed-off-by: Josh <josh.t.richards@gmail.com>
Assisted-by: Copilot:gpt-5.6-luna

Signed-off-by: Josh <josh.t.richards@gmail.com>
- leading zeroes
- prefix lookalikes
- empty/incomplete commands

Signed-off-by: Josh <josh.t.richards@gmail.com>
Signed-off-by: Josh <josh.t.richards@gmail.com>
Signed-off-by: Josh <josh.t.richards@gmail.com>
@joshtrichards joshtrichards added the enhancement New feature or request label Sep 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant