axonops / axonops-workbench

AxonOps™ Workbench for Apache Cassandra® - Desktop application for Mac, Windows and Linux
https://axonops.com
Apache License 2.0
10 stars 0 forks source link

[feat]: Enforce commit message linting so it always includes the github issue in the commit message #465

Open millerjp opened 2 days ago

millerjp commented 2 days ago

This is usually done to maintain consistency, improve readability, and facilitate integration with other tools like issue trackers and release management systems.

Looks like there is a Github app to do this

https://www.systango.com/blog/github-commit-messages-lint-reinforce-your-commits-with-git-hooks

Or if the app doesnt work we could try a commit message linting action

name: Commit Message Lint

on:
  pull_request:
    types: [opened, edited, reopened, synchronize]

jobs:
  lint:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
      - name: Lint Commit Messages
        run: |
          git log --format=%B ${{ github.event.pull_request.base.sha }}..${{ github.event.pull_request.head.sha }} | grep -qE '#[0-9]+'
        shell: bash