Update Milestone.py

This commit is contained in:
AKFish
2013-08-21 16:24:27 +08:00
parent 175488270a
commit e4baf577ed
3 changed files with 3 additions and 6 deletions
+1 -1
View File
@@ -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"]
-3
View File
@@ -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):
+2 -2
View File
@@ -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):
"""