mirror of
https://github.com/status-im/PyGithub.git
synced 2026-09-01 19:31:10 +00:00
Update Milestone.py
This commit is contained in:
+1
-1
@@ -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"]
|
||||
|
||||
@@ -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):
|
||||
|
||||
@@ -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):
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user