-
Notifications
You must be signed in to change notification settings - Fork 3
Add PR auto-labeling workflow #53
Open
Description
What
Create a GitHub Actions workflow that automatically labels PRs based on the files they change.
Why
Manual labeling doesn't scale. Auto-labeling helps maintainers triage PRs faster and lets contributors see at a glance what domain a PR touches.
How
- Create
.github/workflows/pr-labeler.yml - Use
actions/labeler@v5(https://github.com/actions/labeler) - Create
.github/labeler.ymlwith rules like:src/*.cpp,src/*.h→codedocs/**→documentationtest/**→tests.github/workflows/**→cidata/lang/**→i18nDockerfile,docker-compose.yml→tools
- Trigger on
pull_request_targetwithtypes: [opened, synchronize]
References
- https://github.com/actions/labeler
.github/workflows/build.yml— existing CI for syntax referenceCONTRIBUTING.md— skill-to-issue mapping table (align labeler rules with these categories)
Acceptance
-
.github/workflows/pr-labeler.ymlcreated -
.github/labeler.ymlwith rules covering code, docs, tests, CI, i18n, and tools - Workflow runs on PR open and sync
- Labels applied correctly when testing with a sample PR