Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the release-branch update automation to attribute merged PRs to the PR author when the author is GitHub staff, falling back to the merger otherwise. This affects the generated body text for release-related pull requests created by the workflow.
Changes:
- Adjust PR attribution in the generated PR body to prefer the PR author when
site_adminis true. - Add a helper (
get_pr_author_if_staff) to encapsulate the staff-author selection logic. - Remove a couple of trailing whitespace issues in
replace_version_package_json.
Comments suppressed due to low confidence (1)
.github/update-release-branch.py:180
get_pr_author_if_staffswallows all exceptions with a bareexcept Exception: pass, which can hide real failures (e.g., API/rate-limit issues) and make troubleshooting the release workflow harder. Consider either removing the try/except (sincegetattr(..., False)already handles missing attributes) or catching the specific expected exception type(s) and emitting a warning before falling back.
try:
if getattr(pr.user, 'site_admin', False):
return pr.user.login
except Exception:
pass
henrymercer
reviewed
Feb 13, 2026
| if pr.user is None: | ||
| return None | ||
| try: | ||
| if getattr(pr.user, 'site_admin', False): |
Contributor
There was a problem hiding this comment.
I don't think this would throw if we're providing a default value, so I think we can remove the try/catch.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Modifies
update-release-branch.pyto use the PR author if they are GitHub staff, or the merger as before otherwise.Risk assessment
For internal use only. Please select the risk level of this change:
Which use cases does this change impact?
Environments:
How did/will you validate this change?
If something goes wrong after this change is released, what are the mitigation and rollback strategies?
How will you know if something goes wrong after this change is released?
Release process will fail.
Are there any special considerations for merging or releasing this change?
Merge / deployment checklist