changeset 0a0bc7b55aff in tryton-tools:default
details: https://hg.tryton.org/tryton-tools?cmd=changeset&node=0a0bc7b55aff
description:
Use user id to check in nosy list
diffstat:
reviewbot.py | 12 ++++++------
1 files changed, 6 insertions(+), 6 deletions(-)
diffs (49 lines):
diff -r 38063712b02b -r 0a0bc7b55aff reviewbot.py
--- a/reviewbot.py Sat Apr 17 01:05:16 2021 +0200
+++ b/reviewbot.py Sat Apr 17 14:29:34 2021 +0200
@@ -132,7 +132,7 @@
s.quit()
-def process_issue(session, roundup, issue_id, fromaddr, username, force=False):
+def process_issue(session, roundup, issue_id, fromaddr, userid, force=False):
issue_info = session.get(CODEREVIEW_URL
+ '/'.join(['', 'api', str(issue_id)]))
issue_info.raise_for_status()
@@ -154,7 +154,7 @@
description = issue_info.get('description', '')
link_roundup(
- roundup, issue_id, patchset, description, fromaddr, username)
+ roundup, issue_id, patchset, description, fromaddr, userid)
match = TITLE_FORMAT.match(issue_info['subject'])
if not match:
@@ -205,7 +205,7 @@
def link_roundup(
- roundup, review_id, patchset, description, fromaddr, username):
+ roundup, review_id, patchset, description, fromaddr, userid):
matches = ISSUE_FORMAT.finditer(description)
for match in matches:
issue_id = match.groupdict()['issue_id']
@@ -220,7 +220,7 @@
reviews = ''
reviews = list(filter(None, map(str.strip, reviews.split(','))))
if review_id in reviews:
- new = username not in nosy
+ new = userid not in nosy
send_msg(fromaddr, issue_id, patchset, review_id, new)
@@ -258,7 +258,7 @@
fetch_issues(CODEREVIEW_URL + '/rss/all', session)))
else:
issues = args.issues
+ userid = roundup.lookup('user', args.username)
for issue in reversed(issues):
process_issue(
- session, roundup, issue, args.email, args.username,
- force=args.force)
+ session, roundup, issue, args.email, userid, force=args.force)