Skip to content

Commit

Permalink
no-maintainer-assignee
Browse files Browse the repository at this point in the history
Signed-off-by: Ryan Northey <ryan@synca.io>
  • Loading branch information
phlax committed May 15, 2024
1 parent ef47414 commit a20b6f9
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions tools/repo/notify.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
CALENDAR = "https://calendar.google.com/calendar/ical/d6glc0l5rc3v235q9l2j29dgovh3dn48%40import.calendar.google.com/public/basic.ics"

ISSUE_LINK = "https://github.com/envoyproxy/envoy/issues?q=is%3Aissue+is%3Aopen+label%3Atriage"
PR_LINK = "https://github.com/envoyproxy/envoy/pulls?q=is%3Apr+is%3Aopen+no%3Aassignee+draft%3Afalse+-author%3Aapp%2Fdependabot"
PR_LINK = "https://github.com/envoyproxy/envoy/pulls?q=is%3Apr+draft%3Afalse+-author%3Aapp%2Fdependabot"
SLACK_EXPORT_URL = "https://api.slack.com/apps/A023NPQQ33K/oauth?"


Expand Down Expand Up @@ -158,6 +158,14 @@ async def oncall_slack_handle(self):
def opsgenie_to_slack(self):
return {v["opsgenie"]: v["slack"] for v in self.reviewers.values() if "opsgenie" in v}

@cached_property
def pr_link(self):
exclude_maintainers = "".join(
f"+-assignee%3A{assignee}"
for assignee
in self.maintainers)
return f"{PR_LINK}{exclude_maintainers}"

@async_property(cache=True)
async def tracked_prs(self):
# A dict of maintainer : outstanding_pr_string to be sent to slack
Expand Down Expand Up @@ -270,7 +278,7 @@ async def post_to_oncall(self):
await self.send_message(
channel='#envoy-maintainer-oncall',
text=(
f"*'Unassigned' PRs* (PRs with no maintainer assigned)\n{unassigned}\n<{PR_LINK}|{PR_LINK}>"
f"*'Unassigned' PRs* (PRs with no maintainer assigned)\n{unassigned}\n<{self.pr_link}|{self.pr_link}>"
))
await self.send_message(
channel='#envoy-maintainer-oncall',
Expand Down

0 comments on commit a20b6f9

Please sign in to comment.