Skip to content

Commit

Permalink
Remove spammy invitation accepted webhook notifications
Browse files Browse the repository at this point in the history
  • Loading branch information
cbrxyz committed Sep 8, 2024
1 parent f02d4a2 commit 13ed24c
Showing 1 changed file with 0 additions and 16 deletions.
16 changes: 0 additions & 16 deletions src/webhooks.py
Original file line number Diff line number Diff line change
Expand Up @@ -246,22 +246,6 @@ async def organization_member_invited(self, payload: ClientPayload):
f"{name} invited {invited} to {org} in the following teams: {{{teams}}}",
)

@Server.route()
async def organization_member_added(self, payload: ClientPayload):
gh = payload.github_data
# Send a message to software-leadership in the form of:
# [User A](link) accepted an invitation to join [organization_name](link)
name = (
f"[{await self.real_name(gh['membership']['user']['login'])}]({self.url(gh['membership']['user'], html=True)})"
if "user" in gh["membership"]
else gh["membership"]["email"]
)
org = f"[{gh['organization']['login']}]({self.url(gh['organization'])})"
updates_channel = self.leaders_channel(gh["organization"]["login"])
await updates_channel.send(
f"{name} accepted an invitation to join {org}",
)

@Server.route()
async def organization_member_removed(self, payload: ClientPayload):
gh = payload.github_data
Expand Down

0 comments on commit 13ed24c

Please sign in to comment.