mirror of
https://github.com/wu736139669/hapi.git
synced 2026-11-25 05:07:05 +00:00
feat(ci): label PRs with the Codex review verdict (#2360)
The review outcome was only visible by opening the PR and reading the body. Each published review now sets exactly one verdict label: codex-review:pass (all stages pass, no Blocker/Major findings; Minor/Nit are advisory), codex-review:changes, or codex-review:clarify. A review of new inputs clears the previous verdict first, so a stale pass never outlives the commit it described, and a failed run on current inputs is marked codex-review:error. Other labels are left alone. The review body now opens with the verdict and finding counts. Label API failures only warn; they never fail or block the published review.
This commit is contained in:
@@ -83,3 +83,14 @@ jobs:
|
||||
script: |
|
||||
const { publishReview } = require('./.github/scripts/pr-review.cjs');
|
||||
await publishReview({ github, context, core });
|
||||
|
||||
# Cancelled runs are superseded by a newer run, which owns the label.
|
||||
- name: Mark a failed review
|
||||
if: failure() && steps.prepare.outputs.should_review == 'true'
|
||||
uses: actions/github-script@v7
|
||||
env:
|
||||
REVIEW_CONTEXT_PATH: ${{ steps.prepare.outputs.context_path }}
|
||||
with:
|
||||
script: |
|
||||
const { markReviewError } = require('./.github/scripts/pr-review.cjs');
|
||||
await markReviewError({ github, context, core });
|
||||
|
||||
Reference in New Issue
Block a user