-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: use GithubAppInstallation in api (#347)
* feat: use GithubAppInstallation in api Uses the gh app installation WITHOUT compromising the old usage (of `owner.integration_id`). Deprecated paths are marked so. These changes don't backfill old data, but start using the new model with webhooks. the sample data from tests (the keys) are taken from [github docs](https://docs.github.com/en/webhooks/webhook-events-and-payloads#installation) and some amount of empirical data. depends on: #346 * refactor webhook handling related to gh app installation * use ghapp when getting torngit adapter Considers ghapp installations when deciding if a torngit adapter is for a repo with integration or not. If a ghapp installation exist then repo is considered to be using integration if it's covered by the installation. Otherwise previous behavior is used. The test `test_get_adapter_sets_token_to_bot_when_user_not_authenticated` includes `owner` as `None` when calling `RepoProviderService.get_adapter` so I'm assuming that can happen, and changing the typehint in the function. Other functions that were typehinted with `Owner` instead of `Optional[Owner]` are also changed.
- Loading branch information
1 parent
fd02145
commit 86178ba
Showing
8 changed files
with
922 additions
and
202 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.