Skip to content

aeong98/Pull-Request-Labeler

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Repository files navigation

Pull-Request Labeler

github action file example (for use)

input

  • repo-token: your github secret token
  • config-pathname : pathname of your config file
name: PR Branch Labeler

on: pull_request

jobs:
  label_prs:
    runs-on: ubuntu-latest
    steps:
      - name: Label PRs
        uses: aeong98/Pull-Request-Labeler@v1
        with:
          repo-token: ${{ secrets.GITHUB_TOKEN }}
          config-pathname: .github/pr-branch-labeler.yml

config file example

develop:
  base: ["develop/*", "develop*", "develop"]
release:
  base: ["main"]
feature:
  head: ["feature/*", "feat/*"]
fix:
  head: ["bugfix/*", "fix/*"]
hotfix:
  head: "hotfix/*"
enhancement:
  base: ["feature/*"]
  head: ["enhance/*", "enhancement/*"]