Add reusable PR auto-labeler workflow#76
Conversation
ec79181 to
a2dcdbb
Compare
Adds a workflow_call workflow that parses checked checkboxes in PR descriptions and applies/removes corresponding GitHub labels. Label mapping is configurable via JSON input so any repo can use its own PR template fields. - Passes label_mapping via env var to avoid JS interpolation issues - Handles 403 gracefully for fork PRs with insufficient permissions - Includes test workflow with sample rippled-style mappings Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
c04026a to
79d342f
Compare
mathbunnyru
left a comment
There was a problem hiding this comment.
This shouldn't be implemented manually.
If we agree to apply custom labels, it should be done via add_label + custom_labels of https://github.com/ytanikin/pr-conventional-commits
And if we decide to go this way, it should be done on top of #73, not as a separate workflow
I believe using ytanikin/pr-conventional-commits, is introducing a new workflow and some more expectation from developers. We can achieve what we want with the existing workflow. |
High Level Overview of Change
Adds a reusable
workflow_callworkflow that automatically applies/removes GitHub labels based on checked checkboxes in PR descriptions. This pairs with existing PR templates' "Type of Change" sections — no extra effort from contributors, labels stay in sync with the description.Context of Change
Repos like
rippledalready have structured PR templates with checkbox fields (Type of Change, API Impact). This workflow parses those checkboxes and maps them to labels, eliminating manual label management.How it works
label_mappinginput:{"- \\[x\\] Bug fix": "BugFix", ...}Example PR with effect: pratikmankawde#1
Try changing the 'type of change' options. The labels change automatically. Might take a-few seconds though.
Type of Change
Files
pr-auto-labeler.yml— the reusable workflowtest-pr-auto-labeler.yml— test workflow with sample rippled mappings