From af145d1719eac4b41b9b42369dfc2b30095b2e68 Mon Sep 17 00:00:00 2001 From: Kevin Boulongne Date: Mon, 25 Nov 2024 13:31:14 +0100 Subject: [PATCH] ci: Add conventional commits --- .github/workflows/semantic-commit.yml | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 .github/workflows/semantic-commit.yml diff --git a/.github/workflows/semantic-commit.yml b/.github/workflows/semantic-commit.yml new file mode 100644 index 000000000..63b9ed756 --- /dev/null +++ b/.github/workflows/semantic-commit.yml @@ -0,0 +1,23 @@ +name: 'PR and Commit Message Check' +on: + pull_request_target: + types: + - opened + - edited + - reopened + - synchronize + +jobs: + check-commit-message: + name: Check Commit Message + runs-on: ubuntu-latest + steps: + - name: Check Commit Message + uses: gsactions/commit-message-checker@v2 + with: + pattern: '^Merge .+|(^(feat|fix|chore|docs|style|refactor|perf|ci|test)(\(.+\))?: [A-Z0-9].+)' + error: 'Commit messages and PR title should match conventional commit convention and start with an uppercase.' + excludeDescription: 'true' + excludeTitle: 'false' + checkAllCommitMessages: 'true' + accessToken: ${{ secrets.GITHUB_TOKEN }}