Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[mergify] notify if no backport labels on the PRs targeting the master branch #28022

Merged
merged 2 commits into from
Sep 22, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .backportrc.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"upstream": "elastic/beats",
"branches": [ { "name": "7.x", "checked": true }, "7.15", "7.14", "7.13", "7.12" ],
"branches": [ { "name": "7.x", "checked": true }, "7.15", "7.14" ],
"labels": ["backport"],
"autoAssign": true,
"prTitle": "Cherry-pick to {targetBranch}: {commitMessages}"
Expand Down
94 changes: 42 additions & 52 deletions .mergify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,45 +12,6 @@ pull_request_rules:
labels:
- "backport"
title: "[{{ destination_branch }}](backport #{{ number }}) {{ title }}"
- name: backport patches to 7.x branch
conditions:
- merged
- label=backport-v7.16.0
actions:
backport:
assignees:
- "{{ author }}"
branches:
- "7.x"
labels:
- "backport"
title: "[{{ destination_branch }}](backport #{{ number }}) {{ title }}"
- name: backport patches to 7.13 branch
conditions:
- merged
- label=backport-v7.13.0
actions:
backport:
assignees:
- "{{ author }}"
branches:
- "7.13"
labels:
- "backport"
title: "[{{ destination_branch }}](backport #{{ number }}) {{ title }}"
- name: backport patches to 7.12 branch
conditions:
- merged
- label=backport-v7.12.0
actions:
backport:
assignees:
- "{{ author }}"
branches:
- "7.12"
labels:
- "backport"
title: "[{{ destination_branch }}](backport #{{ number }}) {{ title }}"
- name: ask to resolve conflict
conditions:
- conflict
Expand Down Expand Up @@ -106,19 +67,6 @@ pull_request_rules:
- files~=^\.go-version$
actions:
delete_head_branch:
- name: backport patches to 7.14 branch
conditions:
- merged
- label=backport-v7.14.0
actions:
backport:
assignees:
- "{{ author }}"
branches:
- "7.14"
labels:
- "backport"
title: "[{{ destination_branch }}](backport #{{ number }}) {{ title }}"
- name: automatic approval for mergify pull requests with changes in bump-rules
conditions:
- author=mergify[bot]
Expand Down Expand Up @@ -151,6 +99,48 @@ pull_request_rules:
- files~=^\.mergify\.yml$
actions:
delete_head_branch:
- name: notify the backport policy
conditions:
- -label~=^backport
- base=master
actions:
comment:
message: |
This pull request does not have a backport label. Could you fix it @{{author}}? 🙏
To fixup this pull request, you need to add the backport labels for the needed
branches, such as:
* `backport-v./d./d./d` is the label to automatically backport to the `7./d` branch. `/d` is the digit

**NOTE**: `backport-skip` has been added to this pull request.
label:
add:
- backport-skip
- name: backport patches to 7.x branch
conditions:
- merged
- label=backport-v7.16.0
actions:
backport:
assignees:
- "{{ author }}"
branches:
- "7.x"
labels:
- "backport"
title: "[{{ destination_branch }}](backport #{{ number }}) {{ title }}"
- name: backport patches to 7.14 branch
ruflin marked this conversation as resolved.
Show resolved Hide resolved
conditions:
- merged
- label=backport-v7.14.0
actions:
backport:
assignees:
- "{{ author }}"
branches:
- "7.14"
labels:
- "backport"
title: "[{{ destination_branch }}](backport #{{ number }}) {{ title }}"
- name: backport patches to 7.15 branch
conditions:
- merged
Expand Down