From a4305cbcc7b74b0912c5f8525a9c76870ed759e7 Mon Sep 17 00:00:00 2001 From: Ariel Valentin Date: Sat, 6 Jan 2024 19:58:55 -0600 Subject: [PATCH] ci: Add Conventional Commit Linter I have made too many mistakes approving and merging PRs that lack conventional commits. This Action should mitigate those mistakes going forward. --- .github/workflows/conventional-commits.yaml | 43 +++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 .github/workflows/conventional-commits.yaml diff --git a/.github/workflows/conventional-commits.yaml b/.github/workflows/conventional-commits.yaml new file mode 100644 index 0000000000..244243b48d --- /dev/null +++ b/.github/workflows/conventional-commits.yaml @@ -0,0 +1,43 @@ +name: Conventional Commits Validation + +on: + workflow_dispatch: + push: + branches: + - main + pull_request: + types: + - opened + - synchronize + - reopened + - edited + +permissions: + contents: write + pull-requests: read + +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number }} # Ensure that only one instance of this workflow is running per Pull Request + cancel-in-progress: true # Cancel any previous runs of this workflow + +jobs: + validate-commits: + name: Conventional Commits Validation + runs-on: ubuntu-latest + steps: + - uses: dev-build-deploy/commit-me@v1.2.0 + with: + update-labels: false # OPTIONAL; do not update the Pull Request labels based on the Conventional Commits information. + include-commits: true + token: ${{ secrets.GITHUB_TOKEN }} + types: | + chore + ci + docs + feat + fix + perf + refactor + release + squash + test