From 9d21d105e3ae05a67706f547bc2649b0ca9c9c92 Mon Sep 17 00:00:00 2001 From: Ionite Date: Sat, 4 Jul 2026 00:42:07 -0700 Subject: [PATCH 1/2] ci: use shared org backport workflow Replaces the bespoke backport workflow with a thin caller of the reusable LykosAI/.github backport workflow. Behavior notes: - mainline is now 1 unconditionally; the old 'else 2' branch only applied to the retired dev/main split and was never exercised - .backportrc.json stays for local backport CLI use (CI generates its own config and never read it) Co-Authored-By: Claude Fable 5 --- .github/workflows/backport.yml | 48 ++++++++-------------------------- 1 file changed, 11 insertions(+), 37 deletions(-) diff --git a/.github/workflows/backport.yml b/.github/workflows/backport.yml index c4562308f..c44b72838 100644 --- a/.github/workflows/backport.yml +++ b/.github/workflows/backport.yml @@ -1,44 +1,18 @@ name: Automatic Backport +# Label a PR `backport-to-` to get a cherry-picked PR opened against +# `` after merge. Shared implementation: +# https://github.com/LykosAI/.github/blob/main/.github/workflows/backport.yml + on: pull_request: - types: ["closed", "labeled"] + types: [closed, labeled] + +permissions: + contents: write + pull-requests: write + issues: write jobs: backport: - if: ${{ (github.event.pull_request.merged == true) && (contains(github.event.pull_request.labels.*.name, 'backport-to-main') == true) }} - name: Backport PR - runs-on: ubuntu-latest - steps: - # Get the merge target branch to decide mainline number - # git cherry-pick mainline is 1 for merge to 'dev', else 2 - - name: Get target branch - run: echo "CP_MAINLINE=$(if [ '${{ github.event.pull_request.base.ref }}' == 'dev' ]; then echo 1; else echo 2; fi)" >> $GITHUB_ENV - - - name: Write json - id: create-json - uses: jsdaniell/create-json@v1.2.3 - with: - name: ".backportrc.json" - json: | - { - "targetPRLabels": ["backport"], - "mainline": ${{ env.CP_MAINLINE }}, - "commitConflicts": "true", - "prTitle": "[{{sourceBranch}} to {{targetBranch}}] backport: {{sourcePullRequest.title}} ({{sourcePullRequest.number}})" - } - - - name: Backport Action - uses: sorenlouv/backport-github-action@v9.5.1 - with: - github_token: ${{ secrets.GITHUB_TOKEN }} - auto_backport_label_prefix: backport-to- - - - name: Info log - if: ${{ success() }} - run: cat ~/.backport/backport.info.log - - - name: Debug log - if: ${{ failure() }} - run: cat ~/.backport/backport.debug.log - + uses: LykosAI/.github/.github/workflows/backport.yml@main From 8db5f53c187546a2a5f6fdeb3972fb1a59f104b4 Mon Sep 17 00:00:00 2001 From: Ionite Date: Sat, 4 Jul 2026 00:51:42 -0700 Subject: [PATCH 2/2] ci: pass secrets through for the lykos-backport App Adds `secrets: inherit` so the reusable workflow can mint the lykos-backport App token when configured; falls back to GITHUB_TOKEN otherwise. Co-Authored-By: Claude Fable 5 --- .github/workflows/backport.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/backport.yml b/.github/workflows/backport.yml index c44b72838..2b0b1f285 100644 --- a/.github/workflows/backport.yml +++ b/.github/workflows/backport.yml @@ -1,7 +1,7 @@ name: Automatic Backport # Label a PR `backport-to-` to get a cherry-picked PR opened against -# `` after merge. Shared implementation: +# `` after merge. Shared implementation (and lykos-backport App notes): # https://github.com/LykosAI/.github/blob/main/.github/workflows/backport.yml on: @@ -16,3 +16,7 @@ permissions: jobs: backport: uses: LykosAI/.github/.github/workflows/backport.yml@main + # Passes org var BACKPORT_APP_ID + secret BACKPORT_APP_PRIVATE_KEY through + # to the reusable workflow so backport PRs get the lykos-backport App + # identity and trigger CI. Harmless (falls back to GITHUB_TOKEN) if unset. + secrets: inherit