Skip to content

Add models for GitHub App #12070

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

Merged
merged 3 commits into from
Mar 26, 2025
Merged

Add models for GitHub App #12070

merged 3 commits into from
Mar 26, 2025

Conversation

stsewd
Copy link
Member

@stsewd stsewd commented Mar 25, 2025

Since we have only one service with this type of integration, I didn't abstract this as a general attribute (like service_installation or similar), as we don't know if other services will ever bring something similar, and if they do, we don't know how they would implement it.

Extracted from #11942

@stsewd stsewd requested a review from a team as a code owner March 25, 2025 20:50
@stsewd stsewd requested a review from humitos March 25, 2025 20:50
@stsewd stsewd requested a review from ericholscher March 25, 2025 20:50
Copy link
Member

@ericholscher ericholscher left a comment

Choose a reason for hiding this comment

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

This doesn't have the code for creating/managing this right -- just the start of the modeling?

Get or create a GitHub app installation.

Only the installation_id is unique, the target_id and target_type could change,
but this should never happen.
Copy link
Member

Choose a reason for hiding this comment

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

Heh... foreboding.

Comment on lines +247 to +248
# When an installation is deleted, we delete all its remote repositories
# and relations, users will need to manually link the projects to each repository again.
Copy link
Member

Choose a reason for hiding this comment

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

Is there a nicer UI we can build for that in the future? Seems like a pretty large downside.

Copy link
Member Author

Choose a reason for hiding this comment

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

Maybe something that facilitates re-connection in batch, maybe could be exposed as an API to start. But I only see this a problem for users with lots of repos connected, re-connection is straightforward, just select the repo from the settings and click save.

@stsewd
Copy link
Member Author

stsewd commented Mar 26, 2025

This doesn't have the code for creating/managing this right -- just the start of the modeling?

Yep, the service itself will be in the next PR.

@stsewd stsewd merged commit 71f3862 into main Mar 26, 2025
3 of 5 checks passed
@stsewd stsewd deleted the add-gh-app-models branch March 26, 2025 14:55
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