Skip to content

Hublo PR Labeler

Actions
Automatically labels your PRs based on the commit message
v1.0.2
Latest
Star (1)

Hublo PR Labeler

A GitHub Action that automatically applies labels to your PRs based on commit message patterns like feature* or fix*. Can be used in combination with Release Drafter to automatically categorize pull requests.

Usage

Add .github/workflows/hublo-pr-labeler.yml with the following:

name: PR Labeler
on:
  pull_request:
    types: [opened]

jobs:
  pr-labeler:
    runs-on: ubuntu-latest
    steps:
      - uses: jonathanhublo/hublo-labeler-action@v1
        with:
          configuration-path: .github/hublo-pr-labeler.yml # optional, .github/hublo-pr-labeler.yml is the default value
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Configuration

Configure by creating a .github/hublo-pr-labeler.yml file.

For example:

feature: ['feature/*', 'feat/*']
fix: fix/*
chore: chore/*
fixed-branch: fixed-branch-name

Then if a pull request is opened with a message like feat(emoji): add emoji support the Action will automatically apply the feature label.

Wildcard in configuration

You can use * as a wildcard for matching multiple names. See https://www.npmjs.com/package/matcher for more information about wildcard options.

Default configuration

When no configuration is provided, the following defaults will be used:

feature: ['feature*', 'feat*', 'enhancement*'],
bug: 'fix*',
maintenance: ['chore*', 'style*', 'refactor*', 'build*', 'perf*', 'test*', 'ci*'],
documentation: 'docs*',
revert: 'revert*'

Contributions of any kind welcome!

Hublo PR Labeler is not certified by GitHub. It is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.

About

Automatically labels your PRs based on the commit message
v1.0.2
Latest

Hublo PR Labeler is not certified by GitHub. It is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.