You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The numbers used when querying GitHub (repository count, pull request count, issue count, discussion count) are currently hardcoded in lib/github.ts. These should be configurable via runtime environment variables with sensible fallbacks so deployments can tune API usage without code changes.
Suggested env vars and defaults:
GITHUB_REPO_COUNT (default: 30)
GITHUB_PR_COUNT (default: 80)
GITHUB_ISSUE_COUNT (default: 20)
GITHUB_DISCUSSION_COUNT (default: 10)
Tasks
Update lib/github.ts to read the above env vars at runtime and parse them to integers. Use the listed defaults when values are missing or invalid.
Replace the hardcoded numbers in fetchUserDataFromGitHub variables/GraphQL call arguments (repoCount, prCount, issueCount, discussionCount) with the parsed values.
Add validation to ensure the values are positive integers and apply reasonable upper bounds to avoid accidental large queries.
Document the new env vars in .env.example and README.md (or relevant docs).
Add unit tests for the parsing/validation helper (if applicable) to ensure fallbacks and invalid values are handled.
Notes
These env vars should be read from the server/runtime environment (not client-side public vars). Keep existing defaults equal to the current hardcoded values to avoid behavior changes.
Tip
🚀 Want to contribute?
Comment assign me to be automatically assigned to this issue via our GitHub Actions bot. Happy coding! ✨
The numbers used when querying GitHub (repository count, pull request count, issue count, discussion count) are currently hardcoded in
lib/github.ts. These should be configurable via runtime environment variables with sensible fallbacks so deployments can tune API usage without code changes.Suggested env vars and defaults:
GITHUB_REPO_COUNT(default: 30)GITHUB_PR_COUNT(default: 80)GITHUB_ISSUE_COUNT(default: 20)GITHUB_DISCUSSION_COUNT(default: 10)Tasks
lib/github.tsto read the above env vars at runtime and parse them to integers. Use the listed defaults when values are missing or invalid.fetchUserDataFromGitHubvariables/GraphQL call arguments (repoCount,prCount,issueCount,discussionCount) with the parsed values..env.exampleandREADME.md(or relevant docs).Notes
Tip
🚀 Want to contribute?
Comment
assign meto be automatically assigned to this issue via our GitHub Actions bot. Happy coding! ✨