Merge pull request #1 from Sveimoldr/Sveimoldr-patch-1

Update publish-gh-release-notes.py
Added context-manager for github3.login() function.
This commit is contained in:
Leo Carvalho 2023-10-24 19:48:08 -03:00 committed by GitHub
commit 0164377a8a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -29,7 +29,7 @@ import pypandoc
def publish_github_release(slug, token, tag_name, body):
github = github3.login(token=token)
with github3.login(token=token) as github:
owner, repo = slug.split("/")
repo = github.repository(owner, repo)
return repo.create_release(tag_name=tag_name, body=body)