fix: org-gate 补 on: 触发器 + 中心仓跳过守卫(P3-1,ADR-0046) - #23
Conversation
|
Warning Review limit reached
Next review available in: 11 minutes Limit details: You’ve used all 10 included reviews currently available. Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?Wait for the limit to reset, then comment An organization admin can change what happens after included review limits in Billing. How do review limits work?CodeRabbit enforces per-developer PR review limits within each organization. For paid Pro and Pro+ reviews, CodeRabbit uses a developer's included PR review attempts over the past 7 days to set the current hourly allowance. At typical activity levels, the full plan allowance applies. Higher sustained activity can lower the allowance until earlier attempts leave the 7-day window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
Comment |
PR Summary by QodoMake org-gate ruleset-compatible and skip central-repository runs
AI Description
Diagram
High-Level Assessment
Files changed (1)
|
Code Review by Qodo
1. Duplicate uses invalidates workflow
|
| # 中心仓自身的 PR 会因 on: pull_request 触发本 workflow——跳过防重复 | ||
| # (中心仓自有 ci.yml 自测;ruleset 不作用于 CI-Workflows 自身) | ||
| if: github.repository != 'Cloudbird-Software/CI-Workflows' | ||
| uses: |
There was a problem hiding this comment.
1. Duplicate uses invalidates workflow 🐞 Bug ≡ Correctness
The added empty uses: duplicates the concrete reusable-workflow reference in the same hygiene job, producing an invalid YAML mapping/job definition. GitHub cannot load the required workflow, so none of its checks can run.
Agent Prompt
## Issue description
The `hygiene` job contains an empty `uses:` key followed by another `uses:` key with the actual reusable-workflow reference. Remove the empty duplicate so the workflow is valid.
## Issue Context
A reusable workflow must be invoked through one concrete job-level `uses` value. Duplicate mapping keys make the workflow invalid.
## Fix Focus Areas
- .github/workflows/org-gate.yml[27-31]
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools
| # job 级守卫跳过,防自测重复) | ||
| on: | ||
| pull_request: | ||
| merge_group: |
There was a problem hiding this comment.
2. Merge queue always fails 🐞 Bug ≡ Correctness
The new merge_group trigger runs the workflow with github.event_name == 'merge_group', causing adr-required to be skipped by its PR-only condition. The strict gate then treats that skipped dependency as a failure, so every merge-queue run fails even when hygiene succeeds.
Agent Prompt
## Issue description
`merge_group` runs skip `adr-required`, but the final gate rejects every non-success dependency result. Make merge-group execution produce an explicitly accepted result without weakening failure handling for PR runs.
## Issue Context
GitHub treats `merge_group` as a distinct event. The ADR job currently runs only for `pull_request`, while the gate runs under `always()` and fails when any dependency is skipped.
## Fix Focus Areas
- .github/workflows/org-gate.yml[16-18]
- .github/workflows/org-gate.yml[33-37]
- .github/workflows/org-gate.yml[96-112]
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools
ruleset API 实测硬约束:required workflow 文件必须声明
pull_request/pull_request_target/merge_queue触发器之一(否则 ruleset 创建报Workflow must have one of the following triggers configured)。补on: pull_request + merge_group;中心仓自身因 on: pull_request 触发的运行由 job 级守卫跳过(防与自测 ci.yml 重复)。