Repository navigation
Only look up GitHub usernames on WordPress.org - #317
Conversation
Contributors without a GitHub account are keyed by email, which the lookup can never match, yet they counted against its 100-entry limit. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. Core SVNCore Committers: Use this line as a base for the props when committing in SVN: GitHub Merge commitsIf you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. Props Bot commandsYou can trigger Props Bot actions by commenting on this PR:
|
There was a problem hiding this comment.
🟢 Approval recommended
The changes address the lookup filtering and empty-input cases with corresponding test updates and a synchronized distribution file, and no active issues are reported.
No open issues 🎉
What changed in this PR
This pull request limits WordPress.org lookups to GitHub usernames, preventing email-based contributors from consuming the endpoint's 100-entry limit and skipping unnecessary requests when no usernames are present.
Changes:
- Filters email-keyed contributors out of the WordPress.org lookup.
- Skips the lookup when no GitHub usernames are available.
- Updates tests for filtered inputs and empty lookups.
- Synchronizes the bundled distribution file.
| File | Description |
|---|---|
| tests/contribution-collector.test.mjs | Updates tests to verify that email-keyed contributors are excluded and empty WordPress.org lookups are skipped. |
| src/contribution-collector.js | Filters lookup candidates to GitHub usernames and conditionally requests WordPress.org data. |
| dist/index.js | Includes the corresponding compiled changes in the bundled action. |
Review effort: Lite
Contributors without a GitHub account (unlinked commit authors and `@propsbot add`ed WordPress.org users) are keyed by email. Those emails were sent to the WordPress.org lookup along with GitHub usernames, even though it only matches GitHub usernames and answers `false` for every email. They're resolved separately afterwards anyway.
The lookup accepts at most 100 entries, so the emails took up room for nothing. WordPress/gutenberg#84609 sent 63 of them alongside 78 usernames and went over the limit.
This leaves emails out of the lookup, and skips the request when there are no GitHub usernames to look up.
Related: #316, which fails the run when the lookup errors instead of listing everyone as unlinked.
🤖 Generated with Claude Code