chore: upgrade octokit to v5 and probot to v14#477
Open
Miablo wants to merge 4 commits into
Open
Conversation
Contributor
Author
|
note: had to open new PR / create new mirror to handle merge commits |
wrslatz
reviewed
May 29, 2026
| </Link> | ||
| ) | ||
| data={ | ||
| mirrorPaginationSet as Array<{ |
Contributor
There was a problem hiding this comment.
Could satisfies be used here instead of forcing the type with as?
| forksLogger.error('Error fetching forks', { error }) | ||
| return error.data | ||
| }) | ||
| })) as ForksObject |
Contributor
There was a problem hiding this comment.
Same here with satisfies over as
| mirrorName: string, | ||
| ): Promise<RepoRef | undefined> => { | ||
| try { | ||
| // @ts-expect-error getCustomPropertiesValues exists in the API but is not yet in octokit 5 type definitions |
Contributor
There was a problem hiding this comment.
Is there a corresponding GitHub issue to track?
Contributor
Author
There was a problem hiding this comment.
on this repo or on the ts-expect-error repo? Only one I found was this one on the octokit side: octokit/octokit.js#2050
Contributor
There was a problem hiding this comment.
We should file one on our side to track the TODO, and then one upstream to fix the types
| @@ -0,0 +1,12 @@ | |||
| { | |||
| "extends": "./tsconfig.json", | |||
Contributor
There was a problem hiding this comment.
Is a separate test TSConfig needed?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pull Request
This PR will update Octokit and Probot along with updating any files based on the various majors we are updating to.
Closes #329
Proposed Changes
Upgrades Probot 13 → 14.3.2 and Octokit 3 → 5, aligning the entire @octokit/core dependency tree to a single deduped v7.0.6.
Key changes:
Type workarounds
Why: @primer/react's DataTable component uses ObjectPaths for the field prop type. Under moduleResolution: "bundler" (from @tsconfig/next), the generic Data parameter isn't inferred from the data prop and falls back to UniqueRow, which only exposes "id" as a valid field. This is a known issue with @primer/react's draft DataTable generics.
When to remove: When @primer/react updates DataTable to support moduleResolution: "bundler", or when DataTable moves out of drafts with fixed generic inference.
Why: rest.orgs.getAllCustomProperties() and rest.orgs.createOrUpdateCustomProperty() exist in the GitHub API and work at runtime, but octokit 5's bundled REST types (@octokit/plugin-rest-endpoint-methods) have not yet added these endpoints to their type definitions.
When to remove: When @octokit/plugin-rest-endpoint-methods adds the custom properties endpoints tracked upstream
Why: The visibility parameter for repos.createInOrg only types "private" | "public" in octokit 5, but "internal" is a valid value for GitHub Enterprise/GHEC orgs.
When to remove: When octokit's REST types add "internal" to the visibility union.
Readiness Checklist
Author/Contributor
npm run formatand fix any formatting issues that have been introducednpm run lintand fix any linting issues that have been introducednpm run testand run tests