From d22f4be735c0870509b39d979596ddbca2a8c2ea Mon Sep 17 00:00:00 2001 From: Shinwell Hu Date: Thu, 28 May 2020 09:26:10 +0000 Subject: [PATCH 1/2] fix typo --- who_maintain.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/who_maintain.py b/who_maintain.py index 5fcdf278..44ea866d 100755 --- a/who_maintain.py +++ b/who_maintain.py @@ -32,7 +32,7 @@ def get_sigs(): def get_spec(pkg, specfile): - url = specfile_url.template.format(package=pkg, specfile=specfile) + url = specfile_url_template.format(package=pkg, specfile=specfile) req = urllib.request.Request(url=url, headers=headers) u = urllib.request.urlopen(req) return u.read().decode("utf-8") -- Gitee From 75494311af9f4dc97ff22c1e38b248c9dbcad2f7 Mon Sep 17 00:00:00 2001 From: Shinwell Hu Date: Thu, 28 May 2020 09:29:44 +0000 Subject: [PATCH 2/2] fix warning --- tc_reminder.py | 8 ++++---- who_maintain.py | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/tc_reminder.py b/tc_reminder.py index c4fe6c08..bb651c29 100755 --- a/tc_reminder.py +++ b/tc_reminder.py @@ -76,8 +76,8 @@ if __name__ == "__main__": adv = Advisor() PRs = adv.get_prs() for pr in PRs: - users = [] - users.append(pr["user"]["login"]) + commenters = [] + commenters.append(pr["user"]["login"]) last_update = pr["updated_at"] print("URL: https://gitee.com/openeuler/community/pulls/{number}".format(number=pr["number"])) print("Title: "+pr["title"]) @@ -85,8 +85,8 @@ if __name__ == "__main__": for c in comm: #print("comment updated at:") #pprint(datetime.strptime(c["updated_at"], adv.time_format)) - users.append(c["user"]["login"]) - tc = adv.filter_out_tc(users) + commenters.append(c["user"]["login"]) + tc = adv.filter_out_tc(commenters) print("Currently involved TC members: " + ", ".join(tc) + "\n") diff --git a/who_maintain.py b/who_maintain.py index 44ea866d..21ddd5e8 100755 --- a/who_maintain.py +++ b/who_maintain.py @@ -88,7 +88,7 @@ if __name__ == "__main__": if line.startswith("%changelog"): in_changelog = True if line.startswith("*") and in_changelog: - m = re.match(".*\d\d\d\d (.*) .*", line) + m = re.match(r".*\d\d\d\d (.*) .*", line) if m is None: emails.add(line) else: -- Gitee