Skip to content
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
22 changes: 22 additions & 0 deletions .github/workflows/backport-active.yml
Original file line number Diff line number Diff line change
@@ -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
69 changes: 14 additions & 55 deletions .mergify.yml
Original file line number Diff line number Diff line change
@@ -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: notify the backport policy
conditions:
Expand Down Expand Up @@ -107,58 +121,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"
labels:
- "backport"
title: "[{{ destination_branch }}] {{ title }} (backport #{{ number }})"