Skip to content

fix: route GOV_RELEASE cherry-picks through LTS_RELEASE before develop - #5200

Open
netbe wants to merge 1 commit into
developfrom
fix/gov-release-cherry-pick
Open

fix: route GOV_RELEASE cherry-picks through LTS_RELEASE before develop#5200
netbe wants to merge 1 commit into
developfrom
fix/gov-release-cherry-pick

Conversation

@netbe

@netbe netbe commented Sep 8, 2026

Copy link
Copy Markdown
Collaborator

Issue

Fixes cherry-picked from the tracked GOV release branch (vars.GOV_RELEASE) were targeted straight at develop, bypassing the LTS release branch (vars.LTS_RELEASE) entirely. This meant LTS never received GOV-originated fixes.

Now, when a PR merges into the GOV release branch, the auto cherry-pick action targets the LTS release branch instead. Once that cherry-pick PR merges into LTS, the same workflow's existing LTS handling picks it up and forwards it to develop, so the chain becomes GOV → LTS → develop. Falls back to develop directly if vars.LTS_RELEASE isn't configured.

Testing

Ran scripts/determine-cherry-pick-target.py locally with different env combinations:

  • GOV_RELEASE + LTS_RELEASE set, base branch = GOV branch → targets LTS branch
  • LTS_RELEASE set, base branch = LTS branch → targets develop
  • GOV_RELEASE set without LTS_RELEASE, base branch = GOV branch → falls back to develop

Checklist

  • Title contains a reference JIRA issue number like [WPB-XXX].
  • Description is filled and free of optional paragraphs.
  • Adds/updates automated tests.

UI accessibility checklist

Not applicable — no UI changes.

Copilot AI lite review requested due to automatic review settings September 8, 2026 12:39

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.

🟡 Changes recommended

The new GOV → LTS routing needs a small misconfiguration guard (GOV/LTS set to the same branch) and the PR’s “adds/updates automated tests” claim doesn’t match the current change set.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

This PR updates the auto cherry-pick target selection so fixes merged into the tracked GOV release branch are routed to the tracked LTS release branch first, and only then forwarded to develop by the existing LTS handling (GOV → LTS → develop), with a fallback to develop when LTS isn’t configured.

Changes:

  • Adjusted determine_target_branch to route GOV_RELEASE merges to LTS_RELEASE (or develop if unset).
  • Updated workflow header documentation to reflect the new GOV → LTS → develop routing semantics.
File summaries
File Description
scripts/determine-cherry-pick-target.py Implements GOV → LTS → develop target selection logic (with fallback behavior).
.github/workflows/cherry-pick-from-release-to-develop.yml Updates workflow documentation to describe the new routing behavior.
Review details
  • Files reviewed: 2/2 changed files
  • Comments generated: 2
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines +72 to +77
if gov_release and base_branch == gov_release:
if lts_release:
print(f"Base branch {base_branch} is the GOV_RELEASE branch, using LTS_RELEASE branch {lts_release}")
return lts_release
print(f"Base branch {base_branch} is the GOV_RELEASE branch, no LTS_RELEASE set, using develop")
return "develop"
Comment on lines 60 to 66
def determine_target_branch(base_branch):
"""Determine the target branch for cherry-picking."""
# Check if base branch matches release/cycle-* pattern
if not base_branch.startswith("release/cycle-"):
print(f"Base branch {base_branch} doesn't match release/cycle-* pattern, using develop")
return "develop"

@github-actions

github-actions Bot commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

Test Results

0 tests   0 ✅  0s ⏱️
0 suites  0 💤
0 files    0 ❌

Results for commit b14cbdb.

Summary: workflow run #34227315208

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants