[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.
This commit is contained in:
Brad White 2024-09-25 17:24:55 -06:00 committed by GitHub
parent 7458ff1117
commit 6fbb038fb7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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: