Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Commit Guardian

Enforce Conventional Commits on your Pull Requests.

✅ Validates every commit in a PR follows the conventional format
✅ Optional PR title validation
✅ Configurable allowed types
✅ Works with both pull_request and push events

Usage

name: Commit Check
on: [pull_request]

jobs:
  check-commits:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
        with:
          fetch-depth: 0
      - uses: cedendahlkim/commit-guardian@v1
        with:
          check-pr-title: 'true'

Inputs

Input Description Default
check-pr-title Validate PR title true
allowed-types Comma-separated commit types feat,fix,docs,style,refactor,perf,test,build,ci,chore,revert
max-commits Max commits to check 100

Outputs

Output Description
commits-checked Number of commits checked
all-valid true if all commits pass
violation-count Number of violations found
violations JSON array of violations

Examples

Custom allowed types

- uses: cedendahlkim/commit-guardian@v1
  with:
    allowed-types: 'feat,fix,docs,wip'

Only check commits, not PR title

- uses: cedendahlkim/commit-guardian@v1
  with:
    check-pr-title: 'false'

Built by Gracestack — Swedish AI-powered DevOps tools.

🔗 More Actions: Swedish Tax Action · DevOps Automation Pack

About

GitHub Action to enforce Conventional Commits on your PRs

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages