Skip to content

Commit 55f1af7

Browse files
authored
Automatically label PRs to main with backport-v8.x (#3879)
When the `main` branch switches over to `9.0`, we will want most PRs that are merged into `main` to also be backported to `8.x`. This PR makes this process easier by automatically adding the `backport-8.x` label to all PRs targeting the `main` branch. The exceptions will be PRs for changes that should _only_ be present in `9.0`. For such PRs, authors should simply remove the `backport-8.x` label from their PR.
1 parent 4a5846b commit 55f1af7

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

.mergify.yml

+18
Original file line numberDiff line numberDiff line change
@@ -259,3 +259,21 @@ pull_request_rules:
259259
labels:
260260
- "backport"
261261
title: "[{{ destination_branch }}](backport #{{ number }}) {{ title }}"
262+
- name: notify the backport policy
263+
conditions:
264+
- -label~=^backport
265+
- base=main
266+
- -merged
267+
- -closed
268+
actions:
269+
comment:
270+
message: |
271+
This pull request does not have a backport label. Could you fix it @{{author}}? 🙏
272+
To fixup this pull request, you need to add the backport labels for the needed
273+
branches, such as:
274+
* `backport-v./d./d./d` is the label to automatically backport to the `8./d` branch. `/d` is the digit
275+
**NOTE**: `backport-skip` has been added to this pull request.
276+
`backport-v8.x` has been added to help with the transition to the new branch 8.x.
277+
label:
278+
add:
279+
- backport-v8.x

0 commit comments

Comments
 (0)