mirror of
https://github.com/elastic/logstash.git
synced 2025-04-19 04:15:23 -04:00
New way of backporting to active branches using gh action (#17551)
This commit is contained in:
parent
2c95068e04
commit
86042f8c98
2 changed files with 36 additions and 56 deletions
22
.github/workflows/backport-active.yml
vendored
Normal file
22
.github/workflows/backport-active.yml
vendored
Normal file
|
@ -0,0 +1,22 @@
|
|||
name: Backport to active branches
|
||||
|
||||
on:
|
||||
pull_request_target:
|
||||
types: [closed]
|
||||
branches:
|
||||
- main
|
||||
|
||||
permissions:
|
||||
pull-requests: write
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
backport:
|
||||
# Only run if the PR was merged (not just closed) and has one of the backport labels
|
||||
if: |
|
||||
github.event.pull_request.merged == true &&
|
||||
contains(toJSON(github.event.pull_request.labels.*.name), 'backport-active-')
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: elastic/oblt-actions/github/backport-active@v1
|
70
.mergify.yml
70
.mergify.yml
|
@ -1,3 +1,17 @@
|
|||
commands_restrictions:
|
||||
backport:
|
||||
conditions:
|
||||
- or:
|
||||
- sender-permission>=write
|
||||
- sender=github-actions[bot]
|
||||
defaults:
|
||||
actions:
|
||||
backport:
|
||||
title: "[{{ destination_branch }}] (backport #{{ number }}) {{ title }}"
|
||||
assignees:
|
||||
- "{{ author }}"
|
||||
labels:
|
||||
- "backport"
|
||||
pull_request_rules:
|
||||
# - name: ask to resolve conflict
|
||||
# conditions:
|
||||
|
@ -130,59 +144,3 @@ pull_request_rules:
|
|||
labels:
|
||||
- "backport"
|
||||
title: "[{{ destination_branch }}] {{ title }} (backport #{{ number }})"
|
||||
|
||||
- name: backport patches to all active minor branches for the 8 major.
|
||||
conditions:
|
||||
- merged
|
||||
- label=backport-active-8
|
||||
actions:
|
||||
backport:
|
||||
assignees:
|
||||
- "{{ author }}"
|
||||
# NOTE: this list needs to be changed when a new minor branch is created
|
||||
# or an existing minor branch reached EOL.
|
||||
branches:
|
||||
- "8.x"
|
||||
- "8.18"
|
||||
- "8.17"
|
||||
- "8.16"
|
||||
labels:
|
||||
- "backport"
|
||||
title: "[{{ destination_branch }}] {{ title }} (backport #{{ number }})"
|
||||
|
||||
- name: backport patches to all active minor branches for the 9 major.
|
||||
conditions:
|
||||
- merged
|
||||
- label=backport-active-9
|
||||
actions:
|
||||
backport:
|
||||
assignees:
|
||||
- "{{ author }}"
|
||||
# NOTE: this list needs to be changed when a new minor branch is created
|
||||
# or an existing minor branch reached EOL.
|
||||
branches:
|
||||
- "9.0"
|
||||
labels:
|
||||
- "backport"
|
||||
title: "[{{ destination_branch }}] {{ title }} (backport #{{ number }})"
|
||||
|
||||
- name: backport patches to all active branches
|
||||
conditions:
|
||||
- merged
|
||||
- label=backport-active-all
|
||||
actions:
|
||||
backport:
|
||||
assignees:
|
||||
- "{{ author }}"
|
||||
# NOTE: this list needs to be changed when a new minor branch is created
|
||||
# or an existing release branch reached EOL.
|
||||
branches:
|
||||
- "9.0"
|
||||
- "8.18"
|
||||
- "8.17"
|
||||
- "8.16"
|
||||
- "8.x"
|
||||
- "7.17"
|
||||
labels:
|
||||
- "backport"
|
||||
title: "[{{ destination_branch }}] {{ title }} (backport #{{ number }})"
|
||||
|
|
Loading…
Add table
Reference in a new issue