Skip to content

refactor(github): use Octokit REST namespace - #3166

Open
grolu wants to merge 1 commit into
gardener:masterfrom
grolu:codex/octokit-rest-endpoint-methods
Open

refactor(github): use Octokit REST namespace#3166
grolu wants to merge 1 commit into
gardener:masterfrom
grolu:codex/octokit-rest-endpoint-methods

Conversation

@grolu

@grolu grolu commented Aug 12, 2026

Copy link
Copy Markdown
Member

How to categorize this PR?

/area dev-productivity
/kind cleanup

What this PR does / why we need it:

Migrates the GitHub integration from Octokit's legacy root-level REST methods to the octokit.rest namespace. This removes reliance on the compatibility API while preserving the existing issue search, update, and comment behavior.

Which issue(s) this PR fixes:

None.

Special notes for your reviewer:

This follows the Octokit major update from #3146. The full pre-push verification completed successfully.

Release note:

NONE

Summary by CodeRabbit

  • Bug Fixes
    • Improved GitHub issue search, retrieval, updates, and comment creation by using the current REST API interface.
    • Maintained existing pagination, GraphQL behavior, query construction, and response handling.

@gardener-prow gardener-prow Bot added area/dev-productivity Developer productivity related (how to improve development) kind/cleanup Something that is not needed anymore and can be cleaned up cla: yes Indicates the PR's author has signed the cla-assistant.io CLA. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Aug 12, 2026
@coderabbitai

coderabbitai Bot commented Aug 12, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: f608382e-2c84-4b4a-a7fb-53e61ce1eee8

📥 Commits

Reviewing files that changed from the base of the PR and between 3b2ef86 and 6c6221c.

📒 Files selected for processing (3)
  • backend/__tests__/mocks/@octokit/core.js
  • backend/lib/github/index.js
  • backend/lib/github/octokit.js

📝 Walkthrough

Walkthrough

The GitHub client now uses Octokit’s rest namespace for issue operations. The Octokit mock uses the same namespace and the restEndpointMethods plugin.

Changes

Octokit REST migration

Layer / File(s) Summary
Configure Octokit REST methods
backend/lib/github/octokit.js, backend/__tests__/mocks/@octokit/core.js
The client and mock use restEndpointMethods. Mocked issue methods are exposed under octokit.rest.issues.
Migrate GitHub issue calls
backend/lib/github/index.js
Issue search, retrieval, updates, and comment creation use octokit.rest.issues.

Estimated code review effort: 1 (Trivial) | ~5 minutes

Possibly related PRs

Suggested reviewers: gardener-ci-robot

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description check ✅ Passed The description uses the required template and provides categorization, purpose, issue status, reviewer notes, and release-note information.
Title check ✅ Passed The title clearly and concisely describes the migration to Octokit’s REST namespace.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@grolu

grolu commented Aug 12, 2026

Copy link
Copy Markdown
Member Author

/hold
need to verify if this still works end-to-end

@gardener-prow gardener-prow Bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Aug 12, 2026
@grolu grolu added the area/ipcei IPCEI (Important Project of Common European Interest) label Aug 12, 2026

@petersutter petersutter left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm
/approve

@gardener-prow gardener-prow Bot added the lgtm Indicates that a PR is ready to be merged. label Aug 12, 2026
@gardener-prow

gardener-prow Bot commented Aug 12, 2026

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: petersutter

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@gardener-prow

gardener-prow Bot commented Aug 12, 2026

Copy link
Copy Markdown

LGTM label has been added.

DetailsGit tree hash: ef4356682be3ea1fb24aba2dacd2e9fa6d9afca1

@gardener-prow gardener-prow Bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Aug 12, 2026
@petersutter

Copy link
Copy Markdown
Member

need to verify if this still works end-to-end

fwiw I tested it and it seems to still work

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. area/dev-productivity Developer productivity related (how to improve development) area/ipcei IPCEI (Important Project of Common European Interest) cla: yes Indicates the PR's author has signed the cla-assistant.io CLA. do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. kind/cleanup Something that is not needed anymore and can be cleaned up lgtm Indicates that a PR is ready to be merged. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants