We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8a9abd3 commit e477609Copy full SHA for e477609
1 file changed
script/publish_release.py
@@ -7,7 +7,7 @@
7
import os
8
import sys
9
10
-from github import Github, InputGitTreeElement
+from github import Auth, Github, InputGitTreeElement
11
from github.ContentFile import ContentFile
12
from github.GitRelease import GitRelease
13
from github.Repository import Repository
@@ -16,8 +16,9 @@
16
def main() -> int:
17
"""Main function"""
18
github_token = os.environ.get("GITHUB_TOKEN")
19
+ assert github_token is not None, "GITHUB_TOKEN is not set"
20
print("Fetching draft release...")
- github = Github(github_token)
21
+ github = Github(auth=Auth.Token(github_token))
22
repo = github.get_repo("leikoilja/ha-google-home")
23
release = repo.get_releases()[0]
24
if not release.draft:
0 commit comments