Repository navigation
Conversation
…split -Repo on commas -SkipBedrock now skips only prompting for and setting the key; the opted-in repositories still get access to the existing AWS_BEARER_TOKEN_BEDROCK secret. -Repo takes a comma-separated value, as pwsh -File passes one, and positional binding is off so -Repo a, b fails before any change. The help names the admin:org scope for changing who can read an organization secret. Tests run the script in pwsh against a stand-in gh.
There was a problem hiding this comment.
🤖 NCode Review at 6d1175a: 8 new findings on the changed lines.
🤖 Review completeVerdict: 💬 Comment — This PR adds 5 reviewers run — 1 finding (run details)
Skipped: api-compat, architecture, completeness, data-model, infrastructure, intent, performance, tests Findings
Trial: findings are posted as review threads and in the check run. $0.36 on Amazon Bedrock, 40s, at c21b557. (how to interact) |
# Conflicts: # CHANGELOG.md
… in failures, and test the failure paths Get-OrgSecret treats only a 404 as a missing secret and throws on any other gh failure, so -SkipBedrock can't skip granting an existing Bedrock key it failed to read. The grant goes through Invoke-Gh again, and the grant and secret set failures keep the command and exit code, with the admin:org hint written once. Tests cover failed grants and secret sets, a failed secret read, a Bedrock key visible to all repositories, <org>/<name> and empty -Repo entries, and run rather than skip in CI when pwsh is missing.
|
/review |
There was a problem hiding this comment.
🤖 NCode Review at c21b557: 1 new finding on the changed lines.
tools/Enable-CodeReview.ps1 -SkipBedrocknow skips only prompting for and setting the Bedrock key: the repositories in-Repostill get access to the existingAWS_BEARER_TOKEN_BEDROCKorg secret. When the organization has no such secret yet, the script says it skipped it.-Reposplits on commas, asSet-RepositoryBaseline.ps1 -RequireChecksdoes, sopwsh -File ... -Repo a,bworks. The help and README now say that changing who can read an org secret needsadmin:org(gh auth refresh -h github.com -s admin:org). Both failure messages for setting a secret and granting access to one give that hint too.New
test/enable-code-review.test.tsruns the script withpwsh -File. The onlyghon its PATH is a stand-in that records each call. These tests failed on the old script and pass on this one, on Windows and on Linux. I ran the Linux check in a container.Decisions
-SkipBedrockname and changed what it does, rather than renaming it.PositionalBinding = $false). Before,pwsh -File ... -Repo a, bboundbto-AppPrivateKeyPath, and the script only failed after it had already changed the repositories. Now the call fails before any change.-UpdateBedrockKeytogether with-SkipBedrockis refused.node:testfile that runs a real pwsh process, because the repository has no PowerShell test pattern. Existing tests already run real processes. CI'snpm teston ubuntu-latest, which has pwsh, runs it, so CI needed no change. If pwsh is missing, the test is skipped.PSUseShouldProcessForStateChangingFunctionsandPSShouldProcess, both onSet-OrgSecret.Closes #34