Skip to content

Commit bed760f

Browse files
author
Sven Siegmund
committed
fix: fallback to GH_API_TOKEN
1 parent 03c4a27 commit bed760f

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/ci_starter/action.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,9 @@ def header(self) -> dict[str, str]:
6969
"Accept": "application.vnd.github+json",
7070
}
7171
if self.TOKEN:
72-
result.update(Authorization=f"token {self.TOKEN}")
72+
result.update(Authorization=f"Bearer {self.TOKEN}")
73+
elif token := getenv("GH_API_TOKEN"):
74+
result.update(Authorization=f"Bearer {token}")
7375
return result
7476

7577
def __repr__(self) -> str:

0 commit comments

Comments
 (0)