The workflow automatically label PR on it's open/reopen events. It checks all the commit messages for certain words and apply corresponding labels to PR. Those labels used by several workflows to generate release notes.
Create a new workflow in your repository. Copy the prepared file into .github/workflows directory of your repository.
Create a new configuration file .github/auto-labeler-config.yaml. Copy prepared file into .github directory of your repository.
The configuration file from previous step defines the next rules for PR labeling based on words in commit messages:
| Commit message word(s) | Label |
|---|---|
| 'FIX', 'Fix', 'fix', 'FIXED', 'Fixed', 'fixed' | bug |
| 'FEATURE', 'Feature', 'feature', 'FEAT', 'Feat', 'feat' | enhancement |
| 'BREAKING CHANGE', 'BREAKING', 'MAJOR' | breaking-change |
| 'refactor','Refactor' | refactor |
| 'doc','docs','document','documentation' | documentation |
| 'build','rebuild' | build |
| 'config', 'conf', 'configuration', 'configure' | config |
Labels on PRs used to generate release notes for GitHub releases. You can edit labels configuration and release notes generation template to extend or improve the default ones.