From 5e759df74ab481524ee7a073e39a0e6607328d85 Mon Sep 17 00:00:00 2001 From: atif09 Date: Sun, 22 Feb 2026 18:20:14 +0530 Subject: [PATCH 1/3] [ci] Added automated backport workflow --- .github/workflows/backport.yml | 43 ++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 .github/workflows/backport.yml diff --git a/.github/workflows/backport.yml b/.github/workflows/backport.yml new file mode 100644 index 00000000..19e4f83d --- /dev/null +++ b/.github/workflows/backport.yml @@ -0,0 +1,43 @@ +name: Backport fixes to stable branch + +on: + push: + branches: + - master + - main + issue_comment: + types: [created] + +concurrency: + group: backport-${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: false + +permissions: + contents: write + pull-requests: write + +jobs: + backport-on-push: + if: github.event_name == 'push' + uses: openwisp/openwisp-utils/.github/workflows/reusable-backport.yml@master + with: + commit_sha: ${{ github.sha }} + secrets: + app_id: ${{ secrets.OPENWISP_BOT_APP_ID }} + private_key: ${{ secrets.OPENWISP_BOT_PRIVATE_KEY }} + + backport-on-comment: + if: > + github.event_name == 'issue_comment' && + github.event.issue.pull_request && + github.event.issue.pull_request.merged_at != null && + github.event.issue.state == 'closed' && + contains(fromJSON('["MEMBER", "OWNER"]'), github.event.comment.author_association) && + startsWith(github.event.comment.body, '/backport') + uses: openwisp/openwisp-utils/.github/workflows/reusable-backport.yml@master + with: + pr_number: ${{ github.event.issue.number }} + comment_body: ${{ github.event.comment.body }} + secrets: + app_id: ${{ secrets.OPENWISP_BOT_APP_ID }} + private_key: ${{ secrets.OPENWISP_BOT_PRIVATE_KEY }} From f2435717f2e0eac2265a6355b3a4330f6769a4f5 Mon Sep 17 00:00:00 2001 From: atif09 Date: Tue, 24 Feb 2026 23:53:33 +0530 Subject: [PATCH 2/3] [chores] Fixed QA --- .github/workflows/backport.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/backport.yml b/.github/workflows/backport.yml index 19e4f83d..e6c67387 100644 --- a/.github/workflows/backport.yml +++ b/.github/workflows/backport.yml @@ -41,3 +41,4 @@ jobs: secrets: app_id: ${{ secrets.OPENWISP_BOT_APP_ID }} private_key: ${{ secrets.OPENWISP_BOT_PRIVATE_KEY }} + From ae61f5456669d951f7365426fed219bb636fca36 Mon Sep 17 00:00:00 2001 From: atif09 Date: Tue, 3 Mar 2026 15:15:07 +0530 Subject: [PATCH 3/3] [chores] Removed extra blankline and main from workflow trigger branches --- .github/workflows/backport.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/backport.yml b/.github/workflows/backport.yml index e6c67387..556ec7db 100644 --- a/.github/workflows/backport.yml +++ b/.github/workflows/backport.yml @@ -4,7 +4,6 @@ on: push: branches: - master - - main issue_comment: types: [created] @@ -41,4 +40,3 @@ jobs: secrets: app_id: ${{ secrets.OPENWISP_BOT_APP_ID }} private_key: ${{ secrets.OPENWISP_BOT_PRIVATE_KEY }} -