]> git.proxmox.com Git - mirror_edk2.git/commitdiff
.mergify: Simplify Mergify rules using GitHub status checks
authorMichael D Kinney <michael.d.kinney@intel.com>
Wed, 7 Jul 2021 23:30:21 +0000 (16:30 -0700)
committerMichael Kinney <michael.d.kinney@intel.com>
Fri, 9 Jul 2021 22:57:46 +0000 (15:57 -0700)
* Enable Mergify queue feature to support auto rebase when
  'push' label is set and gauarntee that all EDK II CI checks
  are run before merging in changes with linear history.
* Use status checks configured in GitHub branch protections
* Allow non EDK II Maintainers to create a PR
  Requires an EDK II Maintainer to accept the change and
  request merge by adding 'push' label.  Only EDK II Maintainers
  have ability to set/clear labels.
* Do not automatically close PRs for personal builds.

Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Sean Brogan <sean.brogan@microsoft.com>
Cc: Bret Barkelew <Bret.Barkelew@microsoft.com>
Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
Acked-by: Bret Barkelew <bret.barkelew@microsoft.com>
Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>
.mergify/config.yml

index 9774aaf4977415bef562a61ea2d1f9e9a4edc907..bd6da4c779371ad681a385824bfb673a7be6fcf4 100644 (file)
@@ -16,7 +16,7 @@
 # * This file must be checked into the 'default' branch of a repo.  Copies\r
 #   of this file on other branches of a repo are ignored by Mergify.\r
 #\r
-# Copyright (c) 2019 - 2020, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) 2019 - 2021, Intel Corporation. All rights reserved.<BR>\r
 # SPDX-License-Identifier: BSD-2-Clause-Patent\r
 #\r
 # https://github.com/apps/mergify\r
 #\r
 ##\r
 \r
-pull_request_rules:\r
+queue_rules:\r
+  - name: default\r
+    conditions:\r
+      - base~=(^main|^master|^stable/)\r
+      - label=push\r
 \r
+pull_request_rules:\r
   - name: Automatically merge a PR when all required checks pass and 'push' label is present\r
     conditions:\r
-      - base~=(^master|^stable/)\r
+      - base~=(^main|^master|^stable/)\r
       - label=push\r
-      - author=@tianocore/edk-ii-maintainers\r
-      - status-success=tianocore.PatchCheck\r
-      - status-success=Ubuntu GCC5 PR\r
-      - status-success=Windows VS2019 PR\r
     actions:\r
-      merge:\r
-        strict: true\r
+      queue:\r
         method: rebase\r
-\r
-  - name: Automatically close a PR when all required checks pass and 'push' label is not present\r
-    conditions:\r
-      - base~=(^master|^stable/)\r
-      - -label=push\r
-      - -closed\r
-      - status-success=tianocore.PatchCheck\r
-      - status-success=Ubuntu GCC5 PR\r
-      - status-success=Windows VS2019 PR\r
-      - status-success=Ubuntu GCC5 PR (FINISHED)\r
-      - status-success=Windows VS2019 PR (FINISHED)\r
-    actions:\r
-      close:\r
-        message: All checks passed. Auto close personal build.\r
+        rebase_fallback: none\r
+        name: default\r
 \r
   - name: Post a comment on a PR that can not be merged due to a merge conflict\r
     conditions:\r
-      - base~=(^master|^stable/)\r
+      - base~=(^main|^master|^stable/)\r
       - conflict\r
     actions:\r
       comment:\r
         message: PR can not be merged due to conflict.  Please rebase and resubmit\r
-\r
-  - name: Automatically close a PR that fails the EDK II Maintainers membership check and 'push' label is present\r
-    conditions:\r
-      - base~=(^master|^stable/)\r
-      - label=push\r
-      - -author=@tianocore/edk-ii-maintainers\r
-    actions:\r
-      close:\r
-        message: PR submitter is not a member of the Tianocore EDK II Maintainers team\r
-\r
-  - name: Post a comment on a PR if PatchCheck fails\r
-    conditions:\r
-      - base~=(^master|^stable/)\r
-      - status-failure=tianocore.PatchCheck\r
-    actions:\r
-      comment:\r
-        message: PR can not be merged due to a PatchCheck failure.  Please resolve and resubmit\r
-\r
-  - name: Post a comment on a PR if Ubuntu GCC5 fails\r
-    conditions:\r
-      - base~=(^master|^stable/)\r
-      - status-failure=Ubuntu GCC5 PR\r
-      - status-success=Ubuntu GCC5 PR (FAILED)\r
-    actions:\r
-      comment:\r
-        message: PR can not be merged due to an Ubuntu GCC5 failure.  Please resolve and resubmit\r
-\r
-  - name: Post a comment on a PR if Windows VS2019 fails\r
-    conditions:\r
-      - base~=(^master|^stable/)\r
-      - status-failure=Windows VS2019 PR\r
-      - status-success=Windows VS2019 PR (FAILED)\r
-    actions:\r
-      comment:\r
-        message: PR can not be merged due to a Windows VS2019 failure.  Please resolve and resubmit\r