5
0
Fork 0
mirror of https://github.com/wagoid/commitlint-github-action.git synced 2025-11-07 08:06:54 +00:00
Lints Pull Request commits with commitlint
Find a file
Wagner Santos aa3e7ae63b fix: also check range of commits for push events
This covers the case when sending multiple commits together in ome push.
2019-11-23 18:33:59 -03:00
.github/workflows fix: lerna scopes not working due to missing lerna dependency 2019-10-18 16:44:52 -03:00
.commitlintrc-with-lerna-scopes.yml fix: lerna scopes not working due to missing lerna dependency 2019-10-18 16:44:52 -03:00
.commitlintrc.yml test: add second commitlint check using yml file instead of js 2019-10-08 13:19:58 -03:00
.dockerignore fix: lerna scopes not working due to missing lerna dependency 2019-10-18 16:44:52 -03:00
.gitignore Initial commit 2019-10-01 18:29:56 -03:00
.prettierrc feat: add commitlint action 2019-10-04 00:17:29 -03:00
action.yml chore(release): publish 2019-10-21 15:18:17 +01:00
CHANGELOG.md chore(release): publish 2019-10-21 15:18:17 +01:00
commitlint.config.js chore: add commitlint config file 2019-10-04 00:18:00 -03:00
Dockerfile fix: revert action to use debian image 2019-10-04 00:47:40 -03:00
entrypoint.sh feat: add commitlint action 2019-10-04 00:17:29 -03:00
LICENSE Initial commit 2019-10-01 18:29:56 -03:00
package-lock.json fix: also check range of commits for push events 2019-11-23 18:33:59 -03:00
package.json fix: also check range of commits for push events 2019-11-23 18:33:59 -03:00
README.md chore(release): publish 2019-10-21 15:18:17 +01:00
run.js fix: also check range of commits for push events 2019-11-23 18:33:59 -03:00

Commitlint Github Action

Lints Pull Request commits with commitlint

Usage

Create a github workflow in the .github folder, e.g. .github/workflows/commitlint.yml:

name: Commitlint
on: [pull_request]

jobs:
  lint:
    runs-on: ubuntu-latest
    env:
      GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
    steps:
      - uses: actions/checkout@v1
      - uses: wagoid/commitlint-github-action@v1.2.2

Alternatively, you can run on other event types such as on: [push]. In that case the action will lint the current commit instead of linting all commits from a pull request.

Inputs

configFile

The path to your commitlint config file. Default commitlint.config.js.

firstParent

When set to true, we follow only the first parent commit when seeing a merge commit.

This helps to ignore errors in commits that were already present in your default branch (e.g. master) before adding conventional commit checks. More info in git-log docs.

Default true

About extends in your config file

This is a Docker action, and was made like this so that you can run it with minimum setup, regardless of your repo's environment. It comes packed with the most famous shared configurations that you can use in your commitlint config's extends field:

If you have a custom shared config that lies in a private registry, let us know! We will be happy to cover this case if necessary.