--- /dev/null
+## @file\r
+# Mergify YML file that automatically merges a GitHub pull request against\r
+# edk2-ci if all of the GitHub branch protections have passed. It also\r
+# contains rules to:\r
+# * auto close branches that are not from an EDK II Maintainer\r
+# * post a comment on pull requests that have merge conflicts.\r
+# * post a comment on pull requests that have PatchCheck.py errors.\r
+#\r
+# Configuration Notes:\r
+# * Update the 'base=edk2-ci' statements with the name of the branch to merge\r
+# pull requests.\r
+#\r
+# * Update the 'status-failure' statement with the name of the name of the Azure\r
+# Pipelines Build that performs the EDK II Maintainer check.\r
+#\r
+# * 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, Intel Corporation. All rights reserved.<BR>\r
+# SPDX-License-Identifier: BSD-2-Clause-Patent\r
+#\r
+# https://github.com/apps/mergify\r
+# https://doc.mergify.io/\r
+#\r
+##\r
+\r
+pull_request_rules:\r
+\r
+ - name: Automatically merge a PR when all required checks pass and 'push' label is present\r
+ conditions:\r
+ - base=master\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
+ 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\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
+\r
+ - name: Post a comment on a PR that can not be merged due to a merge conflict\r
+ conditions:\r
+ - base=master\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\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\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\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\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