feat(infra): credit issue reporters in release notes - #5565
Merged
Conversation
`gh pr view --json closingIssuesReferences` returns only id/number/
repository/url per reference, so the nested author lookup always came back
None and the special-thanks section would always have been empty. Resolve
each closed issue's author with a follow-up `gh api repos/{repo}/issues/
{number}` call instead.
A closingIssuesReferences entry can point at another repository, but the author lookup and rendered link always targeted the released repo — a cross-repo reference 404'd (or misattributed to a colliding local issue number). Carry each closed issue's repository identity from the reference's repository.nameWithOwner (with url as fallback) through to the IssueReporter, and label cross-repo links with their owner/name.
`closingIssuesReferences` entries nest the owning repository as `owner.login` + `name`; they carry no flat `nameWithOwner`. Reading only that key meant the documented primary path never matched a real payload and every reference fell through to the URL regex, which was framed as a rarely-taken fallback. Compose the slug from the nested owner, keeping `nameWithOwner` first for a future gh release and the URL last. An entry that resolves to none of them is now dropped with a warning rather than assumed to belong to the released repo: guessing queried an unrelated issue sharing the number and publicly thanked whoever filed it. Reporter lookups also join the failure accounting they sat outside of. Failed issue-author lookups roll up into a warning carrying the INCOMPLETE token that `main()` sorts on, so the section going quiet is visible among the ten annotations GitHub renders. `gh pr view` failures get their own consecutive-failure counter, since the commits-to-PR call resets the shared one on every success and an unknown `--json` field fails every view in the walk. Authors are memoized per issue, so two PRs closing one issue cost one call. Malformed reference entries warn instead of vanishing, issue numbers reject `bool` and non-positive values, repository slugs are normalized for case, and `IssueReporter.issues` is a tuple so the record is actually immutable.
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.
GitHub release notes now include a Special thanks section. It credits the users who reported the issues that this release's pull requests closed, with links to those issues. The existing community-contributor shoutouts credit pull request authors; this section credits issue reporters. Users who are internal maintainers on this release are not included.
The existing
collect_contributorswalk does the lookup. Its per-PRgh pr viewcall now also requestsclosingIssuesReferences, so both attribution lists use the same range, retry, and failure handling.For each merged PR, the issue author is credited — not the PR author. Entries are grouped by login with deduplicated, ascending issue numbers, and rendered as a comma-separated list like the other attribution lines. Bot accounts (
[bot]suffix), empty logins, and unusable issue numbers are skipped with a warning. A missingclosingIssuesReferencesfield also warns instead of silently producing an empty section. If no closed issues are found, the section is omitted. Lookup failures never block a release.