Skip to content
Open
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
39 changes: 39 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,45 @@ Jira Issue: <https://issues.redhat.com/browse/AAP-NNNN>
1. Pull down the PR
2. ...
3. ...
## Type of Change
- [ ] Bug fix (non-breaking change fixing an issue)
- [ ] New feature (non-breaking change adding functionality)
- [ ] Breaking change (fix or feature causing existing functionality to break)
- [ ] Security fix
- [ ] Performance improvement
- [ ] Code refactoring
- [ ] Documentation update
- [ ] CI/CD update

## Backport Policy

This change should be:
- [ ] **Not backported** - main/master only
- [ ] **Backported** to specific releases (add labels after merge)

### Automated Backport Instructions

**After this PR is merged**, add one or more labels to automatically create backport PRs:

- `backport/stable-2.4` - Backport to stable-2.4 branch
- `backport/stable-2.5` - Backport to stable-2.5 branch
- `backport/stable-2.6` - Backport to stable-2.6 branch
- `backport/all` - Backport to all active stable branches
- `no-backport` - Explicitly mark as not needing backport

### Backport Justification
<!-- Required if backporting. Explain why this needs to be in older releases -->
<!-- Examples: -->
<!-- - Critical bug affecting production -->
<!-- - Security vulnerability fix (include CVE if applicable) -->
<!-- - Regression introduced in X.Y.Z -->
<!-- - Customer-blocking issue -->
<!-- - Data corruption/loss prevention -->

**Special backport considerations:**
<!-- Any conflicts, dependencies, or modifications needed for backport -->
<!-- Will this apply cleanly to older releases? -->
<!-- Does this depend on other commits that also need backporting? -->

### Scenarios tested
<!-- Describe the scenarios you've already manually verified, if applicable. -->
Expand Down
40 changes: 40 additions & 0 deletions .github/workflows/backport.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Backport merged pull request

on:
pull_request_target:
types: [closed, labeled]

permissions:
contents: write
pull-requests: write

jobs:
backport:
name: Backport PR
runs-on: ubuntu-latest

if: github.event.pull_request.merged == true
steps:

- name: Backport to release branches
uses: korthout/backport-action@v3
with:
label_pattern: '^backport/(?<target>.+)$'

target_branches: |
all:stable-2.4 stable-2.5 stable-2.6
github_token: ${{ secrets.GITHUB_TOKEN }}

copy_labels_pattern: '^(bug|security|breaking-change|dependencies)$'

pull_description: |
# Backport of #${pull_number}
${pull_description}
---
**Original PR:** #${pull_number}
**Backported by:** @${{ github.actor }}
## Backport Verification
- [ ] Changes apply cleanly
- [ ] Tests pass
- [ ] No conflicts with target branch
pull_title: "[Backport ${target_branch}] ${pull_title}"