chore(release): support custom remote in create-release-branch and refactor#3877
Conversation
rickeylev
commented
Jul 1, 2026
- Add --remote flag to create-release-branch subcommand to support pushing to upstream locally and origin in GHA.
- Factor cmd_create_release_branch out of release.py into create_release_branch.py.
- Use branch_url instead of branch name in tracking issue metadata.
- Update release tracking template with manual editing and backporting instructions.
…factor - Add --remote flag to create-release-branch subcommand to support pushing to upstream locally and origin in GHA. - Factor cmd_create_release_branch out of release.py into create_release_branch.py. - Use branch_url instead of branch name in tracking issue metadata. - Update release tracking template with manual editing and backporting instructions.
There was a problem hiding this comment.
Code Review
This pull request refactors the release tool by moving the cmd_create_release_branch subcommand into its own module (create_release_branch.py), adding support for a configurable git remote, and updating the release tracking issue template with instructions for backports and manual editing. Feedback focuses on maintaining backward compatibility with existing tracking issues by preserving the branch metadata key alongside the new branch_url key, and updating the corresponding unit tests to assert both fields.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
| # Update tracking issue checklist | ||
| print("Updating tracking issue checklist...") | ||
| branch_url = f"{REPO_URL}/tree/{branch_name}" | ||
| metadata = {"status": "done", "branch_url": branch_url, "commit": commit_sha[:8]} |
There was a problem hiding this comment.
The metadata key has been changed from branch to branch_url. However, parse_checklist_state in tools/private/release/release_issue.py still expects the key branch (i.e., meta.get("branch")) and does not parse branch_url. To maintain backward compatibility with existing tracking issues and ensure that the parsed checklist state remains consistent, we should write both branch and branch_url to the metadata.
| metadata = {"status": "done", "branch_url": branch_url, "commit": commit_sha[:8]} | |
| metadata = { | |
| "status": "done", | |
| "branch": branch_name, | |
| "branch_url": branch_url, | |
| "commit": commit_sha[:8], | |
| } |
| self.assertIn( | ||
| "branch_url=https://github.com/bazel-contrib/rules_python/tree/release/2.0", | ||
| call_args[1], | ||
| ) |
There was a problem hiding this comment.
Add an assertion to verify that the branch metadata is also correctly written to the tracking issue body, aligning the test with the backward-compatibility fix.
| self.assertIn( | |
| "branch_url=https://github.com/bazel-contrib/rules_python/tree/release/2.0", | |
| call_args[1], | |
| ) | |
| self.assertIn( | |
| "branch_url=https://github.com/bazel-contrib/rules_python/tree/release/2.0", | |
| call_args[1], | |
| ) | |
| self.assertIn("branch=release/2.0", call_args[1]) |