Skip to content

bugbundle/commits

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

10 Commits
 
 
 
 
 
 

Repository files navigation

Commits linter

Checks the commits made by developers in a repository to ensure they adhere to conventional commits.

How to use

name: Check current commit
on: [push]

jobs:
  dev:
    runs-on: ubuntu-22.04
    steps:
      - uses: actions/checkout@v3
      - uses: bugbundle/commits@v1.1.0

Note You can check previous commits by adding the fetch-depth parameter while using actions/checkout.

Inputs

  • git-range, default 'HEAD': Range of commits.

Outputs

  • patch, Count of patch commits
  • minor, Count of minor commits
  • major, Count of major commits

Pull request integration

name: Check current commit
on: [pull_request]

jobs:
  dev:
    runs-on: ubuntu-22.04
    steps:
      - uses: actions/checkout@v3
        with:
          fetch-depth: ${{ github.event.pull_request.commits }}
          ref: ${{ github.event.pull_request.head.sha }}
      - uses: bugbundle/commits@v1.1.0
        id: commits
      - run: echo ${{ steps.commits.outputs.major }}.${{ steps.commits.outputs.minor }}.${{ steps.commits.outputs.patch }}