Automatically assign plugin-specific milestones#2586
Conversation
|
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 Unlinked AccountsThe following contributors have not linked their GitHub and WordPress.org accounts: @zerlinpi. Contributors, please read how to link your accounts to ensure your work is properly credited in WordPress releases. If 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. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## trunk #2586 +/- ##
=======================================
Coverage 70.35% 70.35%
=======================================
Files 91 91
Lines 7867 7867
=======================================
Hits 5535 5535
Misses 2332 2332
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Summary
Fixes #2541.
Automatically assigns a plugin-specific milestone when a pull request is opened or synchronized. The workflow counts additions and deletions under each known
plugins/<slug>/directory, selects the plugin with the unique highest total, and updates the pull request to that plugin's milestone.It also adds focused unit tests to the existing JavaScript CI job.
Relevant technical choices
pull_request_targetand checks out only the trusted base branch. It reads pull request file metadata through the GitHub API and never executes code from the contributor branch.<plugin> n.e.x.tmilestone is preferred. A versioned milestone is assigned only when it is the plugin's sole open candidate.Use of AI Tools
I used OpenAI Codex to assist with repository research, implementation, and test drafting. I reviewed the resulting changes and validation output and take responsibility for the contribution.
Testing
npm run test-unit-jsnpm run lint-jsnpm run tscnpm run lint-json