File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 33
44This reports an error to the #nightly-build-failures Slack channel.
55"""
6+
67import os
8+
79import 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
1722else :
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+ )
You can’t perform that action at this time.
0 commit comments