From 6505ebde8615b7a9ed16873739252c1f73629e57 Mon Sep 17 00:00:00 2001 From: Leo Carvalho <38107116+Sveimoldr@users.noreply.github.com> Date: Tue, 24 Oct 2023 19:47:28 -0300 Subject: [PATCH] Update publish-gh-release-notes.py added context-manager for github3.login() function. --- scripts/publish-gh-release-notes.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/publish-gh-release-notes.py b/scripts/publish-gh-release-notes.py index 68cbd7adf..94725f4d2 100644 --- a/scripts/publish-gh-release-notes.py +++ b/scripts/publish-gh-release-notes.py @@ -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)