mirror of
https://github.com/status-im/PyGithub.git
synced 2026-09-01 11:21:16 +00:00
Update Label.py
This commit is contained in:
+1
-1
@@ -401,7 +401,7 @@ class Issue(github.GithubObject.CompletableGithubObject):
|
||||
if "labels" in attributes: # pragma no branch
|
||||
assert attributes["labels"] is None or all(isinstance(element, dict) for element in attributes["labels"]), attributes["labels"]
|
||||
self._labels = None if attributes["labels"] is None else [
|
||||
github.Label.Label(self._requester, element, completed=False)
|
||||
github.Label.Label(self._requester, self._headers, element, completed=False)
|
||||
for element in attributes["labels"]
|
||||
]
|
||||
if "milestone" in attributes: # pragma no branch
|
||||
|
||||
@@ -33,9 +33,6 @@ class Label(github.GithubObject.CompletableGithubObject):
|
||||
"""
|
||||
This class represents Labels. The reference can be found here http://developer.github.com/v3/issues/labels/
|
||||
"""
|
||||
def __init__(self, requester, attributes, completed):
|
||||
# Adapte for __init__ change, remove later
|
||||
github.GithubObject.CompletableGithubObject.__init__(self, requester, {}, attributes, completed)
|
||||
|
||||
@property
|
||||
def color(self):
|
||||
|
||||
@@ -599,7 +599,7 @@ class Repository(github.GithubObject.CompletableGithubObject):
|
||||
None,
|
||||
post_parameters
|
||||
)
|
||||
return github.Label.Label(self._requester, data, completed=True)
|
||||
return github.Label.Label(self._requester, headers, data, completed=True)
|
||||
|
||||
def create_milestone(self, title, state=github.GithubObject.NotSet, description=github.GithubObject.NotSet, due_on=github.GithubObject.NotSet):
|
||||
"""
|
||||
@@ -1266,7 +1266,7 @@ class Repository(github.GithubObject.CompletableGithubObject):
|
||||
None,
|
||||
None
|
||||
)
|
||||
return github.Label.Label(self._requester, data, completed=True)
|
||||
return github.Label.Label(self._requester, headers, data, completed=True)
|
||||
|
||||
def get_labels(self):
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user