config.yml 3.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. ## @file
  2. # Mergify YML file that automatically merges a GitHub pull request against
  3. # edk2-ci if all of the GitHub branch protections have passed. It also
  4. # contains rules to:
  5. # * auto close branches that are not from an EDK II Maintainer
  6. # * post a comment on pull requests that have merge conflicts.
  7. # * post a comment on pull requests that have PatchCheck.py errors.
  8. #
  9. # Configuration Notes:
  10. # * Update the 'base=edk2-ci' statements with the name of the branch to merge
  11. # pull requests.
  12. #
  13. # * Update the 'status-failure' statement with the name of the name of the Azure
  14. # Pipelines Build that performs the EDK II Maintainer check.
  15. #
  16. # * This file must be checked into the 'default' branch of a repo. Copies
  17. # of this file on other branches of a repo are ignored by Mergify.
  18. #
  19. # Copyright (c) 2019, Intel Corporation. All rights reserved.<BR>
  20. # SPDX-License-Identifier: BSD-2-Clause-Patent
  21. #
  22. # https://github.com/apps/mergify
  23. # https://doc.mergify.io/
  24. #
  25. ##
  26. pull_request_rules:
  27. - name: Automatically merge a PR when all required checks pass and 'push' label is present
  28. conditions:
  29. - base=master
  30. - label=push
  31. - author=@tianocore/edk-ii-maintainers
  32. - status-success=tianocore.PatchCheck
  33. - status-success=Ubuntu GCC5 PR
  34. - status-success=Windows VS2019 PR
  35. actions:
  36. merge:
  37. strict: true
  38. method: rebase
  39. - name: Automatically close a PR when all required checks pass and 'push' label is not present
  40. conditions:
  41. - base=master
  42. - -label=push
  43. - -closed
  44. - status-success=tianocore.PatchCheck
  45. - status-success=Ubuntu GCC5 PR
  46. - status-success=Windows VS2019 PR
  47. - status-success=Ubuntu GCC5 PR (FINISHED)
  48. - status-success=Windows VS2019 PR (FINISHED)
  49. actions:
  50. close:
  51. message: All checks passed. Auto close personal build.
  52. - name: Post a comment on a PR that can not be merged due to a merge conflict
  53. conditions:
  54. - base=master
  55. - conflict
  56. actions:
  57. comment:
  58. message: PR can not be merged due to conflict. Please rebase and resubmit
  59. - name: Automatically close a PR that fails the EDK II Maintainers membership check and 'push' label is present
  60. conditions:
  61. - base=master
  62. - label=push
  63. - -author=@tianocore/edk-ii-maintainers
  64. actions:
  65. close:
  66. message: PR submitter is not a member of the Tianocore EDK II Maintainers team
  67. - name: Post a comment on a PR if PatchCheck fails
  68. conditions:
  69. - base=master
  70. - status-failure=tianocore.PatchCheck
  71. actions:
  72. comment:
  73. message: PR can not be merged due to a PatchCheck failure. Please resolve and resubmit
  74. - name: Post a comment on a PR if Ubuntu GCC5 fails
  75. conditions:
  76. - base=master
  77. - status-failure=Ubuntu GCC5 PR
  78. - status-success=Ubuntu GCC5 PR (FAILED)
  79. actions:
  80. comment:
  81. message: PR can not be merged due to an Ubuntu GCC5 failure. Please resolve and resubmit
  82. - name: Post a comment on a PR if Windows VS2019 fails
  83. conditions:
  84. - base=master
  85. - status-failure=Windows VS2019 PR
  86. - status-success=Windows VS2019 PR (FAILED)
  87. actions:
  88. comment:
  89. message: PR can not be merged due to a Windows VS2019 failure. Please resolve and resubmit