Remove cherry-pick label on when workflow fails to perform a merge
#76157 opened on Mar 4, 2026
Description
When a Backport to WP X.Y Beta/RC label is added to a PR, the cherry-pick-wp-release.yml workflow will attempt to perform a git cherry-pick automatically to the corresponding wp/X.Y branch.
When that process is successful, the label is removed and the Backported to WP Core label is added in its place. But when the process fails, no modification are made to the labels assigned to the pull request.
The label should have some combination of the following happen:
- The label is removed.
- A "Backport Failed' label added.
This would make it more apparent that a cherry-pick has failed, and easier to add the label again to retry (sometimes the cherry-pick fails because there were other related changes that needed to be merged in a specific order, a new attempt can be made after these are cherry-picked).