Skip to content

chore(deps): replace ghissues with native fetch - #292

Closed
trivikr wants to merge 1 commit into
nodejs:mainfrom
trivikr:remove-ghissues
Closed

trivikr wants to merge 1 commit into
nodejs:mainfrom
trivikr:remove-ghissues

Conversation

@trivikr

@trivikr trivikr commented Nov 20, 2026

Copy link
Copy Markdown
Member

collectCommitLabels used ghissues only for get(), which wraps one GitHub REST call. This PR calls the issues endpoint with the built-in fetch and removes ghissues and its only dependency, ghutils.

  • Same endpoint (GET /repos/:owner/:repo/issues/:num) and same accept/Bearer headers, so label parsing, caching and error logging are unchanged.
  • Non-OK responses still throw Error from GitHub: <message>.
  • The user-agent header is now Node's default (node) instead of the one ghutils set.

Tested: npm test (lint plus all 22 tests, including the ones that fetch labels from the GitHub API).

collectCommitLabels only used ghissues.get(), which wraps a single
GitHub REST call. Call the issues endpoint with fetch directly and
drop ghissues and its ghutils dependency.
@rvagg

rvagg commented Nov 20, 2026

Copy link
Copy Markdown
Member

this is not obviously better, +9,-2, less test coverage for the particular call now; replacing a simple dependency is not always positive or even necessary, ghissues is maintained

@rvagg rvagg closed this Nov 20, 2026
@trivikr
trivikr deleted the remove-ghissues branch November 20, 2026 22:40
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