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

GitHub Action

Convetional Commits Pull Request

v1.0.0

Convetional Commits Pull Request

align-left

Convetional Commits Pull Request

Lints a pull request title based on Conventional Commits

Installation

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

              

- name: Convetional Commits Pull Request

uses: jef/[email protected]

Learn more about this action in jef/conventional-commits-pr-action

Choose a version

conventional-commits-pr-action

Lints pull requests based on Conventional Commits v1.0.0.

Also has the ability to post a comment in the pull request conversation with examples.

image

Live examples:

Usage

name: Pull Request Linter
on:
  pull_request:
    types:
      - opened
      - edited
      - reopened
jobs:
  lint:
    name: Lint pull request title
    runs-on: self-hosted
    steps:
      - name: Lint pull request title
        uses: jef/conventional-commits-pr-action@v1
        with:
          token: ${{ secrets.GITHUB_TOKEN }}

Inputs

  • comment: Post a comment in the pull request conversation with examples. Default is true.
  • token [Required]: Access token to the repository. Usually ${{ secrets.GITHUB_TOKEN }}.

Outputs

None.

Contributing

There are few npm tasks that will help you in building and packaging. All commands are prefaced by npm run.

  • build: builds the action.
  • compile: transpiles TypeScript.
  • clean: removes build directory.
  • fix: fixes lint and format issues.
  • lint: runs linter and checks format issues.
  • start: runs the action.
  • test: tests the action.