fix: route GOV_RELEASE cherry-picks through LTS_RELEASE before develop - #5200
fix: route GOV_RELEASE cherry-picks through LTS_RELEASE before develop#5200netbe wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
🟡 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_branchto routeGOV_RELEASEmerges toLTS_RELEASE(ordevelopif 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.
| 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" |
| 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" | ||
|
|
Test Results0 tests 0 ✅ 0s ⏱️ Results for commit b14cbdb. Summary: workflow run #34227315208 |
Issue
Fixes cherry-picked from the tracked GOV release branch (
vars.GOV_RELEASE) were targeted straight atdevelop, 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 todevelopdirectly ifvars.LTS_RELEASEisn't configured.Testing
Ran
scripts/determine-cherry-pick-target.pylocally with different env combinations:GOV_RELEASE+LTS_RELEASEset, base branch = GOV branch → targets LTS branchLTS_RELEASEset, base branch = LTS branch → targetsdevelopGOV_RELEASEset withoutLTS_RELEASE, base branch = GOV branch → falls back todevelopChecklist
[WPB-XXX].UI accessibility checklist
Not applicable — no UI changes.