Skip to content

Conversation

@pjlast
Copy link
Contributor

@pjlast pjlast commented Jun 25, 2025

Adds some docs on how to use GitHub Enterprise Apps (i.e. add the GitHub App manually)

Also mention how to set up an app-wide code host connection

@vercel
Copy link

vercel bot commented Jun 25, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
sourcegraph-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 26, 2025 10:29am

@pjlast pjlast marked this pull request as ready for review June 25, 2025 12:42
@pjlast pjlast requested a review from a team June 25, 2025 12:42
@pjlast pjlast changed the title Temp docs Add docs explaining Enterprise GitHub Apps and connections without installation IDs Jun 25, 2025
Copy link
Member

@eseliger eseliger left a comment

Choose a reason for hiding this comment

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

Great thanks!

When merged can you get back on https://linear.app/sourcegraph/issue/SRC-1330/factset-slow-page-load and recommend this as our proposed fix for their page load time issues? 🙏

Comment on lines 497 to 499
// To sync repositories from all installations of a GitHub App, omit the installationID field.
// To sync repositories from a specific installation only, include the installationID field.
"gitHubAppDetails": null,
Copy link
Member

Choose a reason for hiding this comment

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

this is the most useless piece of documentation btw 😆 the JSON schema renderer is so bad lol

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I know 😭 but it's where it would be :(

Copy link
Contributor Author

Choose a reason for hiding this comment

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

But it looks bad idk I'll remove it


There are two ways to connect a GitHub App:
1. **[Create a new GitHub App](#creating-a-new-github-app)** via Sourcegraph, which will set up all of the required permissions and automatically retrieve the credentials
2. **[Add an existing GitHub App](#adding-an-existing-github-app)** by providing the details of an existing GitHub App (required when using GitHub Enterprise Apps)
Copy link
Member

Choose a reason for hiding this comment

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

just wondering, is it theoretically possible to create a GHE App via the post method as well, we just don't support it right now?

Maybe we could look into that one day.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Nothing in the docs makes me believe that it's not possible, but the one customer that tried it (that we know of, at least) could not get it to work

Copy link
Member

Choose a reason for hiding this comment

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

we probably don't post the form to the right endpoint or so, the enterprise GH Apps page is in a completely different place 😬

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'll have a look! Maybe we can fix that

- **Client ID**: The unique identifier for your GitHub App
- **Private Key**: The private key generated for your GitHub App (in PEM format)
4. Click **Add GitHub App** to save the configuration.
5. Once added, you can manage installations and create code host connections just like with apps created through Sourcegraph.
Copy link
Member

Choose a reason for hiding this comment

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

do we need to call out here what we provision for GitHub Apps usually, so the webhook events, token scopes, etc are sufficient? Plus creating a client id/secret pair and adding it to auth.providers

@pjlast pjlast changed the title Add docs explaining Enterprise GitHub Apps and connections without installation IDs GitHub Enterprise Apps docs Jun 26, 2025
@pjlast pjlast merged commit ccb5eec into main Jun 26, 2025
9 checks passed
@pjlast pjlast deleted the petrilast-src-1267-feedback-on-github-apps-setup-for-multiple-organizations branch June 26, 2025 10:48
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.

3 participants