fix: add filter for workspace integrations (#325)

* fix: add filter for workspace integrations

* fix: update url for delete

* fix: remove github installation when deleted

* fix: delete old repos

* fix: add filter on repository endpoints
This commit is contained in:
pablohashescobar 2023-02-23 23:56:48 +05:30 committed by GitHub
parent b53b0bc3f0
commit 517600ac89
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 78 additions and 7 deletions

View file

@ -60,3 +60,15 @@ def get_github_repos(access_tokens_url, repositories_url):
headers=headers,
).json()
return response
def delete_github_installation(installation_id):
token = get_jwt_token()
url = f"https://api.github.com/app/installations/{installation_id}"
headers = {
"Authorization": "Bearer " + token,
"Accept": "application/vnd.github+json",
}
response = requests.delete(url, headers=headers)
return response