Repository navigation
feat(cli): warn at startup when a run has no GitHub token - #110
Merged
Merged
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
A run that starts without a GitHub token now says so before it does any work, on stderr:
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.tokenEnvironmentVariablewas renamed, and it goes to stderr so redirecting the changelog to a file keeps it out.README.mdanddocs/configuration.mdnow 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:
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
Checklist
-c Release, no warnings).editorconfig🤖 Generated with Claude Code
https://claude.ai/code/session_01EYboKFBXJCXdKFM1TL7eFu