mirror of
https://github.com/YunoHost/yunorunner.git
synced 2024-09-03 20:05:52 +02:00
Accept header to explicly use github api v3
Co-authored-by: Kayou <pierre@kayou.io>
This commit is contained in:
parent
7dc11c02aa
commit
17fa0fea3e
1 changed files with 1 additions and 1 deletions
2
run.py
2
run.py
|
@ -1036,7 +1036,7 @@ async def github(request):
|
|||
# which is not represented in the original webhook
|
||||
async def is_user_in_organization(user):
|
||||
token = open("./github_bot_token").read().strip()
|
||||
async with aiohttp.ClientSession(headers={"Authorization": f"token {token}"}) as session:
|
||||
async with aiohttp.ClientSession(headers={"Authorization": f"token {token}", "Accept": "application/vnd.github.v3+json"}) as session:
|
||||
await resp = session.get(f"https://api.github.com/orgs/YunoHost-Apps/members/{user}")
|
||||
return resp.status == 204
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue