Many of the automated workflows to generate release notes or backport PRs require labels on the PRs to correctly categorize them and perform the right actions. To eliminate having to do this manually, there is an auto-labeling GitHub action, which allows for automatically labeling opened PRs based on the files that the PR changes.
- Integrate the
opensearch-trigger-bot
in your repository, if not done already. This requires adding some GitHub secrets. See the backport documentation for details. - Add a labeling config
.github/labeler.yml
(example) to your repository. This is where labels can be defined, along with their associated glob patterns, such that if any matching files are changed in a PR, that label will be applied. - Add a GitHub workflow
.github/workflows/labeler.yml
(example) to your repository, to utilize the configuration. Note this uses permissions provided from theopensearch-trigger-bot
instead of the defaultgithub-actions
, due to security limitations regarding forked repository pull requests (details on the limitations here).