Skip to content

Commit 9227842

Browse files
committed
Format report build failure script
1 parent b7fdeb7 commit 9227842

1 file changed

Lines changed: 12 additions & 5 deletions

File tree

.circleci/report_nightly_build_failure.py

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,23 @@
33
44
This reports an error to the #nightly-build-failures Slack channel.
55
"""
6+
67
import os
8+
79
import requests
810

9-
if 'SLACK_WEBHOOK_URL' in os.environ:
11+
if "SLACK_WEBHOOK_URL" in os.environ:
1012
print("Reporting to #nightly-build-failures slack channel")
11-
response = requests.post(os.environ['SLACK_WEBHOOK_URL'], json={
12-
"text": "A Nightly build failed. See " + os.environ['CIRCLE_BUILD_URL'],
13-
})
13+
response = requests.post(
14+
os.environ["SLACK_WEBHOOK_URL"],
15+
json={
16+
"text": "A Nightly build failed. See " + os.environ["CIRCLE_BUILD_URL"],
17+
},
18+
)
1419

1520
print("Slack responded with:", response)
1621

1722
else:
18-
print("Unable to report to #nightly-build-failures slack channel because SLACK_WEBHOOK_URL is not set")
23+
print(
24+
"Unable to report to #nightly-build-failures slack channel because SLACK_WEBHOOK_URL is not set"
25+
)

0 commit comments

Comments
 (0)