.mergify.yml 8.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236
  1. # https://doc.mergify.io/
  2. pull_request_rules:
  3. - name: label changes from community
  4. conditions:
  5. - author≠@anza
  6. - author≠@monorepo-maintainers
  7. - author≠@monorepo-write
  8. - author≠@monorepo-triage
  9. - author≠mergify[bot]
  10. - author≠dependabot[bot]
  11. - author≠github-actions[bot]
  12. actions:
  13. label:
  14. add:
  15. - community
  16. - need:merge-assist
  17. - name: request review for community changes
  18. conditions:
  19. - author≠@anza
  20. - author≠@monorepo-maintainers
  21. - author≠@monorepo-write
  22. - author≠@monorepo-triage
  23. - author≠mergify[bot]
  24. - author≠dependabot[bot]
  25. - author≠github-actions[bot]
  26. # Only request reviews from the pr subscribers group if no one
  27. # has reviewed the community PR yet. These checks only match
  28. # reviewers with admin, write or maintain permission on the repository.
  29. - "#approved-reviews-by=0"
  30. - "#commented-reviews-by=0"
  31. - "#changes-requested-reviews-by=0"
  32. - "#review-requested=0"
  33. actions:
  34. request_reviews:
  35. teams:
  36. - "@anza-xyz/community-pr-subscribers"
  37. - name: label changes from monorepo-triage
  38. conditions:
  39. - author≠@anza
  40. - author≠mergify[bot]
  41. - author≠dependabot[bot]
  42. - author≠github-actions[bot]
  43. - author≠@monorepo-maintainers
  44. - author≠@monorepo-write
  45. - author=@monorepo-triage
  46. actions:
  47. label:
  48. add:
  49. - need:merge-assist
  50. - name: automatic merge (squash) on CI success
  51. conditions:
  52. - and:
  53. - status-success=buildkite/agave
  54. - status-success=ci-gate
  55. - label=automerge
  56. - label!=no-automerge
  57. - or:
  58. # only require docs checks if docs files changed
  59. - -files~=^docs/
  60. - status-success=build & deploy docs
  61. - or:
  62. - -files~=(\.rs|Cargo\.toml|Cargo\.lock|\.github/scripts/cargo-clippy-before-script\.sh|\.github/workflows/cargo\.yml)$
  63. - or:
  64. - check-success=clippy-nightly (macos-latest)
  65. - check-success=clippy-nightly (macos-latest-large)
  66. - or:
  67. - -files~=(\.rs|Cargo\.toml|Cargo\.lock|cargo-build-sbf|cargo-test-sbf|ci/downstream-projects/run-spl\.sh|\.github/workflows/downstream-project-spl\.yml)$
  68. - and:
  69. - status-success=check (associated-token-account)
  70. - status-success=check (feature-proposal)
  71. - status-success=check (instruction-padding)
  72. - status-success=check (memo)
  73. - status-success=check (record)
  74. - status-success=check (single-pool)
  75. - status-success=check (slashing)
  76. - status-success=check (stake-pool)
  77. - status-success=check (token-2022)
  78. - status-success=test_cli (single-pool)
  79. - status-success=test_cli (token-2022)
  80. - status-success=cargo-test-sbf (associated-token-account)
  81. - status-success=cargo-test-sbf (feature-proposal)
  82. - status-success=cargo-test-sbf (instruction-padding)
  83. - status-success=cargo-test-sbf (memo)
  84. - status-success=cargo-test-sbf (record)
  85. - status-success=cargo-test-sbf (single-pool)
  86. - status-success=cargo-test-sbf (slashing)
  87. - status-success=cargo-test-sbf (stake-pool)
  88. - status-success=cargo-test-sbf (token-2022)
  89. - or:
  90. - -files~=(Cargo\.toml|.github/workflows/crate-check\.yml|ci/check-crates\.sh)$
  91. - check-success=crate check
  92. actions:
  93. merge:
  94. method: squash
  95. - name: remove automerge label on CI failure
  96. conditions:
  97. - and:
  98. - label=automerge
  99. - "#status-failure!=0"
  100. - -merged
  101. actions:
  102. label:
  103. remove:
  104. - automerge
  105. comment:
  106. message: automerge label removed due to a CI failure
  107. - name: v2.3 feature-gate backport
  108. conditions:
  109. - label=v2.3
  110. - label=feature-gate
  111. actions:
  112. backport:
  113. assignees: &BackportAssignee
  114. - "{{ merged_by|replace('mergify[bot]', label|select('equalto', 'community')|first|default(author)|replace('community', '@anza-xyz/community-pr-subscribers')) }}"
  115. title: "{{ destination_branch }}: {{ title }} (backport of #{{ number }})"
  116. ignore_conflicts: true
  117. labels:
  118. - feature-gate
  119. branches:
  120. - v2.3
  121. - name: v2.3 non-feature-gate backport
  122. conditions:
  123. - label=v2.3
  124. - label!=feature-gate
  125. actions:
  126. backport:
  127. assignees: *BackportAssignee
  128. title: "{{ destination_branch }}: {{ title }} (backport of #{{ number }})"
  129. ignore_conflicts: true
  130. branches:
  131. - v2.3
  132. - name: v2.3 backport warning comment
  133. conditions:
  134. - label=v2.3
  135. actions:
  136. comment:
  137. message: >
  138. Backports to the stable branch are to be avoided unless absolutely
  139. necessary for fixing bugs, security issues, and perf regressions.
  140. Changes intended for backport should be structured such that a
  141. minimum effective diff can be committed separately from any
  142. refactoring, plumbing, cleanup, etc that are not strictly
  143. necessary to achieve the goal. Any of the latter should go only
  144. into master and ride the normal stabilization schedule.
  145. - name: v3.0 feature-gate backport
  146. conditions:
  147. - label=v3.0
  148. - label=feature-gate
  149. actions:
  150. backport:
  151. assignees: *BackportAssignee
  152. title: "{{ destination_branch }}: {{ title }} (backport of #{{ number }})"
  153. ignore_conflicts: true
  154. labels:
  155. - feature-gate
  156. branches:
  157. - v3.0
  158. - name: v3.0 non-feature-gate backport
  159. conditions:
  160. - label=v3.0
  161. - label!=feature-gate
  162. actions:
  163. backport:
  164. assignees: *BackportAssignee
  165. title: "{{ destination_branch }}: {{ title }} (backport of #{{ number }})"
  166. ignore_conflicts: true
  167. branches:
  168. - v3.0
  169. - name: v3.0 backport warning comment
  170. conditions:
  171. - label=v3.0
  172. actions:
  173. comment:
  174. message: >
  175. Backports to the beta branch are to be avoided unless absolutely
  176. necessary for fixing bugs, security issues, and perf regressions.
  177. Changes intended for backport should be structured such that a
  178. minimum effective diff can be committed separately from any
  179. refactoring, plumbing, cleanup, etc that are not strictly
  180. necessary to achieve the goal. Any of the latter should go only
  181. into master and ride the normal stabilization schedule. Exceptions
  182. include CI/metrics changes, CLI improvements and documentation
  183. updates on a case by case basis.
  184. - name: Reminder to update RPC clients for changes in `rpc/`
  185. conditions:
  186. - or:
  187. - files~=^rpc/src/rpc\.rs$
  188. - files~=^rpc/src/rpc_pubsub\.rs$
  189. - files~=^rpc-client-api/src/.*\.rs$
  190. actions:
  191. comment:
  192. message: |
  193. If this PR represents a change to the public RPC API:
  194. 1. Make sure it includes a complementary update to `rpc-client/` ([example](https://github.com/solana-labs/solana/pull/29558/files))
  195. 2. Open a follow-up PR to update the JavaScript client `@solana/kit` ([example](https://github.com/solana-labs/solana-web3.js/pull/2868/files))
  196. Thank you for keeping the RPC clients in sync with the server API @{{author}}.
  197. - name: Reminder to add Firedancer team to changes in `programs/`
  198. conditions:
  199. - or:
  200. - files~=^programs/address-lookup-table/src/.*\.rs$
  201. - files~=^programs/bpf_loader/src/.*\.rs$
  202. - files~=^programs/compute_budget/src/.*\.rs$
  203. - files~=^programs/config/src/.*\.rs$
  204. - files~=^programs/loader-v4/src/.*\.rs$
  205. - files~=^programs/stake/src/.*\.rs$
  206. - files~=^programs/system/src/.*\.rs$
  207. - files~=^programs/vote/src/.*\.rs$
  208. - files~=^programs/zk-elgamal-proof/src/.*\.rs$
  209. actions:
  210. comment:
  211. message: |
  212. The Firedancer team maintains a line-for-line reimplementation of the
  213. native programs, and until native programs are moved to BPF, those
  214. implementations must exactly match their Agave counterparts.
  215. If this PR represents a change to a native program implementation (not
  216. tests), please include a reviewer from the Firedancer team. And please
  217. keep refactors to a minimum.
  218. - name: Notify about the deprecation of zk-token-sdk
  219. conditions:
  220. - or:
  221. - files~=^zk-token-sdk/
  222. actions:
  223. comment:
  224. message: |
  225. For your information, the `solana-zk-token-sdk` is deprecated, and this
  226. directory will be removed in a future version. Please take this in mind
  227. when making modifications.
  228. commands_restrictions:
  229. # The author of copied PRs is the Mergify user.
  230. # Restrict `copy` access to Core Contributors
  231. copy:
  232. conditions:
  233. - author=@anza