Skip to content

Release notes: Use author if they are GitHub staff#3482

Open
mbg wants to merge 1 commit intomainfrom
mbg/release/author-or-merger
Open

Release notes: Use author if they are GitHub staff#3482
mbg wants to merge 1 commit intomainfrom
mbg/release/author-or-merger

Conversation

@mbg
Copy link
Member

@mbg mbg commented Feb 13, 2026

Modifies update-release-branch.py to 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:

  • Low risk: Changes are fully under feature flags, or have been fully tested and validated in pre-production environments and are highly observable, or are documentation or test only.

Which use cases does this change impact?

Environments:

  • Testing/None - This change does not impact any CodeQL workflows in production.

How did/will you validate this change?

  • None - I am not validating these changes.

If something goes wrong after this change is released, what are the mitigation and rollback strategies?

  • Rollback - Change can only be disabled by rolling back the release or releasing a new version with a fix.

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?

  • No special considerations - This change can be merged at any time.

Merge / deployment checklist

  • Confirm this change is backwards compatible with existing workflows.
  • Consider adding a changelog entry for this change.
  • Confirm the readme and docs have been updated if necessary.

@mbg mbg requested a review from henrymercer February 13, 2026 15:12
@mbg mbg self-assigned this Feb 13, 2026
@mbg mbg requested a review from a team as a code owner February 13, 2026 15:12
Copilot AI review requested due to automatic review settings February 13, 2026 15:12
@github-actions github-actions bot added the size/XS Should be very easy to review label Feb 13, 2026
@mbg mbg changed the title Changes: Use author if they are GitHub staff Release notes: Use author if they are GitHub staff Feb 13, 2026
Copy link
Contributor

Copilot AI left a 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 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_admin is 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_staff swallows all exceptions with a bare except 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 (since getattr(..., 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

if pr.user is None:
return None
try:
if getattr(pr.user, 'site_admin', False):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this would throw if we're providing a default value, so I think we can remove the try/catch.

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

Labels

size/XS Should be very easy to review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants