From b211590bc02cff5439bd89053caa295bd6df97bd Mon Sep 17 00:00:00 2001 From: Yaron Kaikov Date: Wed, 25 Feb 2026 16:02:08 +0200 Subject: [PATCH] .github/workflows: enable automatic backport PR creation with Jira sub-issue integration This workflow calls the reusable backport-with-jira workflow from scylladb/github-automation to enable automatic backport PR creation with Jira sub-issue integration. The workflow triggers on: - Push to master/next-*/branch-* branches (for promotion events) - PR labeled with backport/X.X pattern (for manual backport requests) - PR closed/merged on version branches (for chain backport processing) Features enabled by calling the shared workflow: - Creates Jira sub-issues under the main issue for each backport version - Sorts versions descending (highest first: 2025.4 -> 2025.3 -> 2025.2) - Cherry-picks from previous version branch to avoid repeated conflicts - On Jira API failure: adds comment to main issue, applies 'jira-sub-issue-creation-failed' label, continues with PR Closes scylladb/scylladb#28804 --- .../workflows/call_backport_with_jira.yaml | 53 +++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 .github/workflows/call_backport_with_jira.yaml diff --git a/.github/workflows/call_backport_with_jira.yaml b/.github/workflows/call_backport_with_jira.yaml new file mode 100644 index 0000000000..1a4c12eade --- /dev/null +++ b/.github/workflows/call_backport_with_jira.yaml @@ -0,0 +1,53 @@ +name: Backport with Jira Integration + +on: + push: + branches: + - master + - next-*.* + - branch-*.* + pull_request_target: + types: [labeled, closed] + branches: + - master + - next + - next-*.* + - branch-*.* + +jobs: + backport-on-push: + if: github.event_name == 'push' + uses: scylladb/github-automation/.github/workflows/backport-with-jira.yaml@main + with: + event_type: 'push' + base_branch: ${{ github.ref }} + commits: ${{ github.event.before }}..${{ github.sha }} + secrets: + gh_token: ${{ secrets.AUTO_BACKPORT_TOKEN }} + jira_auth: ${{ secrets.USER_AND_KEY_FOR_JIRA_AUTOMATION }} + + backport-on-label: + if: github.event_name == 'pull_request_target' && github.event.action == 'labeled' + uses: scylladb/github-automation/.github/workflows/backport-with-jira.yaml@main + with: + event_type: 'labeled' + base_branch: refs/heads/${{ github.event.pull_request.base.ref }} + pull_request_number: ${{ github.event.pull_request.number }} + head_commit: ${{ github.event.pull_request.base.sha }} + label_name: ${{ github.event.label.name }} + pr_state: ${{ github.event.pull_request.state }} + secrets: + gh_token: ${{ secrets.AUTO_BACKPORT_TOKEN }} + jira_auth: ${{ secrets.USER_AND_KEY_FOR_JIRA_AUTOMATION }} + + backport-chain: + if: github.event_name == 'pull_request_target' && github.event.action == 'closed' && github.event.pull_request.merged == true + uses: scylladb/github-automation/.github/workflows/backport-with-jira.yaml@main + with: + event_type: 'chain' + base_branch: refs/heads/${{ github.event.pull_request.base.ref }} + pull_request_number: ${{ github.event.pull_request.number }} + pr_body: ${{ github.event.pull_request.body }} + secrets: + gh_token: ${{ secrets.AUTO_BACKPORT_TOKEN }} + jira_auth: ${{ secrets.USER_AND_KEY_FOR_JIRA_AUTOMATION }}