Skip to content

Enable-CodeReview.ps1: -SkipBedrock also skips granting the Bedrock secret, and -Repo takes one value through pwsh -File #34

Closed

Description

@polewskm

Two traps found while enabling the bot for project-template and PasswordGenerator.

  1. -SkipBedrock skips the Bedrock secret entirely, including adding the repositories to its list. The documented intent was "don't prompt for or replace the key". Run with it, the repositories got the environment and the app key but not AWS_BEARER_TOKEN_BEDROCK. Every review then failed with "No provider available… no Bedrock key", once the organization's API credits ran out. Fix: -SkipBedrock should skip only setting the value, and still give the opted-in repositories access to the existing secret. Or rename it, so it can't be read that way.
  2. pwsh -File .\tools\Enable-CodeReview.ps1 -Repo a, b passes "a," as one value: pwsh -File takes one value per list parameter. Fix: split -Repo on commas, as Set-RepositoryBaseline.ps1 -RequireChecks does, and say so in the help.

Also worth saying in the help: changing who can read an organization secret needs the admin:org scope (gh auth refresh -h github.com -s admin:org).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions