Skip to content
Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

check-commit-messages

GitHub Action to validate commits messages in pull requests. Checks if commits contains a specific keyword. By default if atleast one commit contains the keyword the actions passes. There is an option to require all commits to contain the keyword.

Examples

Action passed sucessfully

Sucessful example of the action

Above is an example where the action passed.

Action failed require-all is set true

Failure example on require_all true

Above is an example where the action failed because only 1/2 commits contain the keyword JIRA-

Action failed require-all is set to false

Failure example on require_all false

Usage

An example on how to use this action in your workflows can be found under.

name: check commit messages

on:
  pull_request:
    branches: [master]

jobs:
  check:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
        with:
          fetch-depth: 0

      - name: Run commit message check
        uses: BetaTH13/check-commit@1.0.0
        with:
          keyword: "JIRA-"
          # optional defaults to false
          require-all: "true"

Inputs

Name Required Description
keyword Yes The keyword which needs to be contained in the commit message
require-all No If "false" only 1 commit needs to containt the commit message. If "true" all commit messages must contain the keyword

Issues

Found a bug or have a feature request? Please open an issue on the repository.

About

GitHub Action to check your commits for various things.

Resources

Stars

Watchers

Forks

Releases

Packages

Used by

Contributors

Languages