Repository navigation
Description
Problem or Motivation
devops repos onboard prints two person steps for each repository, although GitHub already holds the release App of the account:
Person steps:
1. Give the variable RELEASE_APP_CLIENT_ID its value: devops config set github.release_app_client_id <value>.
2. Store the value of RELEASE_APP_PRIVATE_KEY: devops config set github.release_app_private_key --from-file <file>, or give --release-key-file.
Read on 2026-11-26:
- The environment
releaseof dan-petty/devops-cli, dan-petty/infra and dan-petty/devtools holds the variableRELEASE_APP_CLIENT_IDwith one value, and the secretRELEASE_APP_PRIVATE_KEY. - The local configuration has no
github.release_app_client_idand no credentialgithub.release_app_private_key(devops config show:not set). devops repos onboard --all --planprints step 1 for each of the 9 repositories, and step 2 for each repository with no secret. For dan-petty/devtools the rowRelease secretispresent, and the plan still prints step 1, because row 5 does not read the variable when the setting is absent (src/devops_cli/github/onboard/settings_rows.py:58).
The owner said on 2026-11-26: "I know I have already configured the release app and should not have to manually do it for every repo in my org or personal account space".
Two faults:
- The client ID is not a secret. GitHub returns it from
GET /repos/{repo}/environments/release/variables/RELEASE_APP_CLIENT_IDof a repository that has it. The command asks a person for a value that it can read. - The output repeats the same once-only steps under each repository, so it reads as one manual step for each repository.
Proposed Solution
Disposition: change the code.
- When
github.release_app_client_idis not set, the command readsRELEASE_APP_CLIENT_IDfrom the environmentreleaseof the repository ofgithub.template_repository(default dan-petty/infra). It uses that value for row 5 and names the source in the row. The person step stays only when that read finds no variable. - A row whose variable is present with that value is
present, and prints no person step. - A run over more than one repository (
--all) prints each once-only person step one time, after the last report, with the count of repositories that wait for it. - The private key stays a person step: GitHub gives no secret value back. The text says that one
devops config set github.release_app_private_key --from-file <file>serves each later repository.
Proof: with no github.release_app_client_id, devops repos onboard dan-petty/devtools --plan shows row 5 as present and prints no step for the client ID. A test over the fake GitHub API covers the read from the template repository, the missing variable, and the single print of a once-only step for two repositories.
Existing Tool Considered
The GitHub REST API for environment variables, which the command already uses to write the variable. No new tool.
Alternatives check of 2026-11-26: in-use.
The item already names this tool.
Tool: github/rest-api-description (https://github.com/github/rest-api-description), MIT, last activity 2026-11-26, maintained.
Reason: Searches surfaced only the GitHub REST API for environment variables, which the command already uses: it returns the non-secret client ID from the template repository's release environment, while the once-only step printing stays the command's own code.
Covers:
- Reads one environment variable's value of a repository
- Lists the variables of the release environment
- Serves the non-secret client ID without a person
Lacks:
- No single print of a once-only person step across repositories
- No secret value read; the private key stays a person step
- No fallback to the template repository by itself
Proposed design
Problem statement
devops repos onboard asks a person for the release App client ID for each repository, although GitHub holds the value in the release environment of the template repository. It also prints each once-only person step under each repository. The output then reads as one manual step for each repository. The command must read the non-secret client ID from GitHub and print each once-only step one time.
Acceptance criteria
Requirement: Client ID read from the template repository
When github.release_app_client_id is not set, the onboard command SHALL read RELEASE_APP_CLIENT_ID from the release environment of the repository named by github.template_repository.
Scenario: Setting absent and template repository holds the variable
- WHEN the test runs the plan for a repository whose
releaseenvironment holdsRELEASE_APP_PRIVATE_KEY, with nogithub.release_app_client_id, and the fake GitHub API returnsRELEASE_APP_CLIENT_IDfor the template repository - THEN the client ID row shows
present, names the template repository as the source, and the plan prints no client ID person step for that repository.
Requirement: Client ID step stays when the read finds no variable
The onboard command SHALL print the client ID person step only when the read of RELEASE_APP_CLIENT_ID returns no value.
Scenario: Setting absent and template repository has no variable
- WHEN the test runs the plan with no
github.release_app_client_idand the fake GitHub API returns noRELEASE_APP_CLIENT_IDfor thereleaseenvironment of the template repository - THEN the plan prints the step
devops config set github.release_app_client_id <value>and the client ID row is notpresent.
Requirement: Once-only steps print one time per run
A run over more than one repository SHALL print each once-only person step one time, after the last report, with the count of repositories that wait for it.
Scenario: Two repositories wait for the same once-only steps
- WHEN the test runs
devops repos onboard --all --planover two repositories whosereleaseenvironment has noRELEASE_APP_CLIENT_IDand noRELEASE_APP_PRIVATE_KEY, with nogithub.release_app_client_id - THEN the output holds one client ID step and one private key step after the last report, each with the count 2, and no per-repository copy.
Requirement: Private key step names one command for later repositories
The private key person step MUST state that one devops config set github.release_app_private_key --from-file <file> serves each later repository.
Scenario: Private key step text
- WHEN the test runs the plan for a repository whose
releaseenvironment has noRELEASE_APP_PRIVATE_KEY - THEN the printed step names
devops config set github.release_app_private_key --from-file <file>and says that one command serves each later repository.
Existing Tool Considered
Verdict in-use for github/rest-api-description. The alternatives check in the issue body lists what the tool covers and lacks. The proposal reads the non-secret RELEASE_APP_CLIENT_ID through the GitHub session that already writes the variable. It adds the two parts that the tool lacks: the fallback to github.template_repository when the setting is absent, and one print of each once-only step for a run over many repositories. The added code is small and needs no new dependency.
Key questions
- Does row 5 read
RELEASE_APP_CLIENT_IDwhengithub.release_app_client_idis absent?: No. Row 5 reads the setting only. It prints the client ID step when the setting is absent, even when thereleaseenvironment holds the variable. [sources: src/devops_cli/github/onboard/settings_rows.py:58] - Which repository gives
RELEASE_APP_CLIENT_IDwhengithub.release_app_client_idis absent?: The repository named bygithub.template_repository, default dan-petty/infra. The command reads the variable from itsreleaseenvironment. (best practice) [sources: src/devops_cli/config/settings.py, docs/CONFIGURATION.md]- Chosen: Template repository from
github.template_repository. The proposed solution names it, and dan-petty/infra holds the release environment with the variable. - Rejected: First repository of the run. The first repository may lack the variable, and the source would change with the argument order.
- Rejected: Each repository's own
releaseenvironment. A repository that lacks the variable gives no value, so the command would still ask a person.
- Chosen: Template repository from
- How does the command read the environment variable?: Through the existing GitHub session (gidgethub), with
GET /repos/{owner}/{repo}/environments/release/variables/RELEASE_APP_CLIENT_ID. The command uses the same client that writes the variable. (best practice) [sources: src/devops_cli/github/onboard/settings_rows.py]- Chosen: Existing GitHub session (gidgethub). ADR 0006 requires gidgethub, and the command already writes the variable through that session.
- Rejected: Direct HTTP request with
requests. ADR 0006 sends GitHub requests through gidgethub, so a second client breaks the rule. - Rejected:
gh apisubprocess. AGENTS.md rule 7 says never run baregh, and a subprocess adds a process edge.
- When does the command print the client ID person step?: Only when the read of
RELEASE_APP_CLIENT_IDfrom the template repository returns no value. A repository whose variable holds the effective value shows row 5 aspresentand gets no step. (best practice) [sources: src/devops_cli/github/onboard/settings_rows.py:58]- Chosen: Print only when the read finds no variable. The proposed solution asks for it, and it removes the step for each repository that has the value.
- Rejected: Always print the step. It repeats a value that GitHub can answer, which is the first fault.
- Rejected: Print when the private key is absent. The client ID does not depend on the private key.
- How does a run over more than one repository print a once-only person step?: One time, after the last report, with the count of repositories that wait for it. (best practice) [sources: src/devops_cli/github/onboard/run.py]
- Chosen: One time after the last report with a count. It removes the repetition and keeps the count of repositories that wait.
- Rejected: Under each repository. It reads as one manual step for each repository, which is the second fault.
- Rejected: Before the first report. The reader sees the step before the rows that need it.
- Does the private key stay a person step?: Yes. GitHub returns no secret value, so the command keeps the
devops config set github.release_app_private_key --from-file <file>step. The text says that one command serves each later repository. (best practice) [sources: src/devops_cli/github/onboard/settings_rows.py]- Chosen: Keep the person step and name one command. GitHub returns no secret value, and one command serves later repositories.
- Rejected: Read the secret from the template repository. The GitHub API returns no secret value.
- Which test double does the plan test use for GitHub?: The fake GitHub repository in
tests/support/github_repository.py. The teststests/github/onboard/test_onboard_rows.pyandtests/commands/test_repos_onboard.pyuse it. [sources: tests/support/github_repository.py, tests/github/onboard/test_onboard_rows.py, tests/commands/test_repos_onboard.py]
Fit
Fits in one pull request.
Suspected block
None.
Dependencies
None.
Activity
dan-petty commentedon Nov 26, 2026
Both work on the devops repos onboard command, but 6773 builds the command while this candidate fixes a defect where it asks a person for a value it can read from GitHub.devops-cli-service commentedon Nov 26, 2026
The result in the alternatives block of the issue body changed. Before this check: no check. A person decides what the new result means for the item.
Searches (8)
Tools considered:
Searches run:
Sources:
devops-cli-service commentedon Nov 28, 2026
Next step: the stage job writes the plan of the item. See the section Proposed design of the body.
devops-cli-service commentedon Nov 29, 2026
Released in v0.243.1: https://github.com/dan-petty/devops-cli/releases/tag/v0.243.1
devops-cli-service commentedon Nov 29, 2026
Live since 2026-11-29 03:13 UTC