andygrove opened a new pull request, #6358: URL: https://github.com/apache/datafusion-comet/pull/6358
## Which issue does this PR close? There is no issue for this. It came up while generating the 1.1.0 changelog in #6282. ## Rationale for this change #6219 carries the commits from #6092 by Michael Taranov (`mixermt`), but the generated 1.1.0 changelog credits #6219 only to `andygrove`, and Michael is missing from the credits. The script credits each PR to the author of the commit that merged it, on the PR's line (`commit.author.login`) and in the credits (`git shortlog`). When a squash-merged PR has commits from more than one person, GitHub records the others only as `Co-authored-by` trailers on that commit, and neither of those reads them. The four backports on `branch-1.1` (#6266, #6305, #6318 and #6323) have the same problem: they are credited to whoever opened the backport, and not to the author of the original change. ## What changes are included in this PR? For a PR whose merge commit has a `Co-authored-by` trailer, `generate-changelog.py` now fetches the PR's commits and credits the GitHub account of each commit's author, on the PR's line and in the credits. It leaves out: - Merges of the base branch into the PR. Most of the trailers that name a maintainer come from these (the "Update branch" button), not from commits they wrote. - Commits whose email is not linked to a GitHub account. Across the repository's history, every one of these is a second address of the PR's own author, or a machine-local identity such as `Hung <[email protected]>`. - Accounts that have never opened an issue or PR in the repository. GitHub links a commit to whichever account has its email address, so the sandbox identity `test <[email protected]>` in three of the 1.1.0 PRs resolves to an unrelated account, as do a guessed `[email protected]` and a Cursor Agent commit. The script prints each account it leaves out this way to stderr, so the release manager can check them. AI assistants that only appear as a `Co-authored-by` trailer on a commit are not credited, because only commit authors are. In the credits, a co-author counts once for each such PR, under the name `git shortlog` already lists them under, and counts toward the number of contributors in the header. As in `git shortlog`, a name counts once per PR, so someone who committed from two accounts under the same name is not counted twice. The credits sentence now says that a PR with commits from more than one person counts for each of them. Only PRs with a trailer need the extra calls: 107 of the 399 commits in the 1.1.0 range, plus one issue lookup per co-author account. The issue lookup reads the first page rather than `totalCount`, which PyGithub reports as 0 for this endpoint because GitHub pages it with a cursor. ## How are these changes tested? The release scripts have no test harness, so I generated changelogs before and after the change and compared them. For 1.1.0 (`1.0.0..branch-1.1` at 39779e318), the only differences are: - #6219 is credited to `andygrove, mixermt`, #6223 to `andygrove, snmvaughan` and #5310 to `manuzhang, andygrove`, and the four backports now also credit `dwsmith1983`, `liupoyi-1031` and `parthchandra`. - The credits gain Michael Taranov (1), and Andy Grove, dustin, Parth Chandra, Steve Vaughan and liupoyi-1031 each gain the PRs they co-authored. Steve's lands on his existing `Steve Vaughan` line, although his commits say `Steve Vaughan Jr`. The header says 41 contributors instead of 40. - `cincrement` (`test <[email protected]>`) on #5806, #5827 and #5843, `erik` on #5732 and `cursoragent` on #5619 are left out, with a line on stderr for each. To check the rules beyond one release, I applied them to all 430 PRs on `main` whose merge commit has a trailer. They credit 14 accounts, each of them someone who wrote commits in the PR. The issue-or-PR check leaves out 6: the three above, and three second accounts of the PR's own author. Generating 0.6.0 covers the two-account case: #1392 is credited to `EmilyMatt, EmilyFlarionIO`, and Emily Matheys still counts once for it. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
