Skip to content
code

GitHub Action

commit meessage check

v2 Latest version

commit meessage check

code

commit meessage check

validate your commit messages, eg. check if they have the required story id

Installation

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

              

- name: commit meessage check

uses: uptownaravi/verify-commit-message-action@v2

Learn more about this action in uptownaravi/verify-commit-message-action

Choose a version

verify-commit-message-action

GitHub action to verify the commit messages

While we commit our code adding required commit message helps others understand the code and why its being added. This GitHub Action will help in validating the commit message as per the regex value passed The job will pass if the regex matches or exits with return code 1

Input Variables

Required:

regex: Pattern used to match with the commit message (python re format)

Example use case

Adding this action to a workflow file which checks the commit message for jira story id

on: [push]

jobs:
  commit-message-check-job:
    runs-on: ubuntu-latest
    name: commit-message-validation
    steps:
      - uses: actions/checkout@v3
      - id: foo
        uses: uptownaravi/verify-commit-message-action@v2
        with:
          regex: '(?i)jira-[0-9]{3,}'