fix(renovate): authenticate as a Kamino-only bot user, not the job token #22

Merged
Defame1297 merged 1 commits from feat/renovate-bot-token into main 2026-10-26 13:57:08 +00:00
Owner

What

renovate.yml now takes RENOVATE_TOKEN from the repository secret RENOVATE_BOT_TOKEN (token of a Kamino-only bot user) instead of the workflow job token.

Why

Dry run 2445 got git working (#21) and then died on the pull request search: Renovate filters by its own username, which for the job token is the virtual user gitea-actions (uid 0), and Gitea answers 400 user does not exist. The job token cannot be used with Renovate.

Changes

  • .gitea/workflows/renovate.yml: RENOVATE_TOKEN: ${{ secrets.RENOVATE_BOT_TOKEN }}; permissions: contents: read; the job stops with a clear error when the secret is empty; the header comment explains the job token problem. The bearer extraheader git auth and the report check from #21 are unchanged.
  • CLAUDE.md, CONTRIBUTING.md: describe the bot user, its scopes (write:repository, write:issue, read:user), that it is a repository secret and not an org secret, and a rewritten open item for the first live run.

Prerequisites (done by the operator)

Kamino-only bot user with write access (no admin) as collaborator on this repository, no push to main, and the repository secret RENOVATE_BOT_TOKEN set.

Verified

actionlint, yamllint, python3 -m unittest discover -s tests/scripts (OK), and the commit hooks.

Not verified

  • That the bearer header is accepted for a personal access token (fallback: basic auth with the bot user name).
  • That the first live run can push a branch and open a PR.
  • That bot PRs trigger Lint and Build and are held by the required checks on main.
  • A dry run with the bot token: to be run after merge (Actions > Renovate > Run workflow, dry_run=true).

🤖 Generated with Claude Code

## What `renovate.yml` now takes `RENOVATE_TOKEN` from the repository secret `RENOVATE_BOT_TOKEN` (token of a Kamino-only bot user) instead of the workflow job token. ## Why Dry run 2445 got git working (#21) and then died on the pull request search: Renovate filters by its own username, which for the job token is the virtual user `gitea-actions` (uid 0), and Gitea answers `400 user does not exist`. The job token cannot be used with Renovate. ## Changes - `.gitea/workflows/renovate.yml`: `RENOVATE_TOKEN: ${{ secrets.RENOVATE_BOT_TOKEN }}`; `permissions: contents: read`; the job stops with a clear error when the secret is empty; the header comment explains the job token problem. The bearer extraheader git auth and the report check from #21 are unchanged. - `CLAUDE.md`, `CONTRIBUTING.md`: describe the bot user, its scopes (`write:repository`, `write:issue`, `read:user`), that it is a repository secret and not an org secret, and a rewritten open item for the first live run. ## Prerequisites (done by the operator) Kamino-only bot user with write access (no admin) as collaborator on this repository, no push to `main`, and the repository secret `RENOVATE_BOT_TOKEN` set. ## Verified actionlint, yamllint, `python3 -m unittest discover -s tests/scripts` (OK), and the commit hooks. ## Not verified - That the bearer header is accepted for a personal access token (fallback: basic auth with the bot user name). - That the first live run can push a branch and open a PR. - That bot PRs trigger Lint and Build and are held by the required checks on `main`. - A dry run with the bot token: to be run after merge (Actions > Renovate > Run workflow, `dry_run=true`). 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Claude added 1 commit 2026-10-26 13:56:12 +00:00
fix(renovate): authenticate as a Kamino-only bot user, not the job token
Molecule / molecule (pull_request) Skipped
Build / build (pull_request) Successful in 10s
Lint / lint (pull_request) Successful in 12s
4628989be3
Dry run 2445 showed Renovate cannot run on the job token: its pull request lookups filter by its own username, which is the virtual user gitea-actions, and Gitea answers 400 user does not exist. The workflow now reads the repository secret RENOVATE_BOT_TOKEN (token of a bot user with write access to this repository only); the job token is read-only. The empty-secret case fails with a clear message. Docs updated.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01MmzvM9skAvYcph2c9EiPcm
Defame1297 merged commit c8c23687e2 into main 2026-10-26 13:57:08 +00:00
Defame1297 deleted branch feat/renovate-bot-token 2026-10-26 13:57:08 +00:00
Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Mortis/Kamino#22