Skip to content

Commit

Permalink
Update github auth in publish script (#781)
Browse files Browse the repository at this point in the history
  • Loading branch information
KapJI authored Nov 3, 2023
1 parent 8a9abd3 commit e477609
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions script/publish_release.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import os
import sys

from github import Github, InputGitTreeElement
from github import Auth, Github, InputGitTreeElement
from github.ContentFile import ContentFile
from github.GitRelease import GitRelease
from github.Repository import Repository
Expand All @@ -16,8 +16,9 @@
def main() -> int:
"""Main function"""
github_token = os.environ.get("GITHUB_TOKEN")
assert github_token is not None, "GITHUB_TOKEN is not set"
print("Fetching draft release...")
github = Github(github_token)
github = Github(auth=Auth.Token(github_token))
repo = github.get_repo("leikoilja/ha-google-home")
release = repo.get_releases()[0]
if not release.draft:
Expand Down

0 comments on commit e477609

Please sign in to comment.