From 1ce4c81cbde4bbe3e15455ab83a67ad74211d07e Mon Sep 17 00:00:00 2001 From: Hsu Zhong Jun <27919917+dcshzj@users.noreply.github.com> Date: Mon, 30 Sep 2024 20:14:11 +0800 Subject: [PATCH] ci(Mergify): configuration update Signed-off-by: Hsu Zhong Jun --- .mergify.yml | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/.mergify.yml b/.mergify.yml index 0c1a0c10..83719679 100644 --- a/.mergify.yml +++ b/.mergify.yml @@ -1,15 +1,27 @@ pull_request_rules: + - name: Automatically decline PRs to main that do not come from the staging branch + description: The main branch cannot contain additional commits not present in + the staging branch. + conditions: + - base = main + - head != staging + actions: + review: + type: REQUEST_CHANGES + close: + message: Please make your changes directly on the staging branch and create the + pull request from the staging branch to main! - name: Automatically merge safe indirection PRs description: Merge when PR contains additions made by the backend CMS on site launch conditions: - base = main - head = staging - files~=^dns/ - - '#commits = 1' - - '#files = 1' - - '#added-lines = 34' - - '#deleted-lines = 0' + - "#commits = 1" + - "#files = 1" + - "#added-lines = 34" + - "#deleted-lines = 0" actions: review: type: APPROVE - merge: + merge: