Skip to content

chore: upgrade octokit to v5 and probot to v14#477

Draft
Miablo wants to merge 2 commits into
github-community-projects:mainfrom
capitalone-contributions:miablo-update-octokit
Draft

chore: upgrade octokit to v5 and probot to v14#477
Miablo wants to merge 2 commits into
github-community-projects:mainfrom
capitalone-contributions:miablo-update-octokit

Conversation

@Miablo
Copy link
Copy Markdown
Contributor

@Miablo Miablo commented May 21, 2026

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:

  • probot 13.4.7 → 14.3.2
  • octokit 3.2.2 → ^5.0.5
  • @octokit/auth-app 6.1.1 → ^7.1.5
  • next-auth 4.24.12 → 4.24.14 (fixes nodemailer peer dependency conflict)
  • @probot/octokit-plugin-config added at ^4.0.0
  • @octokit/openapi-webhooks-types-transition replaces @octokit/webhooks-types for test types
  • createNodeMiddleware() now awaited (async in Probot 14)
  • Legacy REST shortcuts replaced with context.octokit.rest.*
  • z.instanceof(Octokit) → z.custom() (Octokit v5 class structure no longer supports instanceof)
  • Non-null assertions added for repository.owner (nullable in Octokit v5 webhook types)

Type workarounds

  1. as any on DataTable columns (3 page files)

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.

  1. @ts-expect-error on custom properties API (repos/controller.ts)

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

  1. @ts-expect-error on 'internal' visibility (repos/controller.ts)

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

  • If documentation is needed for this change, has that been included in this pull request
  • run npm run format and fix any formatting issues that have been introduced
  • run npm run lint and fix any linting issues that have been introduced
  • run npm run test and run tests

@Miablo Miablo self-assigned this May 21, 2026
@Miablo
Copy link
Copy Markdown
Contributor Author

Miablo commented May 21, 2026

note: had to open new PR / create new mirror to handle merge commits

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Update Octokit to v5

1 participant