From cd968074c94747014af6f0b0cf721e2b49c2f906 Mon Sep 17 00:00:00 2001 From: James Panther <4462786+jpanther@users.noreply.github.com> Date: Mon, 8 Nov 2021 10:26:12 +1100 Subject: [PATCH] =?UTF-8?q?=F0=9F=91=B7=20Add=20commit=20message=20checker?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/commit-msg.yml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 .github/workflows/commit-msg.yml diff --git a/.github/workflows/commit-msg.yml b/.github/workflows/commit-msg.yml new file mode 100644 index 00000000..6b02f868 --- /dev/null +++ b/.github/workflows/commit-msg.yml @@ -0,0 +1,24 @@ +name: Check Commit Messages +on: + pull_request: + types: + - opened + - edited + - reopened + - synchronize + +jobs: + check-commit-message: + name: Check Commit Messages + runs-on: ubuntu-latest + steps: + - name: Check Gitmoji + uses: gsactions/commit-message-checker@v1 + with: + pattern: ^[\u0020-\u007e\u00a0-\u00ff\u0152\u0153\u0178]+' + flags: "g" + error: "Commit messages must start with a Gitmoji character." + excludeDescription: "true" + excludeTitle: "true" + checkAllCommitMessages: "true" + accessToken: ${{ secrets.GITHUB_TOKEN }}