diff --git a/.backportrc.json b/.backportrc.json index 9e00228ad68..be958c30791 100644 --- a/.backportrc.json +++ b/.backportrc.json @@ -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}" diff --git a/.mergify.yml b/.mergify.yml index 37c08b853ce..674f2d5e0b6 100644 --- a/.mergify.yml +++ b/.mergify.yml @@ -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 @@ -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] @@ -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 + 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