Support cherry-pick label on already-merged PRs via issues:labeled trigger - #44
Closed
bunnam988 wants to merge 2 commits into
Closed
Conversation
- 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
|
📋 PR Format Reminder
Expected: |
Contributor
There was a problem hiding this comment.
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.ymlworkflow that triggers on bothpull_requestandissues:labeledand calls the shared cherry-pick engine. - Introduces a new
gatekeeper.ymlworkflow 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 }} |
Contributor
Author
|
Closing — replaced by clean single-commit PR. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to #43. Adds
issues: labeledas a second trigger so that adding acherry-pick to <branch>label to an already-merged PR fires the cherry-pick engine.Why this is needed: GitHub only fires
pull_request: labeledon open PRs. For PRs merged days or weeks ago, nothing fires. This change uses theissues: labeledevent 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