-
Notifications
You must be signed in to change notification settings - Fork 25
Honor Registrator branch when creating releases #485
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
arnavk23
commented
Jan 9, 2026
- Extract release branch from registry PR body (Registrator [branch=]) and prioritize it over config/default when creating releases.
- Thread version through release-branch helpers so per-version branch selection works.
- Add tests for branch parsing/priority and update release tests to avoid network calls.
- Fixes Look up release branch in commit comment #200
There was a problem hiding this comment.
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 enhances TagBot to honor the branch specification from Registrator when creating releases. The implementation extracts the branch information from the registry PR body and prioritizes it over the configured or default branch.
Key changes:
- Converts
_release_branchfrom a property to a method that accepts a version parameter, enabling per-version branch selection - Adds
_branch_from_registry_pr()method to parse branch information from registry PR body using regex - Updates all call sites to thread version information through the release-branch helpers
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| tagbot/action/repo.py | Implements branch extraction from registry PR body, converts _release_branch to version-aware method, and updates all dependent methods |
| test/action/test_repo.py | Adds comprehensive tests for branch parsing logic and updates existing tests to pass version parameters |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
|
@IanButterworth whenever you are free, please take a look. Thanks! |
|
Claude found some issues. Do you mind if I push? |
No issues. Do push changes. |
…tion, dedupe calls - Tighten _branch_from_registry_pr regex to require dash prefix (Registrator format) - Narrow except Exception to (GithubException, RequestException) in _release_branch - Inline _commit_sha_of_release_branch in create_release to avoid double _release_branch() call - Add pr.body None check in _commit_sha_from_registry_pr for consistency - Update tests accordingly Co-authored-by: Claude <noreply@anthropic.com>