PR labeler - commit based
Version updated for AntonioGally/ag-pr-labeler to version v0.1.0.
- This publisher is shown as ‘verified’ by GitHub.
- This action is used across all versions by 1 repositories.
Go to the GitHub Marketplace to find the latest changes.
Release notes
Usage
Include this action in your workflow file. Here is an example:
on:
pull_request:
types: [opened] #only closed pr
jobs:
labeler:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Run label CI
uses: AntonioGally/ag-pr-labeler/@main
with:
createRepoLabels: true
githubToken: ${{ secrets.GITHUB_TOKEN }} #Github default token, PATs are recomended
Observations
This action uses the conventional commits guideline to add labels. The code read all commits inside the PR and with regex, extract the type of each commit. For each commit type, one label is added. Besides that, if you’re merging a branch with the prefix itsm
or hotfix
, will be added labels for those as well.