Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
simplify logic, print target
  • Loading branch information
Humbedooh committed Apr 4, 2022
1 parent 8d25985 commit e32fee6
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion notifier.py
Expand Up @@ -119,7 +119,9 @@ def get_recipient(self, repository, itype, action="comment"):

if scheme:
if itype not in ["commit", "jira"]:
it = "issues" if itype == "issue" else "pullrequests"
it = "issues"
if itype != "issues":
it = "pullrequests"
if action in ["comment", "diffcomment", "edited", "deleted", "created"]:
if ("%s_comment" % it) in scheme:
return scheme["%s_comment" % it]
Expand Down Expand Up @@ -183,6 +185,7 @@ def handle_payload(self, raw):
self.diffcomments[uid].add(filename, diff, text)

ml = self.get_recipient(repository, payload.get("type"), action)
print("notifying", ml)
ml_list, ml_domain = ml.split("@", 1)
if real_action in self.templates:
try:
Expand Down

0 comments on commit e32fee6

Please sign in to comment.