Skip to content
You're viewing an older version of this GitHub Action. Do you want to see the latest version instead?
git-pull-request

GitHub Action

pull request title validator

v1.3.1

pull request title validator

git-pull-request

pull request title validator

Checks whether a pull request title adheres to the conventional commit specification

Installation

Copy and paste the following snippet into your .yml file.

              

- name: pull request title validator

uses: kontrolplane/[email protected]

Learn more about this action in kontrolplane/pull-request-title-validator

Choose a version

pull-request-title-validator

The pull-request-title-validator GitHub Action helps ensuring that contributors provide informative and well-formatted titles - based on the conventional-commits specification. The titles of the pull request could then be used to create automated releases.

Example title

feat(client): add component
│    │        └─────── message
│    └──────────────── scope
└───────────────────── type

Example usage

The action can be used with both the pull_request and pull_request_target trigger.

Default

name: validate-pull-request-title

on:
  pull_request:
    types:
      - opened
      - edited
      - synchronize

permissions:
  pull-requests: read

jobs:
  validator:
    name: validate-pull-request-title
    runs-on: ubuntu-latest
    steps:
      - name: validate pull request title
        uses: kontrolplane/[email protected]

Custom types

name: validate-pull-request-title

on:
  pull_request:
    types:
      - opened
      - edited
      - synchronize

permissions:
  pull-requests: read

jobs:
  validator:
    name: validate-pull-request-title
    runs-on: ubuntu-latest
    steps:
      - name: validate pull request title
        uses: kontrolplane/[email protected]
        with:
          types: "fix,feat,chore"

Custom scopes

Scopes support regular expression patterns, allowing you to define specific patterns to match the scopes you want to allow. You can also separate multiple scopes using commas.

name: validate-pull-request-title

on:
  pull_request:
    types:
      - opened
      - edited
      - synchronize

permissions:
  pull-requests: read

jobs:
  validator:
    name: validate-pull-request-title
    runs-on: ubuntu-latest
    steps:
      - name: validate pull request title
        uses: kontrolplane/[email protected]
        with:
          scopes: "api,lang,parser,package/.+"