Skip to content

Commit

Permalink
tools: making it clear when the ical code isn't working
Browse files Browse the repository at this point in the history
Signed-off-by: Alyssa Wilk <[email protected]>
  • Loading branch information
alyssawilk committed Jan 6, 2025
1 parent 2aaa544 commit 053424b
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions tools/repo/notify.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,8 +150,7 @@ async def oncall_slack_handle(self):
opsgenie_name = opsgenie_string.split(' ', 1)[0]
# Check that the name is in the OPSGENIE_TO_SLACK list, else cc alyssa.
if not (uid := self.opsgenie_to_slack.get(opsgenie_name)):
print("could not find", opsgenie_name)
return self.opsgenie_to_slack.get('Alyssa')
return None
return uid

@cached_property
Expand Down Expand Up @@ -265,8 +264,13 @@ async def post_to_oncall(self):
oncall = await self.oncall_string
await self.send_message(channel='#envoy-maintainer-oncall', text=(f"{oncall}"))
await self.send_message(channel='#general', text=(f"{oncall}"))
await self.send_message(
channel='#envoy-maintainer-oncall', text=(f"Oncall now <@{oncall_handle}>"))
if not oncall_handle:
await self.send_message(
channel='#envoy-maintainer-oncall',
text=(f"Unable to determine oncall <!here>"))
else:
await self.send_message(
channel='#envoy-maintainer-oncall', text=(f"Oncall now <@{oncall_handle}>"))
await self.send_message(
channel='#envoy-maintainer-oncall',
text=(f"*'Unassigned' PRs* (PRs with no maintainer assigned)\n{unassigned}"))
Expand Down

0 comments on commit 053424b

Please sign in to comment.