Update publish-gh-release-notes.py
added context-manager for github3.login() function.
This commit is contained in:
parent
c7e9b22f37
commit
6505ebde86
|
@ -29,7 +29,7 @@ import pypandoc
|
||||||
|
|
||||||
|
|
||||||
def publish_github_release(slug, token, tag_name, body):
|
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("/")
|
owner, repo = slug.split("/")
|
||||||
repo = github.repository(owner, repo)
|
repo = github.repository(owner, repo)
|
||||||
return repo.create_release(tag_name=tag_name, body=body)
|
return repo.create_release(tag_name=tag_name, body=body)
|
||||||
|
|
Loading…
Reference in New Issue