From ca9aae29272146d75cd28c29bae5ce38cdfde919 Mon Sep 17 00:00:00 2001 From: Guillaume Gomez Date: Sat, 4 May 2019 13:39:37 +0200 Subject: [PATCH 1/2] Fixes failure in case no command is provided --- highfive/newpr.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/highfive/newpr.py b/highfive/newpr.py index a29fcf19..1ad7dee8 100644 --- a/highfive/newpr.py +++ b/highfive/newpr.py @@ -130,7 +130,12 @@ def set_assignee(self, assignee, owner, repo, issue, user, author, to_mention): for mention in to_mention: if len(message) > 0: message += '\n\n' - message += "%s\n\ncc %s" % (mention['message'], + msg = mention.get('message') + if msg is not None: + msg += '\n\n' + else: + msg = '' + message += "%s\n\ncc %s" % (msg, ','.join([x for x in mention['reviewers'] if x != user])) cmd = mention.get('command') if cmd is not None: From aae58051d0decb3a897a1bfc648f9b52d3a8148a Mon Sep 17 00:00:00 2001 From: Guillaume Gomez Date: Sat, 4 May 2019 13:39:52 +0200 Subject: [PATCH 2/2] Prevent useless rustdoc UI tests run --- highfive/configs/rust-lang/rust.json | 4 ---- highfive/newpr.py | 3 +-- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/highfive/configs/rust-lang/rust.json b/highfive/configs/rust-lang/rust.json index 26304b0c..e33b7aa7 100755 --- a/highfive/configs/rust-lang/rust.json +++ b/highfive/configs/rust-lang/rust.json @@ -47,10 +47,6 @@ "command": "@highfive: run-doc-ui", "reviewers": ["@GuillaumeGomez"] }, - "src/doc": { - "message": "Some changes occurred in HTML/CSS.", - "reviewers": ["@GuillaumeGomez"] - }, "src/librustdoc/": { "command": "@highfive: run-doc-ui" }, diff --git a/highfive/newpr.py b/highfive/newpr.py index 1ad7dee8..e3d00441 100644 --- a/highfive/newpr.py +++ b/highfive/newpr.py @@ -135,8 +135,7 @@ def set_assignee(self, assignee, owner, repo, issue, user, author, to_mention): msg += '\n\n' else: msg = '' - message += "%s\n\ncc %s" % (msg, - ','.join([x for x in mention['reviewers'] if x != user])) + message += "%scc %s" % (msg, ','.join([x for x in mention['reviewers'] if x != user])) cmd = mention.get('command') if cmd is not None: commands[cmd] = self.payload['pull_request', 'head', 'sha']