From cd7dafc3bf91522fde7081a08731c9fcecf280ed Mon Sep 17 00:00:00 2001 From: Janpot <2109932+Janpot@users.noreply.github.com> Date: Thu, 24 Sep 2026 19:09:32 +0200 Subject: [PATCH 1/3] [code-infra] Allow cherry-picking after merge --- .github/workflows/create-cherry-pick-pr.yml | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/.github/workflows/create-cherry-pick-pr.yml b/.github/workflows/create-cherry-pick-pr.yml index 21b2f8535bc5d9..f331bcdcbff8a8 100644 --- a/.github/workflows/create-cherry-pick-pr.yml +++ b/.github/workflows/create-cherry-pick-pr.yml @@ -5,14 +5,28 @@ on: - 'next' - 'v*.x' - 'master' - types: ['closed'] + types: ['closed', 'labeled'] + workflow_dispatch: + inputs: + target_branch: + description: 'The target branch (e.g. `v7.x`)' + required: true + type: string + pr_number: + description: 'The PR number to cherry-pick from' + required: true + type: string permissions: {} jobs: create_pr: name: Create cherry-pick PR + if: ${{ github.event_name == 'workflow_dispatch' || (github.event.pull_request.merged && (github.event.action == 'closed' || github.event.label.name == 'needs cherry-pick')) }} uses: mui/mui-public/.github/workflows/prs_create-cherry-pick-pr.yml@c6471a4fe98cb2e52efe7397ff8362569f2ddada # master permissions: contents: write pull-requests: write + with: + target_branch: ${{ inputs.target_branch }} + pr_number: ${{ inputs.pr_number }} From 24805780d64826e6908150ad27f6534a3efe67ad Mon Sep 17 00:00:00 2001 From: Janpot <2109932+Janpot@users.noreply.github.com> Date: Thu, 24 Sep 2026 19:36:05 +0200 Subject: [PATCH 2/3] Remove workflow_dispatch trigger --- .github/workflows/create-cherry-pick-pr.yml | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/.github/workflows/create-cherry-pick-pr.yml b/.github/workflows/create-cherry-pick-pr.yml index f331bcdcbff8a8..571c40a34b6f4d 100644 --- a/.github/workflows/create-cherry-pick-pr.yml +++ b/.github/workflows/create-cherry-pick-pr.yml @@ -6,27 +6,14 @@ on: - 'v*.x' - 'master' types: ['closed', 'labeled'] - workflow_dispatch: - inputs: - target_branch: - description: 'The target branch (e.g. `v7.x`)' - required: true - type: string - pr_number: - description: 'The PR number to cherry-pick from' - required: true - type: string permissions: {} jobs: create_pr: name: Create cherry-pick PR - if: ${{ github.event_name == 'workflow_dispatch' || (github.event.pull_request.merged && (github.event.action == 'closed' || github.event.label.name == 'needs cherry-pick')) }} + if: ${{ github.event.pull_request.merged && (github.event.action == 'closed' || github.event.label.name == 'needs cherry-pick') }} uses: mui/mui-public/.github/workflows/prs_create-cherry-pick-pr.yml@c6471a4fe98cb2e52efe7397ff8362569f2ddada # master permissions: contents: write pull-requests: write - with: - target_branch: ${{ inputs.target_branch }} - pr_number: ${{ inputs.pr_number }} From 4a0e90fe171622004761c2c15d24a2391fcd217d Mon Sep 17 00:00:00 2001 From: Janpot <2109932+Janpot@users.noreply.github.com> Date: Fri, 25 Sep 2026 09:57:40 +0200 Subject: [PATCH 3/3] Also trigger when a version label is added --- .github/workflows/create-cherry-pick-pr.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/create-cherry-pick-pr.yml b/.github/workflows/create-cherry-pick-pr.yml index 571c40a34b6f4d..8a2fdf029414a9 100644 --- a/.github/workflows/create-cherry-pick-pr.yml +++ b/.github/workflows/create-cherry-pick-pr.yml @@ -12,7 +12,13 @@ permissions: {} jobs: create_pr: name: Create cherry-pick PR - if: ${{ github.event.pull_request.merged && (github.event.action == 'closed' || github.event.label.name == 'needs cherry-pick') }} + if: >- + ${{ github.event.pull_request.merged && + contains(github.event.pull_request.labels.*.name, 'needs cherry-pick') && ( + github.event.action == 'closed' || + github.event.label.name == 'needs cherry-pick' || + (startsWith(github.event.label.name, 'v') && endsWith(github.event.label.name, '.x')) + ) }} uses: mui/mui-public/.github/workflows/prs_create-cherry-pick-pr.yml@c6471a4fe98cb2e52efe7397ff8362569f2ddada # master permissions: contents: write