Skip to content

Commit

Permalink
assignees, label changes and domain not setting changes
Browse files Browse the repository at this point in the history
  • Loading branch information
jaanbaaz committed Nov 25, 2024
1 parent c33770e commit 5ddf1be
Showing 1 changed file with 14 additions and 4 deletions.
18 changes: 14 additions & 4 deletions events/ticketEventHandler.py
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,12 @@ async def onTicketCreate(self, eventData):
mentor = markdown_contents.get("Mentor(s)")
contributor = markdown_contents.get("Contributor")
designer = markdown_contents.get("Designer")
labels = issue["labels"]

labels = issue["labels"] # Assuming this contains the list of labels
desired_labels = ['C4GT Coding', 'C4GT Advisory', 'C4GT Mentorship', 'C4GT Design', 'C4GT Bounty']
# Filter the labels to include only the desired ones
filtered_labels = [label for label in labels if label in desired_labels]

category = markdown_contents.get("Category")
domain = markdown_contents.get("Domain")
print("complexity", complexity)
Expand All @@ -215,7 +220,7 @@ async def onTicketCreate(self, eventData):
"status": issue["state"],
"link": issue["html_url"],
"org_id": org[0]["id"],
"labels": [l['name'] for l in labels],
"labels": filtered_labels,
"issue_id": issue["id"],
"created_at": created_at,
"domain": domain,
Expand Down Expand Up @@ -290,7 +295,12 @@ async def onTicketEdit(self, eventData):
mentor = markdown_contents.get("Mentors")
contributor = markdown_contents.get("Contributor")
designer = markdown_contents.get("Designer")
labels = issue["labels"]

labels = issue["labels"] # Assuming this contains the list of labels
desired_labels = ['C4GT Coding', 'C4GT Advisory', 'C4GT Mentorship', 'C4GT Design', 'C4GT Bounty']
# Filter the labels to include only the desired ones
filtered_labels = [label for label in labels if label in desired_labels]

category = markdown_contents.get("Category")
domain = markdown_contents.get("Domain")
print("complexity", complexity)
Expand All @@ -309,7 +319,7 @@ async def onTicketEdit(self, eventData):
"status": issue["state"],
"link": issue["html_url"],
"org_id": org[0]["id"],
"labels": [l['name'] for l in labels],
"labels": filtered_labels,
"issue_id": issue["id"],
"project_type": category,
"domain": domain,
Expand Down

0 comments on commit 5ddf1be

Please sign in to comment.