Skip to content
This repository was archived by the owner on Mar 14, 2023. It is now read-only.

Commit 748c035

Browse files
authored
Merge pull request #210 from GuillaumeGomez/run-rustdoc-ui
Start rustdoc UI tests when a PR is opened with changes on HTML/CSS/JS
2 parents 8810737 + d1e1642 commit 748c035

File tree

2 files changed

+20
-2
lines changed

2 files changed

+20
-2
lines changed

highfive/configs/rust-lang/rust.json

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,15 +38,25 @@
3838
},
3939
"mentions": {
4040
"src/librustdoc/html/static": {
41-
"message": "Some changes occurred in HTML/CSS.",
41+
"message": "Some changes occurred in HTML/CSS/JS.",
42+
"command": "@highfive: run-doc-ui",
43+
"reviewers": ["@GuillaumeGomez"]
44+
},
45+
"src/librustdoc/html/static/themes": {
46+
"message": "Some changes occurred in HTML/CSS themes.",
47+
"command": "@highfive: run-doc-ui",
4248
"reviewers": ["@GuillaumeGomez"]
4349
},
44-
"src/src/doc": {
50+
"src/doc": {
4551
"message": "Some changes occurred in HTML/CSS.",
4652
"reviewers": ["@GuillaumeGomez"]
4753
},
54+
"src/librustdoc/": {
55+
"command": "@highfive: run-doc-ui"
56+
},
4857
"error_codes.rs": {
4958
"message": "Some changes occurred in diagnostic error codes",
59+
"command": "@highfive: run-doc-ui",
5060
"reviewers": ["@GuillaumeGomez"]
5161
}
5262
},

highfive/newpr.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,13 +124,21 @@ def set_assignee(self, assignee, owner, repo, issue, user, author, to_mention):
124124
client.send_then_quit("{}: ping to review issue https://www.github.com/{}/{}/pull/{} by {}."
125125
.format(irc_name_of_reviewer, owner, repo, issue, author))
126126

127+
commands = {}
127128
if to_mention and len(to_mention) > 0:
128129
message = ''
129130
for mention in to_mention:
130131
if len(message) > 0:
131132
message += '\n\n'
132133
message += "%s\n\ncc %s" % (mention['message'],
133134
','.join([x for x in mention['reviewers'] if x != user]))
135+
cmd = mention.get('command')
136+
if cmd is not None:
137+
commands[cmd] = self.payload['pull_request', 'head', 'sha']
138+
for cmd in commands:
139+
if len(message) > 0:
140+
message += '\n\n'
141+
message += "%s %s" % (cmd, commands[cmd])
134142
self.post_comment(message, owner, repo, issue)
135143

136144
def get_irc_nick(self, gh_name):

0 commit comments

Comments
 (0)