Add GitHub secrets provider#718
Conversation
Greptile SummaryThis PR introduces a new
Confidence Score: 5/5The new provider is safe to merge. All four issues raised in the prior review round have been addressed, and secret values are correctly redacted from logs and never passed through a shell. The implementation correctly validates all mutually exclusive scope combinations, wraps JSON parsing in a try/catch with a helpful message, runs packages/secrets/github/src/index.ts — specifically the Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[caller] -->|connect| B[gh auth status]
B --> C{exitCode == 0?}
C -->|yes| D[return accountId]
C -->|no| E[throw]
A -->|pull| F[app config]
F --> G{user?}
G -->|yes, app!=codespaces| E
G -->|else| H[targetArgs]
H --> I{invalid scope combo?}
I -->|yes| E
I -->|no| J[gh secret list --json]
J --> K[parseSecretList]
K --> L{valid JSON array?}
L -->|no| E
L -->|yes| M[return SecretRef array]
A -->|push| N[app + targetArgs + scopeVisibilityArgs]
N --> O{invalid visibility combo?}
O -->|yes| E
O -->|no| P[for each secret]
P --> Q[assertSecretKey]
Q --> R{value from arg or vault?}
R -->|undefined| E
R -->|present| S[log redacted - gh secret set --body value]
S --> T{exitCode == 0?}
T -->|yes| P
T -->|no| E
P -->|done| U[return count]
Reviews (5): Last reviewed commit: "Validate GitHub secret target scopes" | Re-trigger Greptile |
Adds a GitHub Secrets provider under packages/secrets/github for the environment-updater work in #710. It supports listing secret metadata with gh secret list and pushing repository, environment, organization, or user scoped secrets with gh secret set without logging secret values.\n\nAlso registers the provider in the CLI adapter registry and adds tests for list parsing, repository environment pushes, and organization visibility args.\n\nChecks run:\n- pnpm --filter @profullstack/sh1pt-core build\n- pnpm vitest run packages/secrets/github/src/index.test.ts\n- pnpm --filter @profullstack/sh1pt-secrets-github typecheck\n- pnpm --filter @profullstack/sh1pt typecheck