From bbb29ac5d8093ab0f0273ae9a76b531411106985 Mon Sep 17 00:00:00 2001 From: Jeremy Stanley Date: Tue, 15 Oct 2013 18:56:50 +0000 Subject: [PATCH] New headers argument for github.Issue.Issue * jeepyb/cmd/close_pull_requests.py: The pygithub module added a new positional argument for headers in the middle of other positional arguments to the __init__ method for CompletableGithubObject. This change passes an empty dict in for it to get the pull request closer working again, and also adds names for the other arguments so they will be easier to diagnose if this happens again. Change-Id: Iea2913a9c76b564e9e5186fb970032696d292c86 --- jeepyb/cmd/close_pull_requests.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/jeepyb/cmd/close_pull_requests.py b/jeepyb/cmd/close_pull_requests.py index 8abeda9..f3c4f4f 100644 --- a/jeepyb/cmd/close_pull_requests.py +++ b/jeepyb/cmd/close_pull_requests.py @@ -95,8 +95,9 @@ def main(): for req in pull_requests: vars = dict(project=project) issue_data = {"url": repo.url + "/issues/" + str(req.number)} - issue = github.Issue.Issue(req._requester, - issue_data, + issue = github.Issue.Issue(requester=req._requester, + headers={}, + attributes=issue_data, completed=True) issue.create_comment(MESSAGE % vars) req.edit(state="closed")