mirror of
https://github.com/status-im/PyGithub.git
synced 2026-09-01 11:21:16 +00:00
Implement License API (#734)
* Implement License API * Update copyright
This commit is contained in:
@@ -1933,6 +1933,18 @@ class Repository(github.GithubObject.CompletableGithubObject):
|
||||
)
|
||||
return data
|
||||
|
||||
def get_license(self):
|
||||
"""
|
||||
:calls: `GET /repos/:owner/:repo/license <https://developer.github.com/v3/licenses>`_
|
||||
:rtype: :class:`github.ContentFile.ContentFile`
|
||||
"""
|
||||
|
||||
headers, data = self._requester.requestJsonAndCheck(
|
||||
"GET",
|
||||
self.url + "/license"
|
||||
)
|
||||
return github.ContentFile.ContentFile(self._requester, headers, data, completed=True)
|
||||
|
||||
def get_milestone(self, number):
|
||||
"""
|
||||
:calls: `GET /repos/:owner/:repo/milestones/:number <http://developer.github.com/v3/issues/milestones>`_
|
||||
|
||||
Reference in New Issue
Block a user