Skip to content

Commit e477609

Browse files
authored
Update github auth in publish script (#781)
1 parent 8a9abd3 commit e477609

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

script/publish_release.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
import os
88
import sys
99

10-
from github import Github, InputGitTreeElement
10+
from github import Auth, Github, InputGitTreeElement
1111
from github.ContentFile import ContentFile
1212
from github.GitRelease import GitRelease
1313
from github.Repository import Repository
@@ -16,8 +16,9 @@
1616
def main() -> int:
1717
"""Main function"""
1818
github_token = os.environ.get("GITHUB_TOKEN")
19+
assert github_token is not None, "GITHUB_TOKEN is not set"
1920
print("Fetching draft release...")
20-
github = Github(github_token)
21+
github = Github(auth=Auth.Token(github_token))
2122
repo = github.get_repo("leikoilja/ha-google-home")
2223
release = repo.get_releases()[0]
2324
if not release.draft:

0 commit comments

Comments
 (0)