diff --git a/github/Issue.py b/github/Issue.py index 6a863638..e539cef4 100644 --- a/github/Issue.py +++ b/github/Issue.py @@ -406,7 +406,7 @@ class Issue(github.GithubObject.CompletableGithubObject): ] if "milestone" in attributes: # pragma no branch assert attributes["milestone"] is None or isinstance(attributes["milestone"], dict), attributes["milestone"] - self._milestone = None if attributes["milestone"] is None else github.Milestone.Milestone(self._requester, attributes["milestone"], completed=False) + self._milestone = None if attributes["milestone"] is None else github.Milestone.Milestone(self._requester, self._headers, attributes["milestone"], completed=False) if "number" in attributes: # pragma no branch assert attributes["number"] is None or isinstance(attributes["number"], (int, long)), attributes["number"] self._number = attributes["number"] diff --git a/github/Milestone.py b/github/Milestone.py index 2650d24b..9611d7b7 100644 --- a/github/Milestone.py +++ b/github/Milestone.py @@ -37,9 +37,6 @@ class Milestone(github.GithubObject.CompletableGithubObject): """ This class represents Milestones. The reference can be found here http://developer.github.com/v3/issues/milestones/ """ - def __init__(self, requester, attributes, completed): - # Adapte for __init__ change, remove later - github.GithubObject.CompletableGithubObject.__init__(self, requester, {}, attributes, completed) @property def closed_issues(self): diff --git a/github/Repository.py b/github/Repository.py index 12de729f..93fa581a 100644 --- a/github/Repository.py +++ b/github/Repository.py @@ -629,7 +629,7 @@ class Repository(github.GithubObject.CompletableGithubObject): None, post_parameters ) - return github.Milestone.Milestone(self._requester, data, completed=True) + return github.Milestone.Milestone(self._requester, headers, data, completed=True) def create_pull(self, *args, **kwds): """ @@ -1306,7 +1306,7 @@ class Repository(github.GithubObject.CompletableGithubObject): None, None ) - return github.Milestone.Milestone(self._requester, data, completed=True) + return github.Milestone.Milestone(self._requester, headers, data, completed=True) def get_milestones(self, state=github.GithubObject.NotSet, sort=github.GithubObject.NotSet, direction=github.GithubObject.NotSet): """