Skip to content

feat(cli): warn at startup when a run has no GitHub token - #110

Merged
goldbarth merged 1 commit into
mainfrom
feat/89-unauthenticated-run-notice
Sep 4, 2026
Merged

goldbarth merged 1 commit into
mainfrom
feat/89-unauthenticated-run-notice

Conversation

@goldbarth

Copy link
Copy Markdown
Owner

What does this PR do?

A run that starts without a GitHub token now says so before it does any work, on stderr:

Warning: no GitHub token found in GITHUB_TOKEN - the run continues unauthenticated.
  GitHub allows 60 requests an hour per IP address without one, and a run
  spends roughly one per pull request, so a release can exhaust the budget
  partway through. A token raises the limit to 5000.
  Set one with: export GITHUB_TOKEN=$(gh auth token)

The run is not refused - a token is optional and a small release fits the anonymous budget. The message names whichever variable the run actually reads, so it stays true when github.tokenEnvironmentVariable was renamed, and it goes to stderr so redirecting the changelog to a file keeps it out.

README.md and docs/configuration.md now state the practical limit instead of only listing the variable.

Why?

Closes #89.

Without a token GitHub allows 60 requests an hour per IP address, and Chartula spends roughly one per pull request. Nothing said so. The run started silently, and when the budget ran out it failed partway through with a 403 that names a commit:

Error: GitHub API returned 403 rate limit exceeded for commit 8061f468...
API rate limit exceeded for <ip>. (But here's the good news: Authenticated requests get a higher rate limit.)

The cause is one environment variable, but nothing on that path points at it - and the budget is shared with everything else reaching GitHub from that address, so the failure can arrive on a first run.

Verified against this repository: without a token the warning is printed and the run then hits the same 403 as before; with a token set, nothing is printed.

Type of change

  • Bug fix
  • New feature
  • Documentation
  • Refactor / internal
  • Breaking change

Checklist

  • The project builds and tests pass (393 tests, -c Release, no warnings)
  • Code follows the formatting in .editorconfig
  • I've added or updated tests where it makes sense
  • I've updated documentation where relevant
  • No secrets or API keys are included in this change

🤖 Generated with Claude Code

https://claude.ai/code/session_01EYboKFBXJCXdKFM1TL7eFu

Without a token GitHub allows 60 requests an hour per IP address, and a run
spends roughly one per pull request. The run was not told that anywhere: it
started silently and failed partway through with a 403 naming a commit rather
than the cause.

The run still starts - a small release fits the budget - but it now says on
stderr that it is unauthenticated, what the limit is, and how to raise it.
The message names whichever variable the run reads, so it stays true when
tokenEnvironmentVariable was renamed. README and docs/configuration.md state
the practical limit instead of only listing the variable.

Closes #89

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01EYboKFBXJCXdKFM1TL7eFu
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

A run without GITHUB_TOKEN exhausts the API budget mid-release

1 participant