Skip to content

fix: show startup warning for missing GITHUB_TOKEN in production - #107

Merged
SamXop123 merged 1 commit into
SamXop123:mainfrom
rishab11250:fix/show-env-warning-production
May 29, 2026
Merged

fix: show startup warning for missing GITHUB_TOKEN in production#107
SamXop123 merged 1 commit into
SamXop123:mainfrom
rishab11250:fix/show-env-warning-production

Conversation

@rishab11250

Copy link
Copy Markdown
Contributor

Description

The validateEnv() function in src/server.js suppressed all startup warnings in production mode (NODE_ENV=production). This meant if GITHUB_TOKEN was not set, the app ran silently with only 60 unauthenticated API requests per hour instead of 5000 — users saw mysterious rate-limit errors with zero server-side diagnostics.

Change

Removed the !IS_PRODUCTION guard so critical environment warnings always display at startup, regardless of environment.

Before

if (!IS_PRODUCTION && warnings.length > 0) {

After

if (warnings.length > 0) {

Testing

  • Ran npm test — all existing tests pass (3 pre-existing failures unrelated to this change)
  • Tested manually: warning prints in both development and production when GITHUB_TOKEN is missing
  • Tested manually: no warning prints when GITHUB_TOKEN is set

Closes #103

@vercel

vercel Bot commented May 28, 2026

Copy link
Copy Markdown

@rishab11250 is attempting to deploy a commit to the Dot_NotSam's projects Team on Vercel.

A member of the Team first needs to authorize it.

@SamXop123
SamXop123 merged commit dcfaa22 into SamXop123:main May 29, 2026
0 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix: show startup warning for missing GITHUB_TOKEN in production

2 participants