Skip to content

Commit 1e50763

Browse files
committed
Error if env var nto set
1 parent 2125dda commit 1e50763

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

private-sec-reporting.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@
88

99
orgs = ["jupyter", 'ipython', 'jupyterhub', 'jupyterlab']
1010
token = os.getenv("GH_TOKEN")
11+
if not token:
12+
print("[red]Error: GH_TOKEN environment variable not set[/red]")
13+
exit(1)
14+
1115
headers = {
1216
'Authorization': f'token {token}',
1317
'Accept': 'application/vnd.github.v3+json'

0 commit comments

Comments
 (0)