Commit 215527f4db for woocommerce
commit 215527f4dbc600429e5dc5a6ba045fa221c6d941
Author: Alba Rincón <albarin@users.noreply.github.com>
Date: Tue Jan 27 09:13:46 2026 +0100
Handle skipped cherry pick for frozen and milestoned PRs flows (#62808)
Handle skipped cherry pick for frozen and milestoned PRs
diff --git a/.github/workflows/cherry-pick-milestoned-prs.yml b/.github/workflows/cherry-pick-milestoned-prs.yml
index 66eb1d2a1c..d2b1dcb8e2 100644
--- a/.github/workflows/cherry-pick-milestoned-prs.yml
+++ b/.github/workflows/cherry-pick-milestoned-prs.yml
@@ -204,6 +204,28 @@ jobs:
slack-text: |
:info: *Cherry pick <${{ env.CHERRY_PICK_PR_URL }}|created> (`trunk` → `${{ needs.prepare.outputs.milestoned_branch }}`)* Please ensure <${{ env.CHERRY_PICK_PR_URL }}|this cherry pick> is merged before releasing. Source PR: _<${{ env.SOURCE_PR_URL }}|#${{ env.SOURCE_PR_NUMBER }} - ${{ env.SOURCE_PR_TITLE }}>_.
+ handle-skipped-milestoned:
+ needs: [prepare, cherry-pick-milestoned]
+ runs-on: ubuntu-latest
+ if: ${{ always() && needs.cherry-pick-milestoned.outputs.status == 'skipped' }}
+ steps:
+ - name: Comment on original PR about skip
+ uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea #v7.0.1
+ env:
+ ERROR_MESSAGE: ${{ needs.cherry-pick-milestoned.outputs.error_message }}
+ with:
+ github-token: ${{ secrets.WC_BOT_PR_CREATE_TOKEN || secrets.GITHUB_TOKEN }}
+ script: |
+ let body = '⚠️ **Cherry-pick to `${{ needs.prepare.outputs.milestoned_branch }}` was skipped.**\n\n' +
+ '**Reason:** ' + process.env.ERROR_MESSAGE + '\n\n';
+
+ await github.rest.issues.createComment({
+ owner: context.repo.owner,
+ repo: context.repo.repo,
+ issue_number: parseInt('${{ needs.prepare.outputs.pr_number }}'),
+ body
+ });
+
# Handle successful cherry-pick to next branch
handle-success-next:
needs: [prepare, cherry-pick-next]
@@ -274,6 +296,28 @@ jobs:
slack-text: |
:info: *Cherry pick <${{ env.CHERRY_PICK_PR_URL }}|created> (`trunk` → `${{ needs.prepare.outputs.next_branch }}`)* Please ensure <${{ env.CHERRY_PICK_PR_URL }}|this cherry pick> is merged before releasing. Source PR: _<${{ env.SOURCE_PR_URL }}|#${{ env.SOURCE_PR_NUMBER }} - ${{ env.SOURCE_PR_TITLE }}>_.
+ handle-skipped-next:
+ needs: [prepare, cherry-pick-next]
+ runs-on: ubuntu-latest
+ if: ${{ always() && needs.cherry-pick-next.outputs.status == 'skipped' }}
+ steps:
+ - name: Comment on original PR about skip
+ uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea #v7.0.1
+ env:
+ ERROR_MESSAGE: ${{ needs.cherry-pick-next.outputs.error_message }}
+ with:
+ github-token: ${{ secrets.WC_BOT_PR_CREATE_TOKEN || secrets.GITHUB_TOKEN }}
+ script: |
+ let body = '⚠️ **Cherry-pick to `${{ needs.prepare.outputs.next_branch }}` was skipped.**\n\n' +
+ '**Reason:** ' + process.env.ERROR_MESSAGE + '\n\n';
+
+ await github.rest.issues.createComment({
+ owner: context.repo.owner,
+ repo: context.repo.repo,
+ issue_number: parseInt('${{ needs.prepare.outputs.pr_number }}'),
+ body
+ });
+
# Handle failed cherry-pick to milestoned branch
handle-failures-milestoned:
needs: [prepare, cherry-pick-milestoned]
diff --git a/.github/workflows/cherry-pick-to-frozen.yml b/.github/workflows/cherry-pick-to-frozen.yml
index 682e10fdbf..0c49609336 100644
--- a/.github/workflows/cherry-pick-to-frozen.yml
+++ b/.github/workflows/cherry-pick-to-frozen.yml
@@ -198,6 +198,28 @@ jobs:
:info: *Cherry pick <${{ env.CHERRY_PICK_PR_URL }}|created> (${{ env.BASE_BRANCH }} → `${{ env.NEXT_BRANCH }}`)* Please ensure <${{ env.CHERRY_PICK_PR_URL }}|this cherry pick> is merged before releasing. Source PR: _<${{ env.SOURCE_PR_URL }}|#${{ env.SOURCE_PR_NUMBER }} - ${{ env.SOURCE_PR_TITLE }}>_.
${{ env.ADD_CP_TO_TRUNK_NAG == 'true' && '\n\nNOTE: This PR might need to be cherry-picked trunk and is not currently labeled for it.' || '' }}
+ handle-skipped:
+ needs: [prepare, cherry-pick, cherry-pick-to-trunk-check]
+ runs-on: ubuntu-latest
+ if: ${{ always() && needs.cherry-pick.outputs.status == 'skipped' }}
+ steps:
+ - name: Comment on original PR about skip
+ uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea #v7.0.1
+ env:
+ ERROR_MESSAGE: ${{ needs.cherry-pick.outputs.error_message }}
+ with:
+ github-token: ${{ secrets.WC_BOT_PR_CREATE_TOKEN || secrets.GITHUB_TOKEN }}
+ script: |
+ let body = '⚠️ **Cherry-pick to `${{ needs.prepare.outputs.next_branch }}` was skipped.**\n\n' +
+ '**Reason:** ' + process.env.ERROR_MESSAGE + '\n\n';
+
+ await github.rest.issues.createComment({
+ owner: context.repo.owner,
+ repo: context.repo.repo,
+ issue_number: parseInt('${{ needs.prepare.outputs.pr_number }}'),
+ body
+ });
+
handle-failures:
needs: [prepare, cherry-pick, cherry-pick-to-trunk-check]
runs-on: ubuntu-latest