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:
commit
0164377a8a
|
@ -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