From 33df0cb2b2b69acadefd1595d73d189021ab1b7b Mon Sep 17 00:00:00 2001 From: Brad White Date: Wed, 25 Sep 2024 17:24:55 -0600 Subject: [PATCH] [CI] Handle unlabeled events in on-merge workflow (#194058) ## Summary Closes #194051 As far as I can tell from the docs the `unlabeled` event sends information about the removed label. I'm not sure the best way to test this aside from merging the PR and adjusting the labels on this PR afterwards. Reverting if needed. Plan: 1. Merge PR 2. Add `backport:prev-minor` 3. Verify the workflow ran and _did not_ trigger a backport since `backport:skip` is still a label 4. Remove `backport:skip` 5. Verify the workflow ran and _did_ trigger a backport to `8.x` 6. Revert the labels and close the backport PR since it is not actually needed. (cherry picked from commit 6fbb038fb7a69b5287a7683434fb746db4af2e58) --- .github/workflows/on-merge.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/on-merge.yml b/.github/workflows/on-merge.yml index 20596bf155910..14f94571d551f 100644 --- a/.github/workflows/on-merge.yml +++ b/.github/workflows/on-merge.yml @@ -3,6 +3,7 @@ on: types: - closed - labeled + - unlabeled jobs: on-merge: @@ -21,6 +22,7 @@ jobs: || github.event.label.name == 'auto-backport' ) ) + || (github.event.action == 'unlabeled' && github.event.label.name == 'backport:skip') || (github.event.action == 'closed') ) steps: