From d4cae8d42330acbe7159562e97e4fbae21e3afe6 Mon Sep 17 00:00:00 2001 From: Houssem Ben Ali Date: Fri, 16 Dec 2022 11:15:26 +0100 Subject: [PATCH] Introduce Commit message validation actions --- .github/actions/validate_commit_msg.yaml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 .github/actions/validate_commit_msg.yaml diff --git a/.github/actions/validate_commit_msg.yaml b/.github/actions/validate_commit_msg.yaml new file mode 100644 index 00000000..163491f6 --- /dev/null +++ b/.github/actions/validate_commit_msg.yaml @@ -0,0 +1,21 @@ + +name: Check Commit Message + +on: + workflow_call: + +jobs: + validate-commit-message: + name: Validate Commit Message + runs-on: ubuntu-latest + steps: + - name: Validate Commit Message Content + uses: gsactions/commit-message-checker@v2 + with: + pattern: '^(fix|feat): [\w ]+ - (MEED|EXO)(-[0-9]+)+( - Meeds-io\/MIPs#[0-9]+)?$' + excludeDescription: 'true' + excludeTitle: 'true' + error: | + Each commit message must contain fix:|feature: - (MEED|EXO)(-[0-9]+)+( - Meeds-io\/MIPs#[0-9]+)?$: + For how to rename your commit message, follow this GitHub Doc: + https://docs.github.com/en/pull-requests/committing-changes-to-your-project/creating-and-editing-commits/changing-a-commit-message \ No newline at end of file