Repository navigation
Require NCode Review's approval where its approver app can write - #462
Conversation
…itory and the organization
There was a problem hiding this comment.
🤖 NCode Review at dd02d76: 6 new findings on the changed lines.
Not on a changed line:
- 🟠 F2 Should fix: Does the update notice tell existing projects about the approver key?
template/.template/Update-Project.ps1:98.code-review.ymlis owned by the project, so an update never addsapprover-private-key. Update-Project.ps1's NCode Review notice still checks only for the v1.4.0 pin andapprove: true, and says nothing about the approver input orEnable-CodeReview.ps1 -ApproverPrivateKeyPath. Fix: Check whether the notice covers this elsewhere. If it doesn't, extend the notice and the script's .DESCRIPTION to name the approver input and secret, and add a test case for the new text. - 🟡 F5 Nit: publish.yml's header still says raise-baseline opens the pull request
template/.github/workflows/publish.yml:12. The header says thebaselinejob calls raise-baseline.yml, "which opens the pull request". The workflow now pushes a branch and opens an issue with a link instead. Fix: Reword it to say the workflow pushes the branch and opens an issue whose link opens the pull request. ADR-0150's body can stay as written, since ADR-0036 amends it.
|
Superseded by the review at 0f87196. |
…projects about the approver, and correct the texts that still say it opens the pull request
|
Autopilot: Fixed in 0f87196, for the two findings that aren't on a changed line:
Generated by Claude Code |
|
/review Generated by Claude Code |
|
Superseded by the review at c01d813. |
…Hub's rulesets and cites 0034
|
Autopilot: The Generated by Claude Code |
|
/review Generated by Claude Code |
|
Superseded by the review at f2431f4. |
|
/review Generated by Claude Code |
|
Superseded by the review at a7013f9. |
|
/review Generated by Claude Code |
🤖 Review completeVerdict: ✅ Approve — Re-review of what changed since the last review at f2431f4: 1 hunk in 1 file, by correctness only. Earlier findings: F1 fixed, F3 fixed, F4 fixed, F6 fixed, F7 fixed, F8 fixed. No further findings above nits. 1 reviewer run — 0 findings (run details)
Trial: findings are posted as review threads and in the check run. $0.05 on Amazon Bedrock, 13s, at a7013f9. (how to interact) 📋 OutcomesMerged at a7013f9: 5 fixed, 1 dismissed, 0 acknowledged, 0 ignored.
|
#460's test showed two things. GitHub counts an approval toward a required approval when the reviewer can write to the repository, even when the token that submitted it can only write pull requests. And while "Allow GitHub Actions to create and approve pull requests" is on, any writer's pull request can approve itself.
tools/Set-RepositoryBaseline.ps1requires one approval, of the last push, wherever NCode Review's approver is set up, with one writer too. Set up meanscode-review.ymlpassesapprove: trueandapprover-private-key, and thecode-reviewenvironment holdsNCODE_REVIEW_APPROVER_PRIVATE_KEY. With the input but no secret, it names the fix and requires no approval for it.raise-baseline.ymlor not.-OrganizationPolicysets the organization's defaults the same way (Set NCodeGroup's Actions defaults to a read-only token that can't approve pull requests #461).raise-baseline.ymlpushesbaseline-<version>and opens an issue whose link opens the pull request, withCloses #<issue>filled in. A rerun reuses the branch and its issue. A pull request a person opens starts CI and NCode Review's review, so the workflow needs no setting and nogh workflow run ci.yml.code-review.ymlpins NCode Review v1.5.0 (a4cdf65) and passes the approver's key in the review job..template/Update-Project.ps1tells an existing project whosecode-review.ymllacks either.Tests:
Test-RepositoryBaseline, the fullTest-Template,Test-UpdateNotes,Test-UpdateExitCode,Test-UpdateBaseline,Test-DecisionIndex,Test-ChangelogHeadings,Test-FileHeadersandTest-ScriptAnalyzerpass locally.Release: v0.111.0
Closes #460
Closes #461
Closes #463
Refs #459
Refs NCodeGroup/code-review#232
🤖 Generated with Claude Code
https://claude.ai/code/session_01MSU4AUtW1RFhu9v7qShrEZ