Skip to content

feat: auto-create cherry-pick labels when missing from repo #2721

@rnetser

Description

@rnetser

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:

  1. Automatically create the label in the repository
  2. Apply it to the cherry-pick PR
  3. 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions