From b146c8af57bd5abe8964ba801ff3ae58e7d769d5 Mon Sep 17 00:00:00 2001 From: Charly Laurent Date: Wed, 8 Nov 2023 11:34:54 +0100 Subject: [PATCH] ci: add conventional commit post_check --- .mergify.yml | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/.mergify.yml b/.mergify.yml index 2d3b37d..feaf6eb 100644 --- a/.mergify.yml +++ b/.mergify.yml @@ -38,7 +38,7 @@ pull_request_rules: conditions: - base=main - label!=manual merge - - check-success=semantic-pull-request + - "check-success=Rule: Conventional Commit (post_check)" actions: queue: @@ -55,3 +55,22 @@ pull_request_rules: request_reviews: teams: - devs + + - name: Conventional Commit + conditions: + - base=main + actions: + post_check: + success_conditions: + - "title ~= ^(fix|feat|docs|style|refactor|perf|test|build|ci|chore|revert)(?:\\(.+\\))?:" + title: | + {% if check_succeed %} + Title follows Conventional Commit + {% else %} + Title does not follow Conventional Commit + {% endif %} + summary: | + {% if not check_succeed %} + The pull request title must follow + [Conventional Commit](https://www.conventionalcommits.org/en/v1.0.0/). + {% endif %}