-
Notifications
You must be signed in to change notification settings - Fork 53
✨ Add cherry-pick bot action #880
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Signed-off-by: Dylan <[email protected]>
WalkthroughIntroduces a new GitHub Actions workflow that runs on pull_request_target upon PR closure to main. If the PR is merged, it invokes a reusable cherry-pick workflow from konveyor/release-tools, with appropriate permissions and inherited secrets. Changes
Sequence Diagram(s)sequenceDiagram
participant GH as GitHub
participant PRWF as pr-Closed Workflow
participant CPWF as Reusable Cherry-Pick Workflow
participant Repo as Repository
GH->>PRWF: pull_request_target (closed on main)
PRWF->>PRWF: Check if PR was merged
alt PR merged
PRWF->>CPWF: Reuse workflow (with inherited secrets)
CPWF->>Repo: Perform cherry-pick operations (write permissions)
CPWF-->>PRWF: Status/result
else PR not merged
PRWF-->>GH: Skip job
end
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches🧪 Generate unit tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🧪 Early access (Sonnet 4.5): enabledWe are currently testing the Sonnet 4.5 model, which is expected to improve code review quality. However, this model may lead to increased noise levels in the review comments. Please disable the early access features if the noise level causes any inconvenience. Note:
Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (1)
.github/workflows/pr-closed.yaml (1)
17-17: Consider pinning the workflow reference to a specific commit SHA.Referencing the workflow with
@mainmeans any changes to the upstream workflow will automatically affect this repository. For better security and reproducibility, consider pinning to a specific commit SHA or at least a tagged release.Example:
- uses: konveyor/release-tools/.github/workflows/cherry-pick.yml@main + uses: konveyor/release-tools/.github/workflows/[email protected] # or @abc123def (commit SHA)
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
.github/workflows/pr-closed.yaml(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (6)
- GitHub Check: Run e2e test (ubuntu-22.04-arm, bash, ChatOpenAI, kai-test-generation)
- GitHub Check: Run e2e test (ubuntu-24.04, bash, ChatOpenAI, kai-test-generation)
- GitHub Check: Run e2e test (windows-latest, cmd, ChatOpenAI, kai-test-generation)
- GitHub Check: Run e2e test (macos-latest, bash, ChatOpenAI, kai-test-generation)
- GitHub Check: Run e2e test (macos-13, bash, ChatOpenAI, kai-test-generation)
- GitHub Check: Check Types on PR Runner (ubuntu-latest, 3.12, x64)
🔇 Additional comments (2)
.github/workflows/pr-closed.yaml (2)
3-8: LGTM! Appropriate trigger configuration for cherry-pick automation.The use of
pull_request_targetis justified here since the cherry-pick operation requires write permissions and secrets access. Theclosedtype combined with the merge check on line 15 ensures the workflow only processes merged PRs.
16-17: Fix the syntax order:usesmust come beforesecrets.In GitHub Actions reusable workflow syntax, the
useskey must appear beforesecrets: inherit.Apply this diff to fix the syntax error:
- secrets: inherit - uses: konveyor/release-tools/.github/workflows/cherry-pick.yml@main + uses: konveyor/release-tools/.github/workflows/cherry-pick.yml@main + secrets: inheritLikely an incorrect or invalid review comment.
Summary by CodeRabbit