Skip to content

refactor: replace @octokit/rest with octokit#14

Merged
HugoRCD merged 3 commits intomainfrom
replace-octokit-rest-with-octokit
Feb 26, 2026
Merged

refactor: replace @octokit/rest with octokit#14
HugoRCD merged 3 commits intomainfrom
replace-octokit-rest-with-octokit

Conversation

@gr2m
Copy link
Copy Markdown
Contributor

@gr2m gr2m commented Feb 26, 2026

Summary

@octokit/rest is a legacy module that only covers the REST API client. The octokit package is the recommended all-batteries-included SDK that combines:

  • REST API client (octokit.rest.*)
  • GraphQL client
  • Webhooks handling
  • GitHub App authentication

This PR replaces @octokit/rest with octokit across the @github-tools/sdk package. All REST API calls now go through the octokit.rest.* namespace, which is functionally equivalent — no behavior changes.

Changes

  • Updated dependency from @octokit/rest to octokit in package.json
  • Changed imports in client.ts and type re-exports in types.ts
  • Updated all tool files (search.ts, repository.ts, pull-requests.ts, issues.ts, commits.ts) to use octokit.rest.* instead of octokit.*

Test plan

  • pnpm install succeeds
  • pnpm --filter @github-tools/sdk build succeeds
  • pnpm --filter @github-tools/sdk typecheck passes
  • Verify tools work end-to-end with a GitHub token

`@octokit/rest` is a legacy module. `octokit` is the recommended
all-batteries-included SDK that combines REST, GraphQL, webhooks,
and App auth in a single package.

All REST API calls now use `octokit.rest.*` namespace.

Made-with: Cursor
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Feb 26, 2026

Thank you for following the naming conventions! 🙏

@socket-security
Copy link
Copy Markdown

socket-security Bot commented Feb 26, 2026

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Addedtypescript-eslint@​8.56.11001007498100
Addedoctokit@​5.0.59910010086100
Updatedeslint@​10.0.2 ⏵ 9.39.38910010097100

View full report

@gr2m gr2m changed the title Replace @octokit/rest with octokit fix: replace @octokit/rest with octokit Feb 26, 2026
@gr2m gr2m changed the title fix: replace @octokit/rest with octokit refactor: replace @octokit/rest with octokit Feb 26, 2026
@gr2m gr2m marked this pull request as ready for review February 26, 2026 00:09
@HugoRCD HugoRCD merged commit 431804f into main Feb 26, 2026
7 checks passed
@HugoRCD HugoRCD deleted the replace-octokit-rest-with-octokit branch February 26, 2026 16:25
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