Skip to content

Support cherry-pick label on already-merged PRs via issues:labeled trigger - #44

Closed
bunnam988 wants to merge 2 commits into
rdkcentral:developfrom
bunnam988:feature/add-cherry-pick-gatekeeper-callers
Closed

Support cherry-pick label on already-merged PRs via issues:labeled trigger#44
bunnam988 wants to merge 2 commits into
rdkcentral:developfrom
bunnam988:feature/add-cherry-pick-gatekeeper-callers

Conversation

@bunnam988

Copy link
Copy Markdown
Contributor

Follow-up to #43. Adds issues: labeled as a second trigger so that adding a cherry-pick to <branch> label to an already-merged PR fires the cherry-pick engine.

Why this is needed: GitHub only fires pull_request: labeled on open PRs. For PRs merged days or weeks ago, nothing fires. This change uses the issues: labeled event which GitHub fires for any issue/PR regardless of state.

Depends on rdkcentral/build_tools_workflows#71 being merged first.

Reason for change: Enable cherry-pick labels to be added at any time after merge
Test Procedure: Add label to already-merged PR #39 — workflow fires and creates backport PR
Risks: Low
Priority: P1

- auto-backport.yml: triggers cherry-pick engine on PR merge with 'cherry-pick to <branch>' label
- gatekeeper.yml: enforces cross-repo review sync before merge on develop, release, and support branches
Copilot AI review requested due to automatic review settings August 7, 2026 08:22
@bunnam988
bunnam988 requested review from a team as code owners August 7, 2026 08:22
@github-actions

github-actions Bot commented Aug 7, 2026

Copy link
Copy Markdown

📋 PR Format Reminder

  • Title: Support cherry-pick label on already-merged PRs via issues:labeled trigger — expected TICKET-123 : description
    (Multiple tickets OK: RDKCOM-5492 RDKBDEV-3336 : ... | Include US ticket + subtask for user-stories)

Expected:

TICKET-123 : brief description

Reason for change: why
Test Procedure: how to verify
Risks: Low / Medium / High
Priority: P0 / P1 / P2

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds an issues:labeled trigger path so the automated cherry-pick/backport workflow can run when cherry-pick to <branch> labels are applied to PRs after they’ve already been merged (since GitHub doesn’t emit pull_request:labeled for merged PRs). This fits into the repo’s GitHub Actions automation by wiring this repo to the shared reusable workflows in rdkcentral/build_tools_workflows.

Changes:

  • Introduces a new auto-backport.yml workflow that triggers on both pull_request and issues:labeled and calls the shared cherry-pick engine.
  • Introduces a new gatekeeper.yml workflow that calls the shared topic gatekeeper reusable workflow on PR activity and review submissions.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.

File Description
.github/workflows/auto-backport.yml Adds the automated cherry-pick/backport workflow with an additional issues:labeled trigger path.
.github/workflows/gatekeeper.yml Adds a workflow caller for the shared topic gatekeeper on PR and review events.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +11 to +17
if: |
(github.event_name == 'pull_request' &&
github.event.pull_request.merged == true &&
contains(toJSON(github.event.pull_request.labels.*.name), 'cherry-pick to ')) ||
(github.event_name == 'issues' &&
github.event.issue.pull_request.url != '' &&
contains(toJSON(github.event.issue.labels.*.name), 'cherry-pick to '))
uses: rdkcentral/build_tools_workflows/.github/workflows/cherry-pick.yml@develop
with:
raw_labels: ${{ github.event_name == 'issues' && toJSON(github.event.issue.labels) || toJSON(github.event.pull_request.labels) }}
trigger_label: ${{ github.event.label.name }}
Comment on lines +1 to +3
name: Automated Cherry-Pick Engine

on:
Comment on lines +21 to +23
uses: rdkcentral/build_tools_workflows/.github/workflows/gatekeeper.yml@develop
secrets:
CROSS_REPO_TOKEN: ${{ secrets.CROSS_REPO_TOKEN }}
@bunnam988

Copy link
Copy Markdown
Contributor Author

Closing — replaced by clean single-commit PR.

@bunnam988 bunnam988 closed this Aug 7, 2026
@github-actions github-actions Bot locked and limited conversation to collaborators Aug 7, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants