Skip to content

Add contributor acknowledgement system#354

Closed
kraftbj wants to merge 7 commits into
trunkfrom
feature/contributor-acknowledgement-system
Closed

Add contributor acknowledgement system#354
kraftbj wants to merge 7 commits into
trunkfrom
feature/contributor-acknowledgement-system

Conversation

@kraftbj
Copy link
Copy Markdown
Contributor

@kraftbj kraftbj commented Jan 14, 2026

Summary

Introduces a comprehensive system for tracking and acknowledging contributors to the Secure Custom Fields project.

Fixes #168

Features

  • Fetch contributor data from GitHub REST and GraphQL APIs
  • Track commits, reviews, comments, and issue reports
  • Link GitHub accounts to WordPress.org profiles
  • Smart rate limit handling with exponential backoff
  • Incremental processing with cursor tracking
  • Generate readme.txt contributors field (sorted by first contribution date)
  • Generate CONTRIBUTORS.md (sorted by wporg username)
  • Props-bot workflow for PR contributor comments
  • Automated update workflow (manual trigger for releases)

Files

Scripts:

  • bin/contributors-functions.php: Shared library functions
  • bin/backfill-contributors.php: CLI backfill script
  • bin/contributors.json: Contributor data store

Workflows:

  • .github/workflows/props-bot.yml: Adds contributor comments to PRs while open
  • .github/workflows/update-contributors.yml: Manual workflow for release process

Output:

  • readme.txt: Contributors field with wporg usernames
  • CONTRIBUTORS.md: Full contributor table
  • docs/contributing/contributors.md: Docs site version

Test plan

  • Run composer contributors:update to verify backfill works
  • Verify props-bot comments on new PRs
  • Run PHPUnit tests: ./vendor/bin/phpunit --filter Contributor

Introduces a comprehensive system for tracking and acknowledging
contributors to the Secure Custom Fields project.

Features:
- Fetch contributor data from GitHub REST and GraphQL APIs
- Track commits, reviews, comments, and issue reports
- Link GitHub accounts to WordPress.org profiles
- Smart rate limit handling with exponential backoff
- Incremental processing with cursor tracking
- Generate readme.txt contributors field (sorted by date)
- Generate CONTRIBUTORS.md (sorted by wporg username)
- Props-bot workflow for PR contributor comments
- Automated update workflow (manual trigger for releases)

Scripts:
- bin/contributors-functions.php: Shared library functions
- bin/backfill-contributors.php: CLI backfill script
- bin/contributors.json: Contributor data store
- composer contributors:update: Convenience command

Tests:
- 7 test files with comprehensive coverage
- Rate limit handling tests
- API integration tests
- Output generation tests
Generated contributor data with 23 unique contributors:
- 15 commit authors
- 24 PR contributors (reviewers, commenters, issue reporters)
- 16 with linked WordPress.org accounts
- 4 bot accounts filtered out
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jan 14, 2026

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

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

Props kraftbj, bernhard-reiter, priethor, mosescursor, theaminuldev.

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

@codecov
Copy link
Copy Markdown

codecov Bot commented Jan 14, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 51.35%. Comparing base (7756c10) to head (9d66f56).
⚠️ Report is 22 commits behind head on trunk.

Additional details and impacted files
@@             Coverage Diff              @@
##              trunk     #354      +/-   ##
============================================
- Coverage     53.67%   51.35%   -2.32%     
  Complexity     4410     4410              
============================================
  Files           298      298              
  Lines         39424    39424              
============================================
- Hits          21161    20248     -913     
- Misses        18263    19176     +913     
Flag Coverage Δ
e2e-js 45.02% <ø> (-0.06%) ⬇️
e2e-php 38.66% <ø> (-3.78%) ⬇️
javascript 15.07% <ø> (ø)
phpunit 29.97% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR introduces a comprehensive contributor acknowledgement system that automatically tracks and recognizes contributors through GitHub API integrations. The system fetches contributor data (commits, reviews, comments, issues), links GitHub accounts to WordPress.org profiles, implements smart rate limiting with exponential backoff, supports incremental processing with cursor tracking, and generates multiple output files.

Changes:

  • Added contributor tracking infrastructure with JSON data store and processing functions
  • Implemented automated workflows for props-bot comments and manual contributor updates
  • Generated comprehensive test coverage with 6 new test files covering all system components

Reviewed changes

Copilot reviewed 14 out of 17 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
bin/contributors-functions.php Core library with data operations, API integrations, rate limiting, and output generation
bin/backfill-contributors.php CLI script for fetching historical contributor data from GitHub APIs
bin/contributors.json JSON data store containing contributor information and processing metadata
.github/workflows/update-contributors.yml Manual workflow for updating contributors during release process
.github/workflows/props-bot.yml Automated props-bot workflow for PR contributor comments
readme.txt Updated Contributors field with linked WordPress.org usernames
CONTRIBUTORS.md Generated markdown table of all contributors
docs/contributing/contributors.md Documentation page for contributors
docs/contributing/index.md Updated with contributor acknowledgement information
composer.json Added contributors:update script command
.phpcs.xml.dist Added exclusions for test files and contributor scripts
tests/php/* Six comprehensive test files covering all system components

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .github/workflows/update-contributors.yml Outdated
Comment thread .github/workflows/update-contributors.yml Outdated
- Add --validate flag to cross-check against props-bot comments
- Missing WordPress.org usernames from props-bot are added automatically
- Update workflow to run validation during release process
- Fix workflow to use correct bin/contributors.json path
@ockham
Copy link
Copy Markdown
Contributor

ockham commented Apr 9, 2026

TBH this feels a bit overblown for a comparatively small project with few contributors. IMO, it's hard enough to stay on top of things already that I'd rather not add 4.8 kLoC for improved contributor acknowledgement 😬

Edit: I'd rather just rely on existing tools such as props-bot with as few modifications/additions as possible. (If we find that props-bot is missing a feature -- that other plugins might also benefit from -- we should seek to have that feature added to it.)

@kraftbj
Copy link
Copy Markdown
Contributor Author

kraftbj commented Apr 16, 2026

Agreed — on reflection this sits at the wrong level. The release-time layer here is plugin policy, and the aggregation piece belongs upstream in props-bot rather than reimplemented in SCF-specific PHP that duplicates what the JS action already does.

Closing in favor of upstream work. Filed WordPress/props-bot-action#242 for the two net-new capabilities this PR was reimplementing: a release-aggregation mode (walk merged PRs in a tag range, parse the existing props-bot comments, emit a consolidated list) and structured JSON output (workflow artifact + job summary) so plugins can format readme.txt, CONTRIBUTORS.md, or whatever else they want without re-mining GitHub.

A handful of already-open props-bot issues are data-quality prerequisites for a trustworthy aggregator and can land independently: Co-authored-by trailer parsing (WordPress/props-bot-action#86), linked-PR recursion (WordPress/props-bot-action#66), >100-comment pagination (WordPress/props-bot-action#41), configurable ignore lists (WordPress/props-bot-action#138, WordPress/props-bot-action#77), and issue-author/closer inclusion (WordPress/props-bot-action#102). Starting on #86.

Once those are in, SCF's release step is a thin wrapper: the per-PR workflow plus a small composite step that consumes the JSON and updates readme.txt. Keeps #168 in scope, minus the 4.8 kLoC here.

@kraftbj kraftbj closed this Apr 16, 2026
@kraftbj kraftbj deleted the feature/contributor-acknowledgement-system branch April 19, 2026 17:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Contributors Missing on WordPress.org Plugin Page

3 participants