Skip to content

feat(github): write a Renovate App installation token to a file - #5994

Merged
dan-petty merged 3 commits into
mainfrom
feat/4897-renovate-app-token
Nov 16, 2026
Merged

dan-petty merged 3 commits into
mainfrom
feat/4897-renovate-app-token

Conversation

@dan-petty

Copy link
Copy Markdown
Owner

Add devops gh app-token --app renovate --write <path> for self-hosted Renovate (#4893). Renovate takes only a GitHub App installation token, which GitHub ends after 1 hour. The command reuses the gidgethub minting code of the Service App, asks only for the 9 Renovate permissions, and writes the token with mode 0600. It never prints or logs the token. --dry-run sends no request and shows the token as a placeholder. A setting that is not set gives an error that names the setting and its variable.

It reads renovate.github_app_id (the App ID or the Client ID), renovate.github_app_installation_id and the credential renovate.github_app_private_key.

The owner named the App dan-petty-renovate (2026-11-16), so Fail-to-Pass Check skips dan-petty-renovate[bot].

After the merge, the owner creates and installs the App and sets the 3 settings with devops config set (#4893 owner steps 1 to 3).

Closes #4897
Change: openspec/changes/archive/2026-11-16-4897-renovate-app-token/

@dan-petty dan-petty added type/feature Type feature: a new function scope/github GitHub Projects v2, Views, Milestones, Labels, and PR automation labels Nov 16, 2026
@dan-petty

Copy link
Copy Markdown
Owner Author

Owner steps after the merge (#4893 owner steps 1 to 3). Only a person does these steps.

  1. The GitHub App dan-petty-renovate exists (owner, 2026-11-16). Make sure that it has the repository permissions of feat(deps): track regular version updates with Renovate #4893 step 1: Administration Read-only; Checks, Commit statuses, Contents, Issues, Pull requests and Workflows Read and write; Dependabot alerts and Metadata Read-only. The token asks for exactly these 9.
  2. Install the App on the 7 Service repositories (service.repos). Write down the installation ID.
  3. Unlock the keyring with uv run devops devcontainer unlock-keyring. Then run:
    • uv run devops config set renovate.github_app_id <app-id-or-client-id> (the App ID or the Client ID Iv23...; GitHub takes both)
    • uv run devops config set renovate.github_app_installation_id <installation-id>
    • uv run devops config set renovate.github_app_private_key --from-file <key.pem>
      Then delete the downloaded key file.
  4. Optional check: uv run devops gh app-token --app renovate --write <scratch-file> --dry-run shows the request. A run without --dry-run writes the token with mode 0600. Delete that file after the check.

The Fail-to-Pass Check now skips dan-petty-renovate[bot]. If the App gets another name, tell the agent.

@dan-petty
dan-petty force-pushed the feat/4897-renovate-app-token branch from 7b3d987 to 2903d27 Compare November 16, 2026 17:25
Add `devops gh app-token --app renovate --write <path>`. It mints an
installation token of the Renovate GitHub App through the existing
gidgethub minting code, asks only for the 9 Renovate permissions, and
writes the token to the file with mode 0600. It never prints the token.
`renovate.github_app_id` takes the App ID or the Client ID.

Fail-to-Pass Check now skips `dan-petty-renovate[bot]`, the name that
the owner gave the App on 2026-11-16.

Refs #4897
@dan-petty
dan-petty force-pushed the feat/4897-renovate-app-token branch from 2903d27 to 2194728 Compare November 16, 2026 17:36
@dan-petty
dan-petty marked this pull request as ready for review November 16, 2026 17:46
@dan-petty
dan-petty merged commit b2c6264 into main Nov 16, 2026
24 checks passed
@dan-petty
dan-petty deleted the feat/4897-renovate-app-token branch November 16, 2026 17:47
dan-petty pushed a commit that referenced this pull request Nov 16, 2026
🤖 I have created a release *beep* *boop*
---


##
[0.166.0](v0.165.2...v0.166.0)
(2026-11-16)


### Features

* **ai:** Route DeepSeek calls around a stalled provider
([#5995](#5995))
([183a75a](183a75a))
* **github:** write a Renovate App installation token to a file
([#5994](#5994))
([b2c6264](b2c6264)),
closes [#4897](#4897)
* **roadmap:** Check each PR attribute in the open step
([#5981](#5981))
([69bf1aa](69bf1aa))
* **roadmap:** Retry a refused pull request body once
([#5929](#5929))
([8ebf3ce](8ebf3ce))
* **roadmap:** show a stopped item's class and next action
([#5946](#5946))
([4bd6128](4bd6128))


### Bug Fixes

* **ci:** Pin the devcontainer feature releases
([#5936](#5936))
([efbfc05](efbfc05))
* **roadmap:** Keep the Planned limit in the stage job
([#5940](#5940))
([4758ddd](4758ddd))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: dan-petty-release[bot] <346998822+dan-petty-release[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

scope/github GitHub Projects v2, Views, Milestones, Labels, and PR automation type/feature Type feature: a new function

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(github): write a Renovate App installation token to a file

1 participant