Skip to content

Conversation

valentin0h
Copy link
Contributor

@valentin0h valentin0h commented Aug 17, 2025

Summary

Creates a new GitHub Conversations integration that syncs GitHub Discussions to GitBook conversations.

Key features

  • Syncs GitHub Discussion threads as GitBook conversations
  • Handles webhook events for discussion closures
  • Supports multiple GitHub installations per GitBook installation

Future work (separate PRs)

  • Create staging app
  • Handle user uninstalls to update GitBook installation (pending API changes), for proper cleanup. (not possible with installation token only, a user token is needed which has permissions on the installed target).
  • Implement setup_action=request handling, e.g when user doesn't have permissions to install the GitHub app in a repo/org

Copy link

changeset-bot bot commented Aug 17, 2025

⚠️ No Changeset found

Latest commit: da58d0d

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@valentin0h valentin0h force-pushed the github-community-conversations branch 3 times, most recently from 4127c18 to 40e3f62 Compare August 19, 2025 13:04
@valentin0h valentin0h changed the title GitHub conversations integration GitHub discussions integration Aug 19, 2025
Copy link

pkg-pr-new bot commented Aug 19, 2025

Open in StackBlitz

bun add https://pkg.pr.new/GitbookIO/integrations/@gitbook/api@946

commit: da58d0d

@valentin0h valentin0h marked this pull request as ready for review August 19, 2025 13:14
- store githubInstallationId in externalIds for filtering
- fix webhook payload parsing with separate parseWebhookDiscussionAsGitBook
- remove GitHubClient abstraction, use inline Octokit calls
- add webhook secret to manifest
replace custom types with official Octokit types

- Use components['schemas']['repository'] from @octokit/openapi-types for GitHubRepository
- Use WebhookComponents['schemas']['discussion'] for GitHubWebhookDiscussion
- Use WebhookComponents['schemas']['webhook-discussion-closed'] for GitHubWebhookPayload
- Improves type safety and maintainability by leveraging official GitHub API types

use generic syntax for GraphQL type assertion
@valentin0h valentin0h force-pushed the github-community-conversations branch from a6480db to da58d0d Compare August 19, 2025 15:47
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