Skip to content

feat(github): add Vercel Connect support#650

Open
bensabic wants to merge 5 commits into
vercel-connect/basefrom
vercel-connect/github
Open

feat(github): add Vercel Connect support#650
bensabic wants to merge 5 commits into
vercel-connect/basefrom
vercel-connect/github

Conversation

@bensabic

@bensabic bensabic commented Jun 27, 2026

Copy link
Copy Markdown
Contributor

Adds Vercel Connect support to the GitHub adapter:

  • A new installationToken config option (string or resolver) supplies installation access tokens directly, skipping the GitHub App private-key JWT exchange.
  • A new optional webhookVerifier verifies inbound webhooks (Connect trigger-forwarded requests via a Vercel OIDC token) in place of the GitHub webhook secret.

Pair with connectGitHubAdapter() from @vercel/connect/chat. Includes a changeset (@chat-adapter/github minor).

Stacked on #647 (base vercel-connect/base).

Companion

@vercel/connect/chat subpath: vercel/vercel#16826.

CleanShot 2026-06-30 at 12 02 18
@bensabic bensabic requested a review from a team as a code owner June 27, 2026 08:58
@vercel

vercel Bot commented Jun 27, 2026

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
chat Ready Ready Preview, Comment, Open in v0 Jun 30, 2026 2:56am
chat-sdk-nextjs-chat Ready Ready Preview, Comment, Open in v0 Jun 30, 2026 2:56am
bensabic added 4 commits June 30, 2026 12:51
A new installationToken config option (string or resolver) supplies
installation access tokens directly, skipping the GitHub App private-key
JWT exchange, and an optional webhookVerifier verifies inbound webhooks
(e.g. Connect trigger-forwarded requests via a Vercel OIDC token) in
place of the GitHub webhook secret. Pair with connectGitHubAdapter()
from @vercel/connect/chat.

Signed-off-by: Ben Sabic <bensabic@users.noreply.github.com>
Wire the GitHub adapter via connectGitHubAdapter() from @vercel/connect/chat
(gated on GITHUB_CONNECTOR), replacing the stored GITHUB_TOKEN / GitHub App
private key + webhook secret auth, and update the env docs accordingly.

Signed-off-by: Ben Sabic <bensabic@users.noreply.github.com>
In Connect mode the adapter only holds an installation token, so it can't
auto-detect its bot user id via /user or /app (the latter needs the App's
JWT) — leaving self-message detection off and causing the bot to reply to
its own comments in a loop.

Now botUserId also auto-detects from the GITHUB_BOT_USER_ID env var, the
adapter learns its id from the first comment it posts, and detection skips
the unusable /app fallback in Connect mode (removing a misleading 401 log).
Set botUserId / GITHUB_BOT_USER_ID for reliable self-detection on
serverless, where the in-memory learned id doesn't survive cold starts.

Signed-off-by: Ben Sabic <bensabic@users.noreply.github.com>
The GitHub adapter now auto-detects GITHUB_BOT_USER_ID, so the example no
longer wires botUserId explicitly — set the env var to enable self-message
detection and avoid reply loops. Document it in .env.example.

Signed-off-by: Ben Sabic <bensabic@users.noreply.github.com>
@socket-security

socket-security Bot commented Jun 30, 2026

Copy link
Copy Markdown

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

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Addednpm/​@​vercel/​connect@​0.3.07710010098100

View full report

@vercel vercel Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Additional Suggestion:

.vercelignore ignores .git, removing the git repo from the Vercel build and breaking the docs lastModified() plugin (which shells out to git log), causing the docs build to fail with exit 128.

Fix on Vercel

Excluding .git from the deployment broke the fumadocs lastModified()
plugin, which shells out to `git log` and failed the docs build with
exit status 128. .git isn't the upload-size problem (node_modules is),
so keep it.

Signed-off-by: Ben Sabic <bensabic@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

1 participant