|
15 | 15 |
|
16 | 16 | GITHUB_PROPERTIES_WHITELIST = ["*.labels"] |
17 | 17 |
|
18 | | -BUILD_SCHEDULED_MESSAGE = f"""\ |
19 | | -:robot: New build scheduled with the buildbot fleet by @{{user}} for commit {{commit}} :robot: |
| 18 | +BUILD_SCHEDULED_MESSAGE_TEMPLATE = """\ |
| 19 | +:robot: New build scheduled with the buildbot fleet by @{user} for commit {commit} :robot: |
20 | 20 |
|
21 | | -If you want to schedule another build, you need to add the <kbd>{{label}}</kbd> label again. |
| 21 | +If you want to schedule another build, you need to add the <kbd>{label}</kbd> label again. |
22 | 22 | """ |
23 | 23 |
|
24 | | -BUILD_COMMAND_SCHEDULED_MESSAGE = f"""\ |
25 | | -:robot: New build scheduled with the buildbot fleet by @{{user}} for commit {{commit}} :robot: |
| 24 | +BUILD_COMMAND_SCHEDULED_MESSAGE_TEMPLATE = """\ |
| 25 | +:robot: New build scheduled with the buildbot fleet by @{user} for commit {commit} :robot: |
26 | 26 |
|
27 | | -The command will test the builders whose names match following regular expression: `{{filter}}` |
| 27 | +The command will test the builders whose names match following regular expression: `{filter}` |
28 | 28 |
|
29 | 29 | The builders matched are: |
30 | | -{{builders}} |
| 30 | +{builders} |
31 | 31 | """ |
32 | 32 |
|
33 | 33 | BUILDBOT_COMMAND = re.compile(r"!buildbot (.+)") |
@@ -82,7 +82,7 @@ def _remove_label_and_comment(self, payload, label): |
82 | 82 | yield http.post( |
83 | 83 | url.replace(self.github_api_endpoint, ""), |
84 | 84 | json={ |
85 | | - "body": BUILD_SCHEDULED_MESSAGE.format( |
| 85 | + "body": BUILD_SCHEDULED_MESSAGE_TEMPLATE.format( |
86 | 86 | user=username, commit=commit, label=label |
87 | 87 | ) |
88 | 88 | }, |
@@ -273,7 +273,7 @@ def handle_issue_comment(self, payload, event): |
273 | 273 |
|
274 | 274 | yield self._post_comment( |
275 | 275 | payload["issue"]["comments_url"], |
276 | | - BUILD_COMMAND_SCHEDULED_MESSAGE.format( |
| 276 | + BUILD_COMMAND_SCHEDULED_MESSAGE_TEMPLATE.format( |
277 | 277 | user=payload["sender"]["login"], |
278 | 278 | commit=head_sha, |
279 | 279 | filter=builder_filter, |
|
0 commit comments