Skip to content

Refactor good-first-issue.js for consistency - #1084

Open
Vishal-ghorpade wants to merge 1 commit into
cutenode:masterfrom
Vishal-ghorpade:patch-1
Open

Refactor good-first-issue.js for consistency#1084
Vishal-ghorpade wants to merge 1 commit into
cutenode:masterfrom
Vishal-ghorpade:patch-1

Conversation

@Vishal-ghorpade

Copy link
Copy Markdown

Hi maintainers 👋,

I noticed that when the GitHub API rate limit is exceeded, the CLI currently prints the full JSON error object. For new contributors, this can be overwhelming and makes the tool harder to use.

This PR improves the developer experience by:

  • Catching the 403 rate‑limit error in bin/good-first-issue.js.
  • Printing a concise, user‑friendly warning instead of raw JSON.
  • Suggesting authentication with a personal access token for higher limits.

Before:

RequestError [HttpError]: API rate limit exceeded for ...
{ huge JSON dump }

After:

⚠️ GitHub API rate limit exceeded.
Tip: Authenticate with a personal access token to get a higher limit.
See: https://docs.github.com/en/rest/overview/resources-in-the-rest-api#rate-limiting

This change keeps the CLI output clean and beginner‑friendly, while still guiding users toward the right solution. I believe this small improvement makes the tool more approachable for first‑time contributors.

Looking forward to your feedback, and happy to adjust if you’d prefer different wording or formatting.

 What Changed
- The old catch (err) block that printed console.error(err) has been replaced.
- Now, if the error is a rate limit exceeded (403), it prints a clear warning with guidance.
- Any other error prints a short “Unexpected error” message instead of dumping JSON.
@bnb

bnb commented Apr 28, 2026

Copy link
Copy Markdown
Member

please fix your formatter.

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.

2 participants