Skip to content

Only look up GitHub usernames on WordPress.org - #317

Merged
obenland merged 1 commit into
trunkfrom
fix/lookup-github-users-only
Nov 30, 2026
Merged

obenland merged 1 commit into
trunkfrom
fix/lookup-github-users-only

Conversation

@obenland

Copy link
Copy Markdown
Member

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

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>
Copilot AI lite review requested due to automatic review settings November 30, 2026 19:28
@github-actions

Copy link
Copy Markdown

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs.

Core SVN

Core Committers: Use this line as a base for the props when committing in SVN:

Props obenland.

GitHub Merge commits

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: obenland <obenland@git.wordpress.org>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.


Props Bot commands

You can trigger Props Bot actions by commenting on this PR:

  • @propsbot add <username> to give props to a GitHub or WordPress.org user. Requires write access.
  • @propsbot remove <username> to leave a user out of the props. Requires write access.
  • @propsbot refresh to refresh this list. Adding the props-bot label works too.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟢 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

@obenland
obenland merged commit 915837d into trunk Nov 30, 2026
7 checks passed
@obenland
obenland deleted the fix/lookup-github-users-only branch November 30, 2026 19:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants