Problem
When a cherry-pick PR is created by the bot, it applies a branch label (e.g., branch-v4.20, CherryPicked-from-main). If that label doesn't already exist at the repo level, the cherry-pick process fails or the PR is created without the proper label.
This can block the cherry-pick workflow for external contributors who don't have push access to fix the PR.
Proposed Solution
During the cherry-pick process, if a required label does not exist at the repo level:
- Automatically create the label in the repository
- Apply it to the cherry-pick PR
- Continue with the cherry-pick normally
This ensures cherry-picks complete successfully regardless of whether labels were pre-configured.
Context
Observed on PR #2718 — cherry-pick from main to v4.20 by an external contributor (rlobillo). The PR has failing checks and the contributor cannot push fixes since the branch lives in the upstream repo, not their fork.
Problem
When a cherry-pick PR is created by the bot, it applies a branch label (e.g.,
branch-v4.20,CherryPicked-from-main). If that label doesn't already exist at the repo level, the cherry-pick process fails or the PR is created without the proper label.This can block the cherry-pick workflow for external contributors who don't have push access to fix the PR.
Proposed Solution
During the cherry-pick process, if a required label does not exist at the repo level:
This ensures cherry-picks complete successfully regardless of whether labels were pre-configured.
Context
Observed on PR #2718 — cherry-pick from main to v4.20 by an external contributor (rlobillo). The PR has failing checks and the contributor cannot push fixes since the branch lives in the upstream repo, not their fork.