fix: Load GitHub token from ~/.config/github/token (closes #74)
All checks were successful
Smoke Test / smoke (pull_request) Successful in 13s
All checks were successful
Smoke Test / smoke (pull_request) Successful in 13s
This commit is contained in:
@@ -9,10 +9,15 @@ DAYS=${1:-30}
|
||||
|
||||
echo "Running TurboQuant upstream watch for last $DAYS days..."
|
||||
|
||||
# Check if GitHub token is set
|
||||
# Check if GitHub token is set (env var or ~/.config/github/token file)
|
||||
if [ -z "$GITHUB_TOKEN" ] && [ -f "$HOME/.config/github/token" ]; then
|
||||
export GITHUB_TOKEN=$(cat "$HOME/.config/github/token" | tr -d '[:space:]')
|
||||
echo "Loaded GitHub token from ~/.config/github/token"
|
||||
fi
|
||||
|
||||
if [ -z "$GITHUB_TOKEN" ]; then
|
||||
echo "Warning: GITHUB_TOKEN not set. Using unauthenticated API (60 req/hour limit)."
|
||||
echo "Set GITHUB_TOKEN for higher rate limits."
|
||||
echo "Set GITHUB_TOKEN or create ~/.config/github/token for higher rate limits."
|
||||
echo ""
|
||||
fi
|
||||
|
||||
|
||||
Reference in New Issue
Block a user