Skip to content

Accept WordPress.org usernames in @propsbot add - #315

Merged
obenland merged 2 commits into
WordPress:trunkfrom
obenland:add/propsbot-add-wporg-usernames
Nov 12, 2026
Merged

obenland merged 2 commits into
WordPress:trunkfrom
obenland:add/propsbot-add-wporg-usernames

Conversation

@obenland

@obenland obenland commented Nov 12, 2026 •

Copy link
Copy Markdown
Member

What?

@propsbot add <username> and @propsbot remove <username> now also take a WordPress.org username.

Why?

The commands only accepted GitHub usernames, so someone who contributed without a GitHub account, for example in a call, on Slack, or on Trac, could not be given props. That is the use case from #87, which #291 listed as a limitation: "Only GitHub usernames can be added."

How?

  • add still looks the username up on GitHub first, so nothing changes for names that are GitHub accounts: users are added, linked or not, and organizations and bots are ignored with a warning.
  • When GitHub has no account by that name, the name is taken as a WordPress.org username, the one in the address of the profile. It is credited through the same @git.wordpress.org path as a co-author without a GitHub account, so it is listed once when the same account is already credited, and only if the WordPress.org profile exists.
  • An added username whose profile does not exist is left out with a warning. When the profile check itself fails, they stay listed as unlinked instead, so they don't disappear because of a failed request.
  • A username alone stands for both the GitHub user and the WordPress.org user of that name. <username>@git.wordpress.org stands for the WordPress.org user only, in both commands, for when the same username is someone else on GitHub. remove paul followed by add paul@git.wordpress.org leaves out the GitHub user and credits the WordPress.org one.
  • Commands are now replayed one by one instead of keeping the latest command per username, so the most recent command wins across the two forms as well.
  • Usernames can contain underscores and be up to 50 characters long, since WordPress.org usernames can.
  • When the only contributor is an added username that does not exist, no contributors are found, instead of empty lists being posted.

Known limitation: when a username is one person on GitHub and another on WordPress.org, @propsbot add <username> picks the GitHub user, even if that account is not linked. The @git.wordpress.org form is the way to pick the WordPress.org one.

This and #311 change the same loop in src/contribution-collector.js, so whichever is merged second needs a small conflict resolved.

Testing Instructions

  • npm run all: lint, the rebuilt dist/, and the tests pass. New tests cover parsing the two forms, replaying mixed sequences of them in order, the collector crediting added usernames as GitHub users first and WordPress.org users second, the warnings for an organization and an unknown account, a failed profile check, and an unknown account as the only contributor.
  • Not run end to end on a pull request yet. To do so, with the branch as the action, comment:
    1. @propsbot add <a GitHub username>: listed as before, linked or unlinked.
    2. @propsbot add <a WordPress.org username that is not on GitHub>: listed in the props by that username.
    3. @propsbot add <a name that is on neither>: left out, with a warning in the run log.
    4. @propsbot add <username>@git.wordpress.org for a name that is someone else on GitHub: the WordPress.org user is listed, and the GitHub user is not mentioned.
    5. @propsbot remove <username>@git.wordpress.org for the user from step 4, and @propsbot remove <username> for the user from step 2: no longer listed.

See #87, #291.

🤖 Generated with Claude Code

`@propsbot add <username>` only took GitHub usernames, so someone who
contributed without a GitHub account could not be given props.

The username is still looked up on GitHub first. When there is no GitHub
user by that name, it is taken as a WordPress.org username and credited
like a co-author without a GitHub account, if that account exists.
`@propsbot add <username>@git.wordpress.org` adds a WordPress.org user
whose username belongs to someone else on GitHub.

Co-Authored-By: Claude Mythos 5.2 <noreply@anthropic.com>
Copilot AI lite review requested due to automatic review settings November 12, 2026 17:09

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.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.

A username alone now stands for both the GitHub user and the
WordPress.org user of that name, and `<username>@git.wordpress.org` for
the WordPress.org user only, in `add` and in `remove`. Commands are
replayed one by one, so a removal is no longer undone by a later command
for the other form.

- Only fall back to WordPress.org when GitHub has no account by that
  name, so an organization or a bot is ignored with a warning again.
- Keep an added user listed as unlinked when the WordPress.org profile
  check fails, instead of leaving them out like an unknown account.
- Find no contributors when the only one is an added username that does
  not exist, instead of posting empty lists.
- Document that the WordPress.org username is the one in the profile
  address, and what `remove` covers.

Co-Authored-By: Claude Mythos 5.2 <noreply@anthropic.com>
@obenland
obenland merged commit f1f04b9 into WordPress:trunk Nov 12, 2026
6 checks passed
obenland added a commit to obenland/props-bot-action that referenced this pull request Nov 30, 2026
Since WordPress#315, a WordPress.org user added with `@propsbot add` is credited
under a `<username>@git.wordpress.org` address generated from the
username, and the output carries it as `email`. The docs said `email`
came only from commit authors, so a workflow could take the generated
address for one a commit author supplied.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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