Skip to content

Commit 6e8f5b2

Browse files
committed
767: check for GITHUB_TOKEN
1 parent 7d27c54 commit 6e8f5b2

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

triage/weekly_report.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,8 @@ def make_req():
178178
url = f'https://api.github.com/repos/rust-lang/rust/pulls/{pr}'
179179
req = urllib.request.Request(url)
180180
req.add_header('Content-Type', 'application/json')
181-
req.add_header('Authorization', f'token {getenv("GITHUB_TOKEN")}')
181+
if getenv("GITHUB_TOKEN") is not None:
182+
req.add_header('Authorization', f'token {getenv("GITHUB_TOKEN")}')
182183

183184
with urllib.request.urlopen(req) as f:
184185
data = json.loads(f.read())

0 commit comments

Comments
 (0)