Skip to content

commit message check

Actions
check if commit messages follow the conventions
v3
Latest
Star (3)

commits

hii these are the commit conventions (and tools) that i use in my projects

see CONVENTIONS.md for details

check-commit-message

this is a bash script to validate your commit messages before pushing

you can run the latest version directly with

curl -sSL https://commits.adamperkowski.dev |
  SCOPES="scope1 scope2" \
  bash -s -- \
  "<message>"

usage

# check last git commit
SCOPES="scope1 scope2" check-commit-message "$(git log -1 --pretty=%B)"

environment variables

name description required
SCOPES array of allowed scopes (empty = any scope allowed) no

github actions

you can use check-commit-message in your github actions workflows

- name: check commit message
  uses: adamperkowski/commits@main
  with:
    scopes: 'scope1,scope2'

woodpecker

you can use the docker image in your woodpecker ci pipelines

- name: check commit message
  image: ghcr.io/adamperkowski/commits:latest
  environment:
    SCOPES: "scope1 scope2"
  commands:
    - check-commit-message "$(git log -1 --pretty=%B)"

docker

you can run the docker image directly

docker run --rm -e 'SCOPES="scope1 scope2"' \
  ghcr.io/adamperkowski/commits:latest \
  check-commit-message "<message>"

commit message check 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

check if commit messages follow the conventions
v3
Latest

commit message check 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.