Skip to content

Instantly share code, notes, and snippets.

@mattbailey
Created May 18, 2022 15:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mattbailey/acd2c302c463c116762f0153b7eaf184 to your computer and use it in GitHub Desktop.
Save mattbailey/acd2c302c463c116762f0153b7eaf184 to your computer and use it in GitHub Desktop.
github workflow action for conventional commit checking
# This action makes PRs require conventional commits in both
# the pull request title, and commit message.
#
# See: https://github.com/conventional-changelog/commitlint/tree/master/%40commitlint/config-conventional
name: commitlint
on:
pull_request:
types: ["opened", "edited", "reopened", "synchronize"]
jobs:
commitlint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
with:
fetch-depth: 0
- run: |
npm install @commitlint/config-conventional
echo "module.exports = {extends: ['@commitlint/config-conventional']};" > commitlint.config.js
- uses: wagoid/commitlint-github-action@v4
- uses: JulienKode/pull-request-name-linter-action@v0.4.0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment