Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support GitHub App on an App level #62590

Open
pjlast opened this issue May 10, 2024 · 0 comments
Open

Support GitHub App on an App level #62590

pjlast opened this issue May 10, 2024 · 0 comments
Labels
team/source Tickets under the purview of Source - the one Source to graph it all

Comments

@pjlast
Copy link
Contributor

pjlast commented May 10, 2024

Our current GitHub App code host connections require an Installation ID, and is tied to a single App installation.

This has a limitation in that a new code host connection needs to be added for each installation. However, in setups where someone might have different orgs within their companies that get created and deleted, it could be desirable to have a single GitHub App code host connection that is not tied to a single installation, and instead works with all orgs the app is installed on.

This should be entirely possible, since we have access to the AppID, so we can use this endpoint to fetch a list of installations and iterate over them and sync repositories.

Some issues we may run into:

  • I think we'll need to store the installation ID of each installation associated with a repository. Otherwise I'm not sure how we'd do repo updates when we try to fetch a repo again. We'll need to grab an installation access token to do all of that, so we'll need the corresponding installation ID.
  • The GitHub code host connections code is going to get very messy, because we now have branching paths for PATs, Apps with Installation IDs, and Apps only. I'd recommend some heavy refactoring there to split these out into different code paths, instead of complicating the if statements even further.
    • We have tons of places in the GitHub code host connections where we do checks like this, which is where the additional check would be. I think we need to decide which code host connection it is when the connection gets created, and greatly simplify these checks.
@eseliger eseliger added the team/source Tickets under the purview of Source - the one Source to graph it all label May 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
team/source Tickets under the purview of Source - the one Source to graph it all
Projects
None yet
Development

No branches or pull requests

2 participants