OSAC-3734: add auto-queue workflow for merge queue - #209
Conversation
|
@omer-vishlitzky: This pull request references OSAC-3734 which is a valid jira issue. Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the task to target the "5.0.0" version, but no target version was set. DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: omer-vishlitzky The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
WalkthroughThe pull request adds a GitHub Actions workflow for non-draft pull requests targeting ChangesAutomatic pull request queueing
Estimated code review effort: 2 (Simple) | ~10 minutes 🚥 Pre-merge checks | ✅ 11✅ Passed checks (11 passed)
✨ Finishing Touches 💡 1🛠️ Fix failing CI checks 💡
🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.github/workflows/auto-queue.yml:
- Around line 21-23: Update the workflow step invoking gh pr merge to
authenticate with a repository secret containing a GitHub App token or
fine-grained PAT authorized to merge and use the merge queue, replacing
github.token in GH_TOKEN while preserving the existing repository, pull-request
number, auto, and rebase arguments.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository: osac-project/coderabbit/.coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: bad4c4cc-9424-4c9a-9bac-24477fe33bbe
📒 Files selected for processing (1)
.github/workflows/auto-queue.yml
| env: | ||
| GH_TOKEN: ${{ github.token }} | ||
| run: gh pr merge ${{ github.event.pull_request.number }} --repo ${{ github.repository }} --auto --rebase |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟠 Major | ⚡ Quick win
Use a merge-queue-capable credential.
GH_TOKEN receives the built-in GITHUB_TOKEN. GitHub documents that this token cannot add a pull request to a merge queue. Therefore, the command cannot meet this PR's merge-queue objective when main requires a merge queue. Use a GitHub App token or a fine-grained PAT with permission to merge, and store it as a secret. (docs.github.com)
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In @.github/workflows/auto-queue.yml around lines 21 - 23, Update the workflow
step invoking gh pr merge to authenticate with a repository secret containing a
GitHub App token or fine-grained PAT authorized to merge and use the merge
queue, replacing github.token in GH_TOKEN while preserving the existing
repository, pull-request number, auto, and rebase arguments.
label-gate.yml: reads Prow-set labels (lgtm, approved, jira/valid-reference) and converts their presence to a status check the merge queue can gate on. Merge queue can only gate on status checks, not labels. Auto-passes on merge_group events. auto-queue.yml: automatically enables auto-merge on every non-draft PR from org members. When all required checks pass (E2E + label-gate), the PR enters the merge queue without any manual click. Uses pull_request_target for write permissions on fork PRs. External contributors excluded via author_association. Assisted-by: Claude Code <noreply@anthropic.com> Signed-off-by: omer-vishlitzky <omer.vishlitzky@gmail.com>
91a2cb5 to
8a1e404
Compare
Summary
Automatically enables auto-merge on every non-draft PR from org members. When all required checks pass (E2E + label-gate), the PR enters the merge queue without any manual click — same UX as Tide.
How it works
gh pr merge --auto --rebase→ enables auto-merge on the PRSecurity
pull_request_targetso GITHUB_TOKEN has write permissions for fork PRs (all OSAC PRs come from forks)gh pr merge --autoauthor_associationcheck — they use manual "Add to merge queue" afterok-to-testPart of OSAC-3734 (merge queue migration)
label-gate.ymlworkflowauto-queue.ymlworkflowTest plan
🤖 Generated with Claude Code
Summary by CodeRabbit