Repository navigation
Conversation
There was a problem hiding this comment.
🟡 Changes recommended
The review identifies an unverified GraphQL body selection that could disable reporter collection and slug normalization that rejects valid Trac logins with repeated or surrounding hyphens.
2 open issues
What changed in this PR
This pull request adds support for crediting reporters of WordPress.org Trac tickets linked in pull request descriptions, while preserving existing contributor, duplicate, and removal handling.
Changes:
- Extracts unique Trac ticket links and retrieves reporter usernames through Trac’s CSV endpoint.
- Integrates Trac reporters into the existing WordPress.org attribution flow.
- Handles anonymous reporters, redirects, lookup failures, duplicates, and removals.
- Updates GitHub data collection, tests, documentation, and the bundled action output.
| File | Description |
|---|---|
tests/trac.test.mjs |
Tests Trac ticket extraction and reporter lookup behavior. |
tests/contribution-collector.test.mjs |
Tests reporter attribution, deduplication, and removal handling. |
src/trac.js |
Implements Trac URL parsing and reporter retrieval. |
src/github.js |
Fetches pull request descriptions through GitHub GraphQL. |
src/contribution-collector.js |
Integrates Trac reporters into contributor processing and filtering. |
README.md |
Documents Trac reporter attribution and removal behavior. |
dist/index.js |
Updates the bundled GitHub Action implementation. |
Review effort: Lite
There was a problem hiding this comment.
🔵 Needs a closer look
Approval should be deferred because the integration relies on live Trac and WordPress.org HTTP behaviors that mocked tests cannot verify, requiring a human check of the GitHub-runner execution.
No open issues 🎉
2 resolved since last review
Review effort: Lite
|
Could you refresh this against trunk? The merge preview found conflicts in the README, the contributor collector, its tests and the compiled action. #315 changed how the collector credits WordPress.org users. Resolving the source and tests first, then rebuilding the action, would let us check the reporter credits alongside that change. |
Pull requests for WordPress.org projects link their Trac ticket in the description, but its reporter was never credited, since only GitHub issues were collected. Reporters go by their WordPress.org username, so they are credited through the same `@git.wordpress.org` email path as co-authors without a GitHub account. That covers duplicates, `@propsbot remove`, and the check that the account exists. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
WordPress derives the profile slug with `sanitize_title( mb_substr( $user_login, 0, 50 ) )`, which turns dots into hyphens, collapses repeated hyphens, and trims them from the ends. The approximation stripped dots and left hyphens alone, so a reporter like `john.doe` or `john--doe` was looked up under the wrong slug and left out of the props. Also test that the pull request query selects the description, since Trac reporters are read from it and the query is mocked everywhere else. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- A reporter who is also a commit co-author got a second identical `Co-authored-by` line, since Trac reporters skipped the check every other source makes for contributors already in the list. - A reporter whose WordPress.org account can't be found was listed as an unlinked GitHub account, asking them to link an account they may not have. They are now left out with a warning. - Free-form reporters on old tickets, such as a quoted name with a comma, could turn into the slug of an unrelated account. Reporters must now look like a WordPress.org login. - The description is up to the PR author, so only the first 10 linked tickets are looked up, concurrently. - The User-Agent sent to WordPress.org is built in one place. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
CodeQL flags a substring check on a URL, even in a test mock. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
335b792 to
6b0e783
Compare
|
Thanks, I rebased it on latest trunk. It's currently blocked by https://make.wordpress.org/systems/2026/11/04/exempt-propsbot-from-trac-browser-challenge/. |


Pull requests for WordPress.org projects link their Trac ticket in the description, but Props Bot never credited the ticket's reporter, since it only collects from GitHub issues. That's how the reporter of https://meta.trac.wordpress.org/ticket/7932 was left out of the props for WordPress/wordpress.org#1121, see comment:3.
This reads the
*.trac.wordpress.org/ticket/<id>links in the PR description and looks up each ticket's reporter through Trac's query CSV, asking for thereportercolumn only. Reporters go by their WordPress.org username, so they are credited through the same@git.wordpress.orgemail path as co-authors without a GitHub account. That covers duplicates with linked GitHub accounts,@propsbot remove <username>, and the check that the account exists.@propsbot add(Accept WordPress.org usernames in@propsbot add#315). When the account check itself fails, the reporter stays listed as unlinked so a committer can check.@propsbot remove <username>leaves out a reporter, as it does other WordPress.org users.Known limitation: Trac shows a bot check to GitHub's runners. The "Test the Action" run on this PR got
Could not get the reporter of https://meta.trac.wordpress.org/ticket/7932: HTTP 403. Until WordPress.org lets Props Bot's lookups through, or offers a lookup endpoint, reporters are skipped with that warning and the rest of the props are unaffected.Commenters on Trac tickets are left out on purpose; see the concerns in #30. This doesn't close that issue.
Refs #30.
🤖 Generated with Claude Code