From 7d6e610d4580c309d0d0176f25f47dfb909b84f5 Mon Sep 17 00:00:00 2001 From: Lin Yang Date: Mon, 30 Dec 2024 15:29:54 +0800 Subject: [PATCH 1/2] ci(Mergify): configuration update Signed-off-by: Lin Yang --- .mergify.yml | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/.mergify.yml b/.mergify.yml index 6f66433..e6b0076 100644 --- a/.mergify.yml +++ b/.mergify.yml @@ -1,14 +1,4 @@ pull_request_rules: - - name: Ping PR author when conflicting - description: Warn the pull request author when their PR are conflicting - conditions: - - conflict - - -closed - actions: - comment: - message: > - 👋 {{author}} your PR is conflicting and needs to be updated to be - merged - name: Automatic squash and merge when CI passes and reviews approve conditions: - base=main @@ -37,3 +27,12 @@ pull_request_rules: label: add: - auto-squash +merge_protections: + - name: Enforce conventional commit + description: Make sure that we follow https://www.conventionalcommits.org/en/v1.0.0/ + if: + - base = main + success_conditions: + - "title ~= ^(\\[wip\\]|\\[backport\\]|\\[cherry-pick\\])?( + )?(fix|feat|docs|style|refactor|perf|test|build|ci|chore|revert)(?:\\(.+\ + \\))?:" From f7cf45657a252e70900764dbe53f2543d75e2ad5 Mon Sep 17 00:00:00 2001 From: Lin Yang Date: Mon, 30 Dec 2024 15:34:28 +0800 Subject: [PATCH 2/2] Update .mergify.yml Signed-off-by: Lin Yang --- .mergify.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.mergify.yml b/.mergify.yml index e6b0076..f00fe0a 100644 --- a/.mergify.yml +++ b/.mergify.yml @@ -1,4 +1,14 @@ pull_request_rules: + - name: Ping PR author when conflicting + description: Warn the pull request author when their PR are conflicting + conditions: + - conflict + - -closed + actions: + comment: + message: > + 👋 {{author}} your PR is conflicting and needs to be updated to be + merged - name: Automatic squash and merge when CI passes and reviews approve conditions: - base=main