Skip to content

Commit

Permalink
Merge branch 'main' of github.com:Code4GovTech/server into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
jaanbaaz committed Nov 7, 2024
1 parent ce97dec commit 86a973a
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions events/ticketEventHandler.py
Original file line number Diff line number Diff line change
Expand Up @@ -624,13 +624,15 @@ async def add_contributor(self, issue):
else:
angel_mentor = markdown_contents.get("Mentor(s)")

url = f'https://api.github.com/users/{angel_mentor}'
async with aiohttp.ClientSession() as session:
async with session.get(url) as response:
angel_mentor_data = await response.json()
if angel_mentor_data:
angel_mentor_id = angel_mentor_data["id"]
angel_mentor_detials = await self.postgres_client.get_data("github_id","contributors_registration", angel_mentor_id)
angel_mentor_detials = []
if angel_mentor:
url = f'https://api.github.com/users/{angel_mentor}'
async with aiohttp.ClientSession() as session:
async with session.get(url) as response:
angel_mentor_data = await response.json()
if angel_mentor_data:
angel_mentor_id = angel_mentor_data["id"]
angel_mentor_detials = await self.postgres_client.get_data("github_id","contributors_registration", angel_mentor_id)

mentor_data = {
"issue_id": get_issue[0]["id"],
Expand Down

0 comments on commit 86a973a

Please sign in to comment.