mirror of
https://github.com/status-im/PyGithub.git
synced 2026-08-31 10:51:14 +00:00
Fixed links to github docs. [#2009]
This commit is contained in:
@@ -29,7 +29,7 @@ from github.AccessToken import AccessToken
|
||||
class ApplicationOAuth(github.GithubObject.NonCompletableGithubObject):
|
||||
"""
|
||||
This class is used for identifying and authorizing users for Github Apps.
|
||||
The reference can be found at https://docs.github.com/en/developers/apps/identifying-and-authorizing-users-for-github-apps
|
||||
The reference can be found at https://docs.github.com/en/developers/apps/building-github-apps/identifying-and-authorizing-users-for-github-apps
|
||||
"""
|
||||
|
||||
def __repr__(self):
|
||||
|
||||
+1
-1
@@ -123,7 +123,7 @@ class Branch(github.GithubObject.NonCompletableGithubObject):
|
||||
team_push_restrictions=github.GithubObject.NotSet,
|
||||
):
|
||||
"""
|
||||
:calls: `PUT /repos/{owner}/{repo}/branches/{branch}/protection <https://docs.github.com/en/rest/reference/repos#branches>`_
|
||||
:calls: `PUT /repos/{owner}/{repo}/branches/{branch}/protection <https://docs.github.com/en/rest/reference/repos#get-branch-protection>`_
|
||||
:strict: bool
|
||||
:contexts: list of strings
|
||||
:enforce_admins: bool
|
||||
|
||||
+5
-5
@@ -45,7 +45,7 @@ import github.PaginatedList
|
||||
|
||||
class Commit(github.GithubObject.CompletableGithubObject):
|
||||
"""
|
||||
This class represents Commits. The reference can be found here http://docs.github.com/en/rest/reference/git#commits
|
||||
This class represents Commits. The reference can be found here https://docs.github.com/en/rest/reference/git#commits
|
||||
"""
|
||||
|
||||
def __repr__(self):
|
||||
@@ -139,7 +139,7 @@ class Commit(github.GithubObject.CompletableGithubObject):
|
||||
position=github.GithubObject.NotSet,
|
||||
):
|
||||
"""
|
||||
:calls: `POST /repos/{owner}/{repo}/commits/{sha}/comments <http://docs.github.com/en/rest/reference/repos#comments>`_
|
||||
:calls: `POST /repos/{owner}/{repo}/commits/{sha}/comments <https://docs.github.com/en/rest/reference/repos#comments>`_
|
||||
:param body: string
|
||||
:param line: integer
|
||||
:param path: string
|
||||
@@ -176,7 +176,7 @@ class Commit(github.GithubObject.CompletableGithubObject):
|
||||
context=github.GithubObject.NotSet,
|
||||
):
|
||||
"""
|
||||
:calls: `POST /repos/{owner}/{repo}/statuses/{sha} <http://docs.github.com/en/rest/reference/repos#statuses>`_
|
||||
:calls: `POST /repos/{owner}/{repo}/statuses/{sha} <https://docs.github.com/en/rest/reference/repos#statuses>`_
|
||||
:param state: string
|
||||
:param target_url: string
|
||||
:param description: string
|
||||
@@ -213,7 +213,7 @@ class Commit(github.GithubObject.CompletableGithubObject):
|
||||
|
||||
def get_comments(self):
|
||||
"""
|
||||
:calls: `GET /repos/{owner}/{repo}/commits/{sha}/comments <http://docs.github.com/en/rest/reference/repos#comments>`_
|
||||
:calls: `GET /repos/{owner}/{repo}/commits/{sha}/comments <https://docs.github.com/en/rest/reference/repos#comments>`_
|
||||
:rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.CommitComment.CommitComment`
|
||||
"""
|
||||
return github.PaginatedList.PaginatedList(
|
||||
@@ -225,7 +225,7 @@ class Commit(github.GithubObject.CompletableGithubObject):
|
||||
|
||||
def get_statuses(self):
|
||||
"""
|
||||
:calls: `GET /repos/{owner}/{repo}/statuses/{ref} <http://docs.github.com/en/rest/reference/repos#statuses>`_
|
||||
:calls: `GET /repos/{owner}/{repo}/statuses/{ref} <https://docs.github.com/en/rest/reference/repos#statuses>`_
|
||||
:rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.CommitStatus.CommitStatus`
|
||||
"""
|
||||
return github.PaginatedList.PaginatedList(
|
||||
|
||||
@@ -135,14 +135,14 @@ class CommitComment(github.GithubObject.CompletableGithubObject):
|
||||
|
||||
def delete(self):
|
||||
"""
|
||||
:calls: `DELETE /repos/{owner}/{repo}/comments/{id} <http://docs.github.com/en/rest/reference/repos#comments>`_
|
||||
:calls: `DELETE /repos/{owner}/{repo}/comments/{id} <https://docs.github.com/en/rest/reference/repos#comments>`_
|
||||
:rtype: None
|
||||
"""
|
||||
headers, data = self._requester.requestJsonAndCheck("DELETE", self.url)
|
||||
|
||||
def edit(self, body):
|
||||
"""
|
||||
:calls: `PATCH /repos/{owner}/{repo}/comments/{id} <http://docs.github.com/en/rest/reference/repos#comments>`_
|
||||
:calls: `PATCH /repos/{owner}/{repo}/comments/{id} <https://docs.github.com/en/rest/reference/repos#comments>`_
|
||||
:param body: string
|
||||
:rtype: None
|
||||
"""
|
||||
|
||||
+9
-9
@@ -201,7 +201,7 @@ class Gist(github.GithubObject.CompletableGithubObject):
|
||||
|
||||
def create_comment(self, body):
|
||||
"""
|
||||
:calls: `POST /gists/{gist_id}/comments <http://docs.github.com/en/rest/reference/gists#comments>`_
|
||||
:calls: `POST /gists/{gist_id}/comments <https://docs.github.com/en/rest/reference/gists#comments>`_
|
||||
:param body: string
|
||||
:rtype: :class:`github.GistComment.GistComment`
|
||||
"""
|
||||
@@ -218,7 +218,7 @@ class Gist(github.GithubObject.CompletableGithubObject):
|
||||
|
||||
def create_fork(self):
|
||||
"""
|
||||
:calls: `POST /gists/{id}/forks <http://docs.github.com/en/rest/reference/gists>`_
|
||||
:calls: `POST /gists/{id}/forks <https://docs.github.com/en/rest/reference/gists>`_
|
||||
:rtype: :class:`github.Gist.Gist`
|
||||
"""
|
||||
headers, data = self._requester.requestJsonAndCheck("POST", f"{self.url}/forks")
|
||||
@@ -226,7 +226,7 @@ class Gist(github.GithubObject.CompletableGithubObject):
|
||||
|
||||
def delete(self):
|
||||
"""
|
||||
:calls: `DELETE /gists/{id} <http://docs.github.com/en/rest/reference/gists>`_
|
||||
:calls: `DELETE /gists/{id} <https://docs.github.com/en/rest/reference/gists>`_
|
||||
:rtype: None
|
||||
"""
|
||||
headers, data = self._requester.requestJsonAndCheck("DELETE", self.url)
|
||||
@@ -235,7 +235,7 @@ class Gist(github.GithubObject.CompletableGithubObject):
|
||||
self, description=github.GithubObject.NotSet, files=github.GithubObject.NotSet
|
||||
):
|
||||
"""
|
||||
:calls: `PATCH /gists/{id} <http://docs.github.com/en/rest/reference/gists>`_
|
||||
:calls: `PATCH /gists/{id} <https://docs.github.com/en/rest/reference/gists>`_
|
||||
:param description: string
|
||||
:param files: dict of string to :class:`github.InputFileContent.InputFileContent`
|
||||
:rtype: None
|
||||
@@ -262,7 +262,7 @@ class Gist(github.GithubObject.CompletableGithubObject):
|
||||
|
||||
def get_comment(self, id):
|
||||
"""
|
||||
:calls: `GET /gists/{gist_id}/comments/{id} <http://docs.github.com/en/rest/reference/gists#comments>`_
|
||||
:calls: `GET /gists/{gist_id}/comments/{id} <https://docs.github.com/en/rest/reference/gists#comments>`_
|
||||
:param id: integer
|
||||
:rtype: :class:`github.GistComment.GistComment`
|
||||
"""
|
||||
@@ -276,7 +276,7 @@ class Gist(github.GithubObject.CompletableGithubObject):
|
||||
|
||||
def get_comments(self):
|
||||
"""
|
||||
:calls: `GET /gists/{gist_id}/comments <http://docs.github.com/en/rest/reference/gists#comments>`_
|
||||
:calls: `GET /gists/{gist_id}/comments <https://docs.github.com/en/rest/reference/gists#comments>`_
|
||||
:rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.GistComment.GistComment`
|
||||
"""
|
||||
return github.PaginatedList.PaginatedList(
|
||||
@@ -288,7 +288,7 @@ class Gist(github.GithubObject.CompletableGithubObject):
|
||||
|
||||
def is_starred(self):
|
||||
"""
|
||||
:calls: `GET /gists/{id}/star <http://docs.github.com/en/rest/reference/gists>`_
|
||||
:calls: `GET /gists/{id}/star <https://docs.github.com/en/rest/reference/gists>`_
|
||||
:rtype: bool
|
||||
"""
|
||||
status, headers, data = self._requester.requestJson("GET", f"{self.url}/star")
|
||||
@@ -296,7 +296,7 @@ class Gist(github.GithubObject.CompletableGithubObject):
|
||||
|
||||
def reset_starred(self):
|
||||
"""
|
||||
:calls: `DELETE /gists/{id}/star <http://docs.github.com/en/rest/reference/gists>`_
|
||||
:calls: `DELETE /gists/{id}/star <https://docs.github.com/en/rest/reference/gists>`_
|
||||
:rtype: None
|
||||
"""
|
||||
headers, data = self._requester.requestJsonAndCheck(
|
||||
@@ -305,7 +305,7 @@ class Gist(github.GithubObject.CompletableGithubObject):
|
||||
|
||||
def set_starred(self):
|
||||
"""
|
||||
:calls: `PUT /gists/{id}/star <http://docs.github.com/en/rest/reference/gists>`_
|
||||
:calls: `PUT /gists/{id}/star <https://docs.github.com/en/rest/reference/gists>`_
|
||||
:rtype: None
|
||||
"""
|
||||
headers, data = self._requester.requestJsonAndCheck("PUT", f"{self.url}/star")
|
||||
|
||||
@@ -90,14 +90,14 @@ class GistComment(github.GithubObject.CompletableGithubObject):
|
||||
|
||||
def delete(self):
|
||||
"""
|
||||
:calls: `DELETE /gists/{gist_id}/comments/{id} <http://docs.github.com/en/rest/reference/gists#comments>`_
|
||||
:calls: `DELETE /gists/{gist_id}/comments/{id} <https://docs.github.com/en/rest/reference/gists#comments>`_
|
||||
:rtype: None
|
||||
"""
|
||||
headers, data = self._requester.requestJsonAndCheck("DELETE", self.url)
|
||||
|
||||
def edit(self, body):
|
||||
"""
|
||||
:calls: `PATCH /gists/{gist_id}/comments/{id} <http://docs.github.com/en/rest/reference/gists#comments>`_
|
||||
:calls: `PATCH /gists/{gist_id}/comments/{id} <https://docs.github.com/en/rest/reference/gists#comments>`_
|
||||
:param body: string
|
||||
:rtype: None
|
||||
"""
|
||||
|
||||
+3
-3
@@ -34,7 +34,7 @@ import github.GitObject
|
||||
|
||||
class GitRef(github.GithubObject.CompletableGithubObject):
|
||||
"""
|
||||
This class represents GitRefs. The reference can be found here https://docs.github.com/en/rest/reference/git#refs
|
||||
This class represents GitRefs. The reference can be found here https://docs.github.com/en/rest/reference/git#references
|
||||
"""
|
||||
|
||||
def __repr__(self):
|
||||
@@ -66,14 +66,14 @@ class GitRef(github.GithubObject.CompletableGithubObject):
|
||||
|
||||
def delete(self):
|
||||
"""
|
||||
:calls: `DELETE /repos/{owner}/{repo}/git/refs/{ref} <http://docs.github.com/en/rest/reference/git#refs>`_
|
||||
:calls: `DELETE /repos/{owner}/{repo}/git/refs/{ref} <https://docs.github.com/en/rest/reference/git#references>`_
|
||||
:rtype: None
|
||||
"""
|
||||
headers, data = self._requester.requestJsonAndCheck("DELETE", self.url)
|
||||
|
||||
def edit(self, sha, force=github.GithubObject.NotSet):
|
||||
"""
|
||||
:calls: `PATCH /repos/{owner}/{repo}/git/refs/{ref} <http://docs.github.com/en/rest/reference/git#refs>`_
|
||||
:calls: `PATCH /repos/{owner}/{repo}/git/refs/{ref} <https://docs.github.com/en/rest/reference/git#references>`_
|
||||
:param sha: string
|
||||
:param force: bool
|
||||
:rtype: None
|
||||
|
||||
@@ -172,7 +172,7 @@ class GitRelease(github.GithubObject.CompletableGithubObject):
|
||||
|
||||
def delete_release(self):
|
||||
"""
|
||||
:calls: `DELETE /repos/{owner}/{repo}/releases/{release_id} <https://docs.github.com/en/rest/reference/repos/releases#delete-a-release>`_
|
||||
:calls: `DELETE /repos/{owner}/{repo}/releases/{release_id} <https://docs.github.com/en/rest/reference/repos#delete-a-release>`_
|
||||
:rtype: None
|
||||
"""
|
||||
headers, data = self._requester.requestJsonAndCheck("DELETE", self.url)
|
||||
@@ -187,7 +187,7 @@ class GitRelease(github.GithubObject.CompletableGithubObject):
|
||||
target_commitish=github.GithubObject.NotSet,
|
||||
):
|
||||
"""
|
||||
:calls: `PATCH /repos/{owner}/{repo}/releases/{release_id} <https://docs.github.com/en/rest/reference/repos/releases#edit-a-release>`_
|
||||
:calls: `PATCH /repos/{owner}/{repo}/releases/{release_id} <https://docs.github.com/en/rest/reference/repos#update-a-release>`_
|
||||
:param name: string
|
||||
:param message: string
|
||||
:param draft: bool
|
||||
@@ -234,7 +234,7 @@ class GitRelease(github.GithubObject.CompletableGithubObject):
|
||||
name=github.GithubObject.NotSet,
|
||||
):
|
||||
"""
|
||||
:calls: `POST https://<upload_url>/repos/{owner}/{repo}/releases/{release_id}/assets <https://docs.github.com/en/rest/reference/repos/releases#upload-a-release-asset>`_
|
||||
:calls: `POST https://<upload_url>/repos/{owner}/{repo}/releases/{release_id}/assets <https://docs.github.com/en/rest/reference/repos#upload-a-release-asset>`_
|
||||
:param path: string
|
||||
:param label: string
|
||||
:param content_type: string
|
||||
@@ -274,7 +274,7 @@ class GitRelease(github.GithubObject.CompletableGithubObject):
|
||||
):
|
||||
"""Uploads an asset. Unlike ``upload_asset()`` this method allows you to pass in a file-like object to upload.
|
||||
Note that this method is more strict and requires you to specify the ``name``, since there's no file name to infer these from.
|
||||
:calls: `POST https://<upload_url>/repos/{owner}/{repo}/releases/{release_id}/assets <https://docs.github.com/en/rest/reference/repos/releases#upload-a-release-asset>`_
|
||||
:calls: `POST https://<upload_url>/repos/{owner}/{repo}/releases/{release_id}/assets <https://docs.github.com/en/rest/reference/repos#upload-a-release-asset>`_
|
||||
:param file_like: binary file-like object, such as those returned by ``open("file_name", "rb")``. At the very minimum, this object must implement ``read()``.
|
||||
:param file_size: int, size in bytes of ``file_like``
|
||||
:param content_type: string
|
||||
@@ -307,7 +307,7 @@ class GitRelease(github.GithubObject.CompletableGithubObject):
|
||||
|
||||
def get_assets(self):
|
||||
"""
|
||||
:calls: `GET /repos/{owner}/{repo}/releases/{release_id}/assets <https://docs.github.com/en/rest/reference/repos/releases#list-assets-for-a-release>`_
|
||||
:calls: `GET /repos/{owner}/{repo}/releases/{release_id}/assets <https://docs.github.com/en/rest/reference/repos#list-release-assets>`_
|
||||
:rtype: :class:`github.PaginatedList.PaginatedList`
|
||||
"""
|
||||
return github.PaginatedList.PaginatedList(
|
||||
|
||||
+5
-5
@@ -35,7 +35,7 @@ import github.HookResponse
|
||||
|
||||
class Hook(github.GithubObject.CompletableGithubObject):
|
||||
"""
|
||||
This class represents Hooks. The reference can be found here http://docs.github.com/en/rest/reference/repos#webhooks
|
||||
This class represents Hooks. The reference can be found here https://docs.github.com/en/rest/reference/repos#webhooks
|
||||
"""
|
||||
|
||||
def __repr__(self):
|
||||
@@ -131,7 +131,7 @@ class Hook(github.GithubObject.CompletableGithubObject):
|
||||
|
||||
def delete(self):
|
||||
"""
|
||||
:calls: `DELETE /repos/{owner}/{repo}/hooks/{id} <http://docs.github.com/en/rest/reference/repos#webhooks>`_
|
||||
:calls: `DELETE /repos/{owner}/{repo}/hooks/{id} <https://docs.github.com/en/rest/reference/repos#webhooks>`_
|
||||
:rtype: None
|
||||
"""
|
||||
headers, data = self._requester.requestJsonAndCheck("DELETE", self.url)
|
||||
@@ -146,7 +146,7 @@ class Hook(github.GithubObject.CompletableGithubObject):
|
||||
active=github.GithubObject.NotSet,
|
||||
):
|
||||
"""
|
||||
:calls: `PATCH /repos/{owner}/{repo}/hooks/{id} <http://docs.github.com/en/rest/reference/repos#webhooks>`_
|
||||
:calls: `PATCH /repos/{owner}/{repo}/hooks/{id} <https://docs.github.com/en/rest/reference/repos#webhooks>`_
|
||||
:param name: string
|
||||
:param config: dict
|
||||
:param events: list of string
|
||||
@@ -186,14 +186,14 @@ class Hook(github.GithubObject.CompletableGithubObject):
|
||||
|
||||
def test(self):
|
||||
"""
|
||||
:calls: `POST /repos/{owner}/{repo}/hooks/{id}/tests <http://docs.github.com/en/rest/reference/repos#webhooks>`_
|
||||
:calls: `POST /repos/{owner}/{repo}/hooks/{id}/tests <https://docs.github.com/en/rest/reference/repos#webhooks>`_
|
||||
:rtype: None
|
||||
"""
|
||||
headers, data = self._requester.requestJsonAndCheck("POST", f"{self.url}/tests")
|
||||
|
||||
def ping(self):
|
||||
"""
|
||||
:calls: `POST /repos/{owner}/{repo}/hooks/{id}/pings <http://docs.github.com/en/rest/reference/repos#webhooks>`_
|
||||
:calls: `POST /repos/{owner}/{repo}/hooks/{id}/pings <https://docs.github.com/en/rest/reference/repos#webhooks>`_
|
||||
:rtype: None
|
||||
"""
|
||||
headers, data = self._requester.requestJsonAndCheck("POST", f"{self.url}/pings")
|
||||
|
||||
+12
-12
@@ -272,7 +272,7 @@ class Issue(github.GithubObject.CompletableGithubObject):
|
||||
|
||||
def as_pull_request(self):
|
||||
"""
|
||||
:calls: `GET /repos/{owner}/{repo}/pulls/{number} <http://docs.github.com/en/rest/reference/pulls>`_
|
||||
:calls: `GET /repos/{owner}/{repo}/pulls/{number} <https://docs.github.com/en/rest/reference/pulls>`_
|
||||
:rtype: :class:`github.PullRequest.PullRequest`
|
||||
"""
|
||||
headers, data = self._requester.requestJsonAndCheck(
|
||||
@@ -307,7 +307,7 @@ class Issue(github.GithubObject.CompletableGithubObject):
|
||||
|
||||
def add_to_labels(self, *labels):
|
||||
"""
|
||||
:calls: `POST /repos/{owner}/{repo}/issues/{number}/labels <http://docs.github.com/en/rest/reference/issues#labels>`_
|
||||
:calls: `POST /repos/{owner}/{repo}/issues/{number}/labels <https://docs.github.com/en/rest/reference/issues#labels>`_
|
||||
:param label: :class:`github.Label.Label` or string
|
||||
:rtype: None
|
||||
"""
|
||||
@@ -324,7 +324,7 @@ class Issue(github.GithubObject.CompletableGithubObject):
|
||||
|
||||
def create_comment(self, body):
|
||||
"""
|
||||
:calls: `POST /repos/{owner}/{repo}/issues/{number}/comments <http://docs.github.com/en/rest/reference/issues#comments>`_
|
||||
:calls: `POST /repos/{owner}/{repo}/issues/{number}/comments <https://docs.github.com/en/rest/reference/issues#comments>`_
|
||||
:param body: string
|
||||
:rtype: :class:`github.IssueComment.IssueComment`
|
||||
"""
|
||||
@@ -341,7 +341,7 @@ class Issue(github.GithubObject.CompletableGithubObject):
|
||||
|
||||
def delete_labels(self):
|
||||
"""
|
||||
:calls: `DELETE /repos/{owner}/{repo}/issues/{number}/labels <http://docs.github.com/en/rest/reference/issues#labels>`_
|
||||
:calls: `DELETE /repos/{owner}/{repo}/issues/{number}/labels <https://docs.github.com/en/rest/reference/issues#labels>`_
|
||||
:rtype: None
|
||||
"""
|
||||
headers, data = self._requester.requestJsonAndCheck(
|
||||
@@ -359,7 +359,7 @@ class Issue(github.GithubObject.CompletableGithubObject):
|
||||
assignees=github.GithubObject.NotSet,
|
||||
):
|
||||
"""
|
||||
:calls: `PATCH /repos/{owner}/{repo}/issues/{number} <http://docs.github.com/en/rest/reference/issues>`_
|
||||
:calls: `PATCH /repos/{owner}/{repo}/issues/{number} <https://docs.github.com/en/rest/reference/issues>`_
|
||||
:param title: string
|
||||
:param body: string
|
||||
:param assignee: string or :class:`github.NamedUser.NamedUser` or None
|
||||
@@ -445,7 +445,7 @@ class Issue(github.GithubObject.CompletableGithubObject):
|
||||
|
||||
def get_comment(self, id):
|
||||
"""
|
||||
:calls: `GET /repos/{owner}/{repo}/issues/comments/{id} <http://docs.github.com/en/rest/reference/issues#comments>`_
|
||||
:calls: `GET /repos/{owner}/{repo}/issues/comments/{id} <https://docs.github.com/en/rest/reference/issues#comments>`_
|
||||
:param id: integer
|
||||
:rtype: :class:`github.IssueComment.IssueComment`
|
||||
"""
|
||||
@@ -459,7 +459,7 @@ class Issue(github.GithubObject.CompletableGithubObject):
|
||||
|
||||
def get_comments(self, since=github.GithubObject.NotSet):
|
||||
"""
|
||||
:calls: `GET /repos/{owner}/{repo}/issues/{number}/comments <http://docs.github.com/en/rest/reference/issues#comments>`_
|
||||
:calls: `GET /repos/{owner}/{repo}/issues/{number}/comments <https://docs.github.com/en/rest/reference/issues#comments>`_
|
||||
:param since: datetime.datetime format YYYY-MM-DDTHH:MM:SSZ
|
||||
:rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.IssueComment.IssueComment`
|
||||
"""
|
||||
@@ -478,7 +478,7 @@ class Issue(github.GithubObject.CompletableGithubObject):
|
||||
|
||||
def get_events(self):
|
||||
"""
|
||||
:calls: `GET /repos/{owner}/{repo}/issues/{issue_number}/events <http://docs.github.com/en/rest/reference/issues#events>`_
|
||||
:calls: `GET /repos/{owner}/{repo}/issues/{issue_number}/events <https://docs.github.com/en/rest/reference/issues#events>`_
|
||||
:rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.IssueEvent.IssueEvent`
|
||||
"""
|
||||
return github.PaginatedList.PaginatedList(
|
||||
@@ -491,7 +491,7 @@ class Issue(github.GithubObject.CompletableGithubObject):
|
||||
|
||||
def get_labels(self):
|
||||
"""
|
||||
:calls: `GET /repos/{owner}/{repo}/issues/{number}/labels <http://docs.github.com/en/rest/reference/issues#labels>`_
|
||||
:calls: `GET /repos/{owner}/{repo}/issues/{number}/labels <https://docs.github.com/en/rest/reference/issues#labels>`_
|
||||
:rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.Label.Label`
|
||||
"""
|
||||
return github.PaginatedList.PaginatedList(
|
||||
@@ -523,7 +523,7 @@ class Issue(github.GithubObject.CompletableGithubObject):
|
||||
|
||||
def remove_from_labels(self, label):
|
||||
"""
|
||||
:calls: `DELETE /repos/{owner}/{repo}/issues/{number}/labels/{name} <http://docs.github.com/en/rest/reference/issues#labels>`_
|
||||
:calls: `DELETE /repos/{owner}/{repo}/issues/{number}/labels/{name} <https://docs.github.com/en/rest/reference/issues#labels>`_
|
||||
:param label: :class:`github.Label.Label` or string
|
||||
:rtype: None
|
||||
"""
|
||||
@@ -538,7 +538,7 @@ class Issue(github.GithubObject.CompletableGithubObject):
|
||||
|
||||
def set_labels(self, *labels):
|
||||
"""
|
||||
:calls: `PUT /repos/{owner}/{repo}/issues/{number}/labels <http://docs.github.com/en/rest/reference/issues#labels>`_
|
||||
:calls: `PUT /repos/{owner}/{repo}/issues/{number}/labels <https://docs.github.com/en/rest/reference/issues#labels>`_
|
||||
:param labels: list of :class:`github.Label.Label` or strings
|
||||
:rtype: None
|
||||
"""
|
||||
@@ -600,7 +600,7 @@ class Issue(github.GithubObject.CompletableGithubObject):
|
||||
|
||||
def get_timeline(self):
|
||||
"""
|
||||
:calls: `GET /repos/{owner}/{repo}/issues/{number}/timeline <https://docs.github.com/en/rest/reference/issues/timeline#list-events-for-an-issue>`_
|
||||
:calls: `GET /repos/{owner}/{repo}/issues/{number}/timeline <https://docs.github.com/en/rest/reference/issues#list-timeline-events-for-an-issue>`_
|
||||
:return: :class: :class:`github.PaginatedList.PaginatedList` of :class:`github.TimelineEvent.TimelineEvent`
|
||||
"""
|
||||
return github.PaginatedList.PaginatedList(
|
||||
|
||||
@@ -112,14 +112,14 @@ class IssueComment(github.GithubObject.CompletableGithubObject):
|
||||
|
||||
def delete(self):
|
||||
"""
|
||||
:calls: `DELETE /repos/{owner}/{repo}/issues/comments/{id} <http://docs.github.com/en/rest/reference/issues#comments>`_
|
||||
:calls: `DELETE /repos/{owner}/{repo}/issues/comments/{id} <https://docs.github.com/en/rest/reference/issues#comments>`_
|
||||
:rtype: None
|
||||
"""
|
||||
headers, data = self._requester.requestJsonAndCheck("DELETE", self.url)
|
||||
|
||||
def edit(self, body):
|
||||
"""
|
||||
:calls: `PATCH /repos/{owner}/{repo}/issues/comments/{id} <http://docs.github.com/en/rest/reference/issues#comments>`_
|
||||
:calls: `PATCH /repos/{owner}/{repo}/issues/comments/{id} <https://docs.github.com/en/rest/reference/issues#comments>`_
|
||||
:param body: string
|
||||
:rtype: None
|
||||
"""
|
||||
|
||||
+3
-3
@@ -38,7 +38,7 @@ from . import Consts
|
||||
|
||||
class Label(github.GithubObject.CompletableGithubObject):
|
||||
"""
|
||||
This class represents Labels. The reference can be found here http://docs.github.com/en/rest/reference/issues#labels
|
||||
This class represents Labels. The reference can be found here https://docs.github.com/en/rest/reference/issues#labels
|
||||
"""
|
||||
|
||||
def __repr__(self):
|
||||
@@ -78,14 +78,14 @@ class Label(github.GithubObject.CompletableGithubObject):
|
||||
|
||||
def delete(self):
|
||||
"""
|
||||
:calls: `DELETE /repos/{owner}/{repo}/labels/{name} <http://docs.github.com/en/rest/reference/issues#labels>`_
|
||||
:calls: `DELETE /repos/{owner}/{repo}/labels/{name} <https://docs.github.com/en/rest/reference/issues#labels>`_
|
||||
:rtype: None
|
||||
"""
|
||||
headers, data = self._requester.requestJsonAndCheck("DELETE", self.url)
|
||||
|
||||
def edit(self, name, color, description=github.GithubObject.NotSet):
|
||||
"""
|
||||
:calls: `PATCH /repos/{owner}/{repo}/labels/{name} <http://docs.github.com/en/rest/reference/issues#labels>`_
|
||||
:calls: `PATCH /repos/{owner}/{repo}/labels/{name} <https://docs.github.com/en/rest/reference/issues#labels>`_
|
||||
:param name: string
|
||||
:param color: string
|
||||
:param description: string
|
||||
|
||||
+28
-28
@@ -195,7 +195,7 @@ class Github:
|
||||
"""
|
||||
Rate limit status for different resources (core/search/graphql).
|
||||
|
||||
:calls: `GET /rate_limit <http://docs.github.com/en/rest/reference/rate_limit>`_
|
||||
:calls: `GET /rate_limit <https://docs.github.com/en/rest/reference/rate-limit>`_
|
||||
:rtype: :class:`github.RateLimit.RateLimit`
|
||||
"""
|
||||
headers, data = self.__requester.requestJsonAndCheck("GET", "/rate_limit")
|
||||
@@ -210,7 +210,7 @@ class Github:
|
||||
|
||||
def get_license(self, key=github.GithubObject.NotSet):
|
||||
"""
|
||||
:calls: `GET /license/{license} <https://docs.github.com/en/rest/reference/licenses#get-an-individual-license>`_
|
||||
:calls: `GET /license/{license} <https://docs.github.com/en/rest/reference/licenses#get-a-license>`_
|
||||
:param key: string
|
||||
:rtype: :class:`github.License.License`
|
||||
"""
|
||||
@@ -221,7 +221,7 @@ class Github:
|
||||
|
||||
def get_licenses(self):
|
||||
"""
|
||||
:calls: `GET /licenses <https://docs.github.com/en/rest/reference/licenses#list-all-licenses>`_
|
||||
:calls: `GET /licenses <https://docs.github.com/en/rest/reference/licenses#get-all-commonly-used-licenses>`_
|
||||
:rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.License.License`
|
||||
"""
|
||||
|
||||
@@ -233,7 +233,7 @@ class Github:
|
||||
|
||||
def get_events(self):
|
||||
"""
|
||||
:calls: `GET /events <https://docs.github.com/en/rest/reference/activity/events#list-public-events>`_
|
||||
:calls: `GET /events <https://docs.github.com/en/rest/reference/activity#list-public-events>`_
|
||||
:rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.Event.Event`
|
||||
"""
|
||||
|
||||
@@ -243,7 +243,7 @@ class Github:
|
||||
|
||||
def get_user(self, login=github.GithubObject.NotSet):
|
||||
"""
|
||||
:calls: `GET /users/{user} <http://docs.github.com/en/rest/reference/users>`_ or `GET /user <http://docs.github.com/en/rest/reference/users>`_
|
||||
:calls: `GET /users/{user} <https://docs.github.com/en/rest/reference/users>`_ or `GET /user <https://docs.github.com/en/rest/reference/users>`_
|
||||
:param login: string
|
||||
:rtype: :class:`github.NamedUser.NamedUser` or :class:`github.AuthenticatedUser.AuthenticatedUser`
|
||||
"""
|
||||
@@ -262,7 +262,7 @@ class Github:
|
||||
|
||||
def get_user_by_id(self, user_id):
|
||||
"""
|
||||
:calls: `GET /user/{id} <http://docs.github.com/en/rest/reference/users>`_
|
||||
:calls: `GET /user/{id} <https://docs.github.com/en/rest/reference/users>`_
|
||||
:param user_id: int
|
||||
:rtype: :class:`github.NamedUser.NamedUser`
|
||||
"""
|
||||
@@ -274,7 +274,7 @@ class Github:
|
||||
|
||||
def get_users(self, since=github.GithubObject.NotSet):
|
||||
"""
|
||||
:calls: `GET /users <http://docs.github.com/en/rest/reference/users>`_
|
||||
:calls: `GET /users <https://docs.github.com/en/rest/reference/users>`_
|
||||
:param since: integer
|
||||
:rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.NamedUser.NamedUser`
|
||||
"""
|
||||
@@ -288,7 +288,7 @@ class Github:
|
||||
|
||||
def get_organization(self, login):
|
||||
"""
|
||||
:calls: `GET /orgs/{org} <http://docs.github.com/en/rest/reference/orgs>`_
|
||||
:calls: `GET /orgs/{org} <https://docs.github.com/en/rest/reference/orgs>`_
|
||||
:param login: string
|
||||
:rtype: :class:`github.Organization.Organization`
|
||||
"""
|
||||
@@ -300,7 +300,7 @@ class Github:
|
||||
|
||||
def get_organizations(self, since=github.GithubObject.NotSet):
|
||||
"""
|
||||
:calls: `GET /organizations <http://docs.github.com/en/rest/reference/orgs#list-all-organizations>`_
|
||||
:calls: `GET /organizations <https://docs.github.com/en/rest/reference/orgs#list-organizations>`_
|
||||
:param since: integer
|
||||
:rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.Organization.Organization`
|
||||
"""
|
||||
@@ -317,7 +317,7 @@ class Github:
|
||||
|
||||
def get_repo(self, full_name_or_id, lazy=False):
|
||||
"""
|
||||
:calls: `GET /repos/{owner}/{repo} <http://docs.github.com/en/rest/reference/repos>`_ or `GET /repositories/{id} <http://docs.github.com/en/rest/reference/repos>`_
|
||||
:calls: `GET /repos/{owner}/{repo} <https://docs.github.com/en/rest/reference/repos>`_ or `GET /repositories/{id} <https://docs.github.com/en/rest/reference/repos>`_
|
||||
:rtype: :class:`github.Repository.Repository`
|
||||
"""
|
||||
assert isinstance(full_name_or_id, (str, int)), full_name_or_id
|
||||
@@ -334,7 +334,7 @@ class Github:
|
||||
self, since=github.GithubObject.NotSet, visibility=github.GithubObject.NotSet
|
||||
):
|
||||
"""
|
||||
:calls: `GET /repositories <http://docs.github.com/en/rest/reference/repos#list-all-public-repositories>`_
|
||||
:calls: `GET /repositories <https://docs.github.com/en/rest/reference/repos#list-public-repositories>`_
|
||||
:param since: integer
|
||||
:param visibility: string ('all','public')
|
||||
:rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.Repository.Repository`
|
||||
@@ -368,7 +368,7 @@ class Github:
|
||||
|
||||
def get_project_column(self, id):
|
||||
"""
|
||||
:calls: `GET /projects/columns/{column_id} <https://docs.github.com/en/rest/reference/projects/columns#get-a-project-column>`_
|
||||
:calls: `GET /projects/columns/{column_id} <https://docs.github.com/en/rest/reference/projects#get-a-project-column>`_
|
||||
:rtype: :class:`github.ProjectColumn.ProjectColumn`
|
||||
:param id: integer
|
||||
"""
|
||||
@@ -383,7 +383,7 @@ class Github:
|
||||
|
||||
def get_gist(self, id):
|
||||
"""
|
||||
:calls: `GET /gists/{id} <http://docs.github.com/en/rest/reference/gists>`_
|
||||
:calls: `GET /gists/{id} <https://docs.github.com/en/rest/reference/gists>`_
|
||||
:param id: string
|
||||
:rtype: :class:`github.Gist.Gist`
|
||||
"""
|
||||
@@ -393,7 +393,7 @@ class Github:
|
||||
|
||||
def get_gists(self, since=github.GithubObject.NotSet):
|
||||
"""
|
||||
:calls: `GET /gists/public <http://docs.github.com/en/rest/reference/gists>`_
|
||||
:calls: `GET /gists/public <https://docs.github.com/en/rest/reference/gists>`_
|
||||
:param since: datetime.datetime format YYYY-MM-DDTHH:MM:SSZ
|
||||
:rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.Gist.Gist`
|
||||
"""
|
||||
@@ -415,7 +415,7 @@ class Github:
|
||||
**qualifiers,
|
||||
):
|
||||
"""
|
||||
:calls: `GET /search/repositories <http://docs.github.com/en/rest/reference/search>`_
|
||||
:calls: `GET /search/repositories <https://docs.github.com/en/rest/reference/search>`_
|
||||
:param query: string
|
||||
:param sort: string ('stars', 'forks', 'updated')
|
||||
:param order: string ('asc', 'desc')
|
||||
@@ -460,7 +460,7 @@ class Github:
|
||||
**qualifiers,
|
||||
):
|
||||
"""
|
||||
:calls: `GET /search/users <http://docs.github.com/en/rest/reference/search>`_
|
||||
:calls: `GET /search/users <https://docs.github.com/en/rest/reference/search>`_
|
||||
:param query: string
|
||||
:param sort: string ('followers', 'repositories', 'joined')
|
||||
:param order: string ('asc', 'desc')
|
||||
@@ -501,7 +501,7 @@ class Github:
|
||||
**qualifiers,
|
||||
):
|
||||
"""
|
||||
:calls: `GET /search/issues <http://docs.github.com/en/rest/reference/search>`_
|
||||
:calls: `GET /search/issues <https://docs.github.com/en/rest/reference/search>`_
|
||||
:param query: string
|
||||
:param sort: string ('comments', 'created', 'updated')
|
||||
:param order: string ('asc', 'desc')
|
||||
@@ -540,7 +540,7 @@ class Github:
|
||||
**qualifiers,
|
||||
):
|
||||
"""
|
||||
:calls: `GET /search/code <http://docs.github.com/en/rest/reference/search>`_
|
||||
:calls: `GET /search/code <https://docs.github.com/en/rest/reference/search>`_
|
||||
:param query: string
|
||||
:param sort: string ('indexed')
|
||||
:param order: string ('asc', 'desc')
|
||||
@@ -589,7 +589,7 @@ class Github:
|
||||
**qualifiers,
|
||||
):
|
||||
"""
|
||||
:calls: `GET /search/commits <http://docs.github.com/en/rest/reference/search>`_
|
||||
:calls: `GET /search/commits <https://docs.github.com/en/rest/reference/search>`_
|
||||
:param query: string
|
||||
:param sort: string ('author-date', 'committer-date')
|
||||
:param order: string ('asc', 'desc')
|
||||
@@ -629,7 +629,7 @@ class Github:
|
||||
|
||||
def search_topics(self, query, **qualifiers):
|
||||
"""
|
||||
:calls: `GET /search/topics <http://docs.github.com/en/rest/reference/search>`_
|
||||
:calls: `GET /search/topics <https://docs.github.com/en/rest/reference/search>`_
|
||||
:param query: string
|
||||
:param qualifiers: keyword dict query qualifiers
|
||||
:rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.Topic.Topic`
|
||||
@@ -657,7 +657,7 @@ class Github:
|
||||
|
||||
def render_markdown(self, text, context=github.GithubObject.NotSet):
|
||||
"""
|
||||
:calls: `POST /markdown <http://docs.github.com/en/rest/reference/markdown>`_
|
||||
:calls: `POST /markdown <https://docs.github.com/en/rest/reference/markdown>`_
|
||||
:param text: string
|
||||
:param context: :class:`github.Repository.Repository`
|
||||
:rtype: string
|
||||
@@ -677,7 +677,7 @@ class Github:
|
||||
|
||||
def get_hook(self, name):
|
||||
"""
|
||||
:calls: `GET /hooks/{name} <http://docs.github.com/en/rest/reference/repos#hooks>`_
|
||||
:calls: `GET /hooks/{name} <https://docs.github.com/en/rest/reference/repos#webhooks>`_
|
||||
:param name: string
|
||||
:rtype: :class:`github.HookDescription.HookDescription`
|
||||
"""
|
||||
@@ -691,7 +691,7 @@ class Github:
|
||||
|
||||
def get_hooks(self):
|
||||
"""
|
||||
:calls: `GET /hooks <http://docs.github.com/en/rest/reference/repos#hooks>`_
|
||||
:calls: `GET /hooks <https://docs.github.com/en/rest/reference/repos#webhooks>`_
|
||||
:rtype: list of :class:`github.HookDescription.HookDescription`
|
||||
"""
|
||||
headers, data = self.__requester.requestJsonAndCheck("GET", "/hooks")
|
||||
@@ -704,7 +704,7 @@ class Github:
|
||||
|
||||
def get_gitignore_templates(self):
|
||||
"""
|
||||
:calls: `GET /gitignore/templates <http://docs.github.com/en/rest/reference/gitignore>`_
|
||||
:calls: `GET /gitignore/templates <https://docs.github.com/en/rest/reference/gitignore>`_
|
||||
:rtype: list of string
|
||||
"""
|
||||
headers, data = self.__requester.requestJsonAndCheck(
|
||||
@@ -714,7 +714,7 @@ class Github:
|
||||
|
||||
def get_gitignore_template(self, name):
|
||||
"""
|
||||
:calls: `GET /gitignore/templates/{name} <http://docs.github.com/en/rest/reference/gitignore>`_
|
||||
:calls: `GET /gitignore/templates/{name} <https://docs.github.com/en/rest/reference/gitignore>`_
|
||||
:rtype: :class:`github.GitignoreTemplate.GitignoreTemplate`
|
||||
"""
|
||||
assert isinstance(name, str), name
|
||||
@@ -727,7 +727,7 @@ class Github:
|
||||
|
||||
def get_emojis(self):
|
||||
"""
|
||||
:calls: `GET /emojis <http://docs.github.com/en/rest/reference/emojis>`_
|
||||
:calls: `GET /emojis <https://docs.github.com/en/rest/reference/emojis>`_
|
||||
:rtype: dictionary of type => url for emoji`
|
||||
"""
|
||||
headers, attributes = self.__requester.requestJsonAndCheck("GET", "/emojis")
|
||||
@@ -753,7 +753,7 @@ class Github:
|
||||
|
||||
:param obj: the object to pickle
|
||||
:param file: the file-like object to pickle to
|
||||
:param protocol: the `pickling protocol <http://docs.python.org/2.7/library/pickle.html#data-stream-format>`_
|
||||
:param protocol: the `pickling protocol <https://python.readthedocs.io/en/latest/library/pickle.html#data-stream-format>`_
|
||||
"""
|
||||
pickle.dump((obj.__class__, obj.raw_data, obj.raw_headers), file, protocol)
|
||||
|
||||
@@ -865,7 +865,7 @@ class GithubIntegration:
|
||||
|
||||
def get_installation(self, owner, repo):
|
||||
"""
|
||||
:calls: `GET /repos/{owner}/{repo}/installation <https://docs.github.com/en/rest/reference/apps#get-a-repository-installation>`_
|
||||
:calls: `GET /repos/{owner}/{repo}/installation <https://docs.github.com/en/rest/reference/apps#get-a-repository-installation-for-the-authenticated-app>`_
|
||||
:param owner: str
|
||||
:param repo: str
|
||||
:rtype: :class:`github.Installation.Installation`
|
||||
|
||||
@@ -43,7 +43,7 @@ import github.GithubObject
|
||||
|
||||
class Membership(github.GithubObject.CompletableGithubObject):
|
||||
"""
|
||||
This class represents Membership of an organization. The reference can be found here http://docs.github.com/en/rest/reference/orgs
|
||||
This class represents Membership of an organization. The reference can be found here https://docs.github.com/en/rest/reference/orgs
|
||||
"""
|
||||
|
||||
def __repr__(self):
|
||||
|
||||
+1
-1
@@ -39,7 +39,7 @@ from . import Consts
|
||||
|
||||
class Migration(github.GithubObject.CompletableGithubObject):
|
||||
"""
|
||||
This class represents Migrations. The reference can be found here http://docs.github.com/en/rest/reference/migrations
|
||||
This class represents Migrations. The reference can be found here https://docs.github.com/en/rest/reference/migrations
|
||||
"""
|
||||
|
||||
def __repr__(self):
|
||||
|
||||
+4
-4
@@ -38,7 +38,7 @@ import github.PaginatedList
|
||||
|
||||
class Milestone(github.GithubObject.CompletableGithubObject):
|
||||
"""
|
||||
This class represents Milestones. The reference can be found here http://docs.github.com/en/rest/reference/issues#milestones
|
||||
This class represents Milestones. The reference can be found here https://docs.github.com/en/rest/reference/issues#milestones
|
||||
"""
|
||||
|
||||
def __repr__(self):
|
||||
@@ -152,7 +152,7 @@ class Milestone(github.GithubObject.CompletableGithubObject):
|
||||
|
||||
def delete(self):
|
||||
"""
|
||||
:calls: `DELETE /repos/{owner}/{repo}/milestones/{number} <http://docs.github.com/en/rest/reference/issues#milestones>`_
|
||||
:calls: `DELETE /repos/{owner}/{repo}/milestones/{number} <https://docs.github.com/en/rest/reference/issues#milestones>`_
|
||||
:rtype: None
|
||||
"""
|
||||
headers, data = self._requester.requestJsonAndCheck("DELETE", self.url)
|
||||
@@ -165,7 +165,7 @@ class Milestone(github.GithubObject.CompletableGithubObject):
|
||||
due_on=github.GithubObject.NotSet,
|
||||
):
|
||||
"""
|
||||
:calls: `PATCH /repos/{owner}/{repo}/milestones/{number} <http://docs.github.com/en/rest/reference/issues#milestones>`_
|
||||
:calls: `PATCH /repos/{owner}/{repo}/milestones/{number} <https://docs.github.com/en/rest/reference/issues#milestones>`_
|
||||
:param title: string
|
||||
:param state: string
|
||||
:param description: string
|
||||
@@ -196,7 +196,7 @@ class Milestone(github.GithubObject.CompletableGithubObject):
|
||||
|
||||
def get_labels(self):
|
||||
"""
|
||||
:calls: `GET /repos/{owner}/{repo}/milestones/{number}/labels <http://docs.github.com/en/rest/reference/issues#labels>`_
|
||||
:calls: `GET /repos/{owner}/{repo}/milestones/{number}/labels <https://docs.github.com/en/rest/reference/issues#labels>`_
|
||||
:rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.Label.Label`
|
||||
"""
|
||||
return github.PaginatedList.PaginatedList(
|
||||
|
||||
+17
-17
@@ -52,7 +52,7 @@ from . import Consts
|
||||
|
||||
class NamedUser(github.GithubObject.CompletableGithubObject):
|
||||
"""
|
||||
This class represents NamedUsers. The reference can be found here https://docs.github.com/en/rest/reference/users#get-a-single-user
|
||||
This class represents NamedUsers. The reference can be found here https://docs.github.com/en/rest/reference/users#get-a-user
|
||||
"""
|
||||
|
||||
def __repr__(self):
|
||||
@@ -430,7 +430,7 @@ class NamedUser(github.GithubObject.CompletableGithubObject):
|
||||
|
||||
def get_events(self):
|
||||
"""
|
||||
:calls: `GET /users/{user}/events <http://docs.github.com/en/rest/reference/activity#events>`_
|
||||
:calls: `GET /users/{user}/events <https://docs.github.com/en/rest/reference/activity#events>`_
|
||||
:rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.Event.Event`
|
||||
"""
|
||||
return github.PaginatedList.PaginatedList(
|
||||
@@ -439,7 +439,7 @@ class NamedUser(github.GithubObject.CompletableGithubObject):
|
||||
|
||||
def get_followers(self):
|
||||
"""
|
||||
:calls: `GET /users/{user}/followers <http://docs.github.com/en/rest/reference/users#followers>`_
|
||||
:calls: `GET /users/{user}/followers <https://docs.github.com/en/rest/reference/users#followers>`_
|
||||
:rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.NamedUser.NamedUser`
|
||||
"""
|
||||
return github.PaginatedList.PaginatedList(
|
||||
@@ -448,7 +448,7 @@ class NamedUser(github.GithubObject.CompletableGithubObject):
|
||||
|
||||
def get_following(self):
|
||||
"""
|
||||
:calls: `GET /users/{user}/following <http://docs.github.com/en/rest/reference/users#followers>`_
|
||||
:calls: `GET /users/{user}/following <https://docs.github.com/en/rest/reference/users#followers>`_
|
||||
:rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.NamedUser.NamedUser`
|
||||
"""
|
||||
return github.PaginatedList.PaginatedList(
|
||||
@@ -457,7 +457,7 @@ class NamedUser(github.GithubObject.CompletableGithubObject):
|
||||
|
||||
def get_gists(self, since=github.GithubObject.NotSet):
|
||||
"""
|
||||
:calls: `GET /users/{user}/gists <http://docs.github.com/en/rest/reference/gists>`_
|
||||
:calls: `GET /users/{user}/gists <https://docs.github.com/en/rest/reference/gists>`_
|
||||
:param since: datetime.datetime format YYYY-MM-DDTHH:MM:SSZ
|
||||
:rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.Gist.Gist`
|
||||
"""
|
||||
@@ -473,7 +473,7 @@ class NamedUser(github.GithubObject.CompletableGithubObject):
|
||||
|
||||
def get_keys(self):
|
||||
"""
|
||||
:calls: `GET /users/{user}/keys <http://docs.github.com/en/rest/reference/users#keys>`_
|
||||
:calls: `GET /users/{user}/keys <https://docs.github.com/en/rest/reference/users#create-a-public-ssh-key-for-the-authenticated-user>`_
|
||||
:rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.UserKey.UserKey`
|
||||
"""
|
||||
return github.PaginatedList.PaginatedList(
|
||||
@@ -482,7 +482,7 @@ class NamedUser(github.GithubObject.CompletableGithubObject):
|
||||
|
||||
def get_orgs(self):
|
||||
"""
|
||||
:calls: `GET /users/{user}/orgs <http://docs.github.com/en/rest/reference/orgs>`_
|
||||
:calls: `GET /users/{user}/orgs <https://docs.github.com/en/rest/reference/orgs>`_
|
||||
:rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.Organization.Organization`
|
||||
"""
|
||||
return github.PaginatedList.PaginatedList(
|
||||
@@ -507,7 +507,7 @@ class NamedUser(github.GithubObject.CompletableGithubObject):
|
||||
|
||||
def get_public_events(self):
|
||||
"""
|
||||
:calls: `GET /users/{user}/events/public <http://docs.github.com/en/rest/reference/activity#events>`_
|
||||
:calls: `GET /users/{user}/events/public <https://docs.github.com/en/rest/reference/activity#events>`_
|
||||
:rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.Event.Event`
|
||||
"""
|
||||
return github.PaginatedList.PaginatedList(
|
||||
@@ -516,7 +516,7 @@ class NamedUser(github.GithubObject.CompletableGithubObject):
|
||||
|
||||
def get_public_received_events(self):
|
||||
"""
|
||||
:calls: `GET /users/{user}/received_events/public <http://docs.github.com/en/rest/reference/activity#events>`_
|
||||
:calls: `GET /users/{user}/received_events/public <https://docs.github.com/en/rest/reference/activity#events>`_
|
||||
:rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.Event.Event`
|
||||
"""
|
||||
return github.PaginatedList.PaginatedList(
|
||||
@@ -528,7 +528,7 @@ class NamedUser(github.GithubObject.CompletableGithubObject):
|
||||
|
||||
def get_received_events(self):
|
||||
"""
|
||||
:calls: `GET /users/{user}/received_events <http://docs.github.com/en/rest/reference/activity#events>`_
|
||||
:calls: `GET /users/{user}/received_events <https://docs.github.com/en/rest/reference/activity#events>`_
|
||||
:rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.Event.Event`
|
||||
"""
|
||||
return github.PaginatedList.PaginatedList(
|
||||
@@ -537,7 +537,7 @@ class NamedUser(github.GithubObject.CompletableGithubObject):
|
||||
|
||||
def get_repo(self, name):
|
||||
"""
|
||||
:calls: `GET /repos/{owner}/{repo} <http://docs.github.com/en/rest/reference/repos>`_
|
||||
:calls: `GET /repos/{owner}/{repo} <https://docs.github.com/en/rest/reference/repos>`_
|
||||
:param name: string
|
||||
:rtype: :class:`github.Repository.Repository`
|
||||
"""
|
||||
@@ -556,7 +556,7 @@ class NamedUser(github.GithubObject.CompletableGithubObject):
|
||||
direction=github.GithubObject.NotSet,
|
||||
):
|
||||
"""
|
||||
:calls: `GET /users/{user}/repos <http://docs.github.com/en/rest/reference/repos>`_
|
||||
:calls: `GET /users/{user}/repos <https://docs.github.com/en/rest/reference/repos>`_
|
||||
:param type: string
|
||||
:param sort: string
|
||||
:param direction: string
|
||||
@@ -583,7 +583,7 @@ class NamedUser(github.GithubObject.CompletableGithubObject):
|
||||
|
||||
def get_starred(self):
|
||||
"""
|
||||
:calls: `GET /users/{user}/starred <http://docs.github.com/en/rest/reference/activity#starring>`_
|
||||
:calls: `GET /users/{user}/starred <https://docs.github.com/en/rest/reference/activity#starring>`_
|
||||
:rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.Repository.Repository`
|
||||
"""
|
||||
return github.PaginatedList.PaginatedList(
|
||||
@@ -592,7 +592,7 @@ class NamedUser(github.GithubObject.CompletableGithubObject):
|
||||
|
||||
def get_subscriptions(self):
|
||||
"""
|
||||
:calls: `GET /users/{user}/subscriptions <http://docs.github.com/en/rest/reference/activity#watching>`_
|
||||
:calls: `GET /users/{user}/subscriptions <https://docs.github.com/en/rest/reference/activity#watching>`_
|
||||
:rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.Repository.Repository`
|
||||
"""
|
||||
return github.PaginatedList.PaginatedList(
|
||||
@@ -604,7 +604,7 @@ class NamedUser(github.GithubObject.CompletableGithubObject):
|
||||
|
||||
def get_watched(self):
|
||||
"""
|
||||
:calls: `GET /users/{user}/watched <http://docs.github.com/en/rest/reference/activity#starring>`_
|
||||
:calls: `GET /users/{user}/watched <https://docs.github.com/en/rest/reference/activity#starring>`_
|
||||
:rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.Repository.Repository`
|
||||
"""
|
||||
return github.PaginatedList.PaginatedList(
|
||||
@@ -613,7 +613,7 @@ class NamedUser(github.GithubObject.CompletableGithubObject):
|
||||
|
||||
def has_in_following(self, following):
|
||||
"""
|
||||
:calls: `GET /users/{user}/following/{target_user} <http://docs.github.com/en/rest/reference/users/followers#check-if-one-user-follows-another>`_
|
||||
:calls: `GET /users/{user}/following/{target_user} <https://docs.github.com/en/rest/reference/users#check-if-a-user-follows-another-user>`_
|
||||
:param following: :class:`github.NamedUser.NamedUser`
|
||||
:rtype: bool
|
||||
"""
|
||||
@@ -629,7 +629,7 @@ class NamedUser(github.GithubObject.CompletableGithubObject):
|
||||
|
||||
def get_organization_membership(self, org):
|
||||
"""
|
||||
:calls: `GET /orgs/{org}/memberships/{username} <https://docs.github.com/en/rest/reference/orgs/members#get-organization-membership>`_
|
||||
:calls: `GET /orgs/{org}/memberships/{username} <https://docs.github.com/en/rest/reference/orgs#check-organization-membership-for-a-user>`_
|
||||
:param org: string or :class:`github.Organization.Organization`
|
||||
:rtype: :class:`github.Membership.Membership`
|
||||
"""
|
||||
|
||||
@@ -34,7 +34,7 @@ import github.Repository
|
||||
|
||||
class Notification(github.GithubObject.CompletableGithubObject):
|
||||
"""
|
||||
This class represents Notifications. The reference can be found here http://docs.github.com/en/rest/reference/activity#notifications
|
||||
This class represents Notifications. The reference can be found here https://docs.github.com/en/rest/reference/activity#notifications
|
||||
"""
|
||||
|
||||
def __repr__(self):
|
||||
|
||||
@@ -31,7 +31,7 @@ import github.GithubObject
|
||||
|
||||
class NotificationSubject(github.GithubObject.NonCompletableGithubObject):
|
||||
"""
|
||||
This class represents Subjects of Notifications. The reference can be found here http://docs.github.com/en/rest/reference/activity/notifications#list-your-notifications
|
||||
This class represents Subjects of Notifications. The reference can be found here https://docs.github.com/en/rest/reference/activity#list-notifications-for-the-authenticated-user
|
||||
"""
|
||||
|
||||
def __repr__(self):
|
||||
|
||||
+32
-32
@@ -55,7 +55,7 @@ from . import Consts
|
||||
|
||||
class Organization(github.GithubObject.CompletableGithubObject):
|
||||
"""
|
||||
This class represents Organizations. The reference can be found here http://docs.github.com/en/rest/reference/orgs
|
||||
This class represents Organizations. The reference can be found here https://docs.github.com/en/rest/reference/orgs
|
||||
"""
|
||||
|
||||
def __repr__(self):
|
||||
@@ -359,7 +359,7 @@ class Organization(github.GithubObject.CompletableGithubObject):
|
||||
|
||||
def add_to_members(self, member, role=github.GithubObject.NotSet):
|
||||
"""
|
||||
:calls: `PUT /orgs/{org}/memberships/{user} <https://docs.github.com/en/rest/reference/orgs/members#add-or-update-organization-membership>`_
|
||||
:calls: `PUT /orgs/{org}/memberships/{user} <https://docs.github.com/en/rest/reference/orgs#update-an-organization-membership-for-the-authenticated-user>`_
|
||||
:param member: :class:`github.NamedUser.NamedUser`
|
||||
:param role: string
|
||||
:rtype: None
|
||||
@@ -375,7 +375,7 @@ class Organization(github.GithubObject.CompletableGithubObject):
|
||||
|
||||
def add_to_public_members(self, public_member):
|
||||
"""
|
||||
:calls: `PUT /orgs/{org}/public_members/{user} <http://docs.github.com/en/rest/reference/orgs#members>`_
|
||||
:calls: `PUT /orgs/{org}/public_members/{user} <https://docs.github.com/en/rest/reference/orgs#members>`_
|
||||
:param public_member: :class:`github.NamedUser.NamedUser`
|
||||
:rtype: None
|
||||
"""
|
||||
@@ -386,7 +386,7 @@ class Organization(github.GithubObject.CompletableGithubObject):
|
||||
|
||||
def create_fork(self, repo):
|
||||
"""
|
||||
:calls: `POST /repos/{owner}/{repo}/forks <http://docs.github.com/en/rest/reference/repos#forks>`_
|
||||
:calls: `POST /repos/{owner}/{repo}/forks <https://docs.github.com/en/rest/reference/repos#forks>`_
|
||||
:param repo: :class:`github.Repository.Repository`
|
||||
:rtype: :class:`github.Repository.Repository`
|
||||
"""
|
||||
@@ -411,7 +411,7 @@ class Organization(github.GithubObject.CompletableGithubObject):
|
||||
active=github.GithubObject.NotSet,
|
||||
):
|
||||
"""
|
||||
:calls: `POST /orgs/{owner}/hooks <http://docs.github.com/en/rest/reference/orgs#hooks>`_
|
||||
:calls: `POST /orgs/{owner}/hooks <https://docs.github.com/en/rest/reference/orgs#webhooks>`_
|
||||
:param name: string
|
||||
:param config: dict
|
||||
:param events: list of string
|
||||
@@ -477,7 +477,7 @@ class Organization(github.GithubObject.CompletableGithubObject):
|
||||
delete_branch_on_merge=github.GithubObject.NotSet,
|
||||
):
|
||||
"""
|
||||
:calls: `POST /orgs/{org}/repos <http://docs.github.com/en/rest/reference/repos>`_
|
||||
:calls: `POST /orgs/{org}/repos <https://docs.github.com/en/rest/reference/repos>`_
|
||||
:param name: string
|
||||
:param description: string
|
||||
:param homepage: string
|
||||
@@ -591,7 +591,7 @@ class Organization(github.GithubObject.CompletableGithubObject):
|
||||
description=github.GithubObject.NotSet,
|
||||
):
|
||||
"""
|
||||
:calls: `POST /orgs/{org}/teams <http://docs.github.com/en/rest/reference/orgs#teams>`_
|
||||
:calls: `POST /orgs/{org}/teams <https://docs.github.com/en/rest/reference/teams#list-teams>`_
|
||||
:param name: string
|
||||
:param repo_names: list of :class:`github.Repository.Repository`
|
||||
:param permission: string
|
||||
@@ -632,7 +632,7 @@ class Organization(github.GithubObject.CompletableGithubObject):
|
||||
|
||||
def delete_hook(self, id):
|
||||
"""
|
||||
:calls: `DELETE /orgs/{owner}/hooks/{id} <http://docs.github.com/en/rest/reference/orgs#hooks>`_
|
||||
:calls: `DELETE /orgs/{owner}/hooks/{id} <https://docs.github.com/en/rest/reference/orgs#webhooks>`_
|
||||
:param id: integer
|
||||
:rtype: None`
|
||||
"""
|
||||
@@ -652,7 +652,7 @@ class Organization(github.GithubObject.CompletableGithubObject):
|
||||
name=github.GithubObject.NotSet,
|
||||
):
|
||||
"""
|
||||
:calls: `PATCH /orgs/{org} <http://docs.github.com/en/rest/reference/orgs>`_
|
||||
:calls: `PATCH /orgs/{org} <https://docs.github.com/en/rest/reference/orgs>`_
|
||||
:param billing_email: string
|
||||
:param blog: string
|
||||
:param company: string
|
||||
@@ -706,7 +706,7 @@ class Organization(github.GithubObject.CompletableGithubObject):
|
||||
active=github.GithubObject.NotSet,
|
||||
):
|
||||
"""
|
||||
:calls: `PATCH /orgs/{owner}/hooks/{id} <http://docs.github.com/en/rest/reference/orgs#hooks>`_
|
||||
:calls: `PATCH /orgs/{owner}/hooks/{id} <https://docs.github.com/en/rest/reference/orgs#webhooks>`_
|
||||
:param id: integer
|
||||
:param name: string
|
||||
:param config: dict
|
||||
@@ -736,7 +736,7 @@ class Organization(github.GithubObject.CompletableGithubObject):
|
||||
|
||||
def get_events(self):
|
||||
"""
|
||||
:calls: `GET /orgs/{org}/events <http://docs.github.com/en/rest/reference/activity#events>`_
|
||||
:calls: `GET /orgs/{org}/events <https://docs.github.com/en/rest/reference/activity#events>`_
|
||||
:rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.Event.Event`
|
||||
"""
|
||||
return github.PaginatedList.PaginatedList(
|
||||
@@ -745,7 +745,7 @@ class Organization(github.GithubObject.CompletableGithubObject):
|
||||
|
||||
def get_hook(self, id):
|
||||
"""
|
||||
:calls: `GET /orgs/{owner}/hooks/{id} <http://docs.github.com/en/rest/reference/orgs#hooks>`_
|
||||
:calls: `GET /orgs/{owner}/hooks/{id} <https://docs.github.com/en/rest/reference/orgs#webhooks>`_
|
||||
:param id: integer
|
||||
:rtype: :class:`github.Hook.Hook`
|
||||
"""
|
||||
@@ -757,7 +757,7 @@ class Organization(github.GithubObject.CompletableGithubObject):
|
||||
|
||||
def get_hooks(self):
|
||||
"""
|
||||
:calls: `GET /orgs/{owner}/hooks <http://docs.github.com/en/rest/reference/orgs#hooks>`_
|
||||
:calls: `GET /orgs/{owner}/hooks <https://docs.github.com/en/rest/reference/orgs#webhooks>`_
|
||||
:rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.Hook.Hook`
|
||||
"""
|
||||
return github.PaginatedList.PaginatedList(
|
||||
@@ -774,7 +774,7 @@ class Organization(github.GithubObject.CompletableGithubObject):
|
||||
since=github.GithubObject.NotSet,
|
||||
):
|
||||
"""
|
||||
:calls: `GET /orgs/{org}/issues <http://docs.github.com/en/rest/reference/issues>`_
|
||||
:calls: `GET /orgs/{org}/issues <https://docs.github.com/en/rest/reference/issues>`_
|
||||
:rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.Issue.Issue`
|
||||
:param filter: string
|
||||
:param state: string
|
||||
@@ -817,7 +817,7 @@ class Organization(github.GithubObject.CompletableGithubObject):
|
||||
self, filter_=github.GithubObject.NotSet, role=github.GithubObject.NotSet
|
||||
):
|
||||
"""
|
||||
:calls: `GET /orgs/{org}/members <http://docs.github.com/en/rest/reference/orgs#members>`_
|
||||
:calls: `GET /orgs/{org}/members <https://docs.github.com/en/rest/reference/orgs#members>`_
|
||||
:param filter_: string
|
||||
:param role: string
|
||||
:rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.NamedUser.NamedUser`
|
||||
@@ -860,7 +860,7 @@ class Organization(github.GithubObject.CompletableGithubObject):
|
||||
|
||||
def get_public_members(self):
|
||||
"""
|
||||
:calls: `GET /orgs/{org}/public_members <http://docs.github.com/en/rest/reference/orgs#members>`_
|
||||
:calls: `GET /orgs/{org}/public_members <https://docs.github.com/en/rest/reference/orgs#members>`_
|
||||
:rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.NamedUser.NamedUser`
|
||||
"""
|
||||
return github.PaginatedList.PaginatedList(
|
||||
@@ -872,7 +872,7 @@ class Organization(github.GithubObject.CompletableGithubObject):
|
||||
|
||||
def get_outside_collaborators(self, filter_=github.GithubObject.NotSet):
|
||||
"""
|
||||
:calls: `GET /orgs/{org}/outside_collaborators <http://docs.github.com/en/rest/reference/orgs#outside_collaborators>`_
|
||||
:calls: `GET /orgs/{org}/outside_collaborators <https://docs.github.com/en/rest/reference/orgs#outside-collaborators>`_
|
||||
:param filter_: string
|
||||
:rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.NamedUser.NamedUser`
|
||||
"""
|
||||
@@ -892,7 +892,7 @@ class Organization(github.GithubObject.CompletableGithubObject):
|
||||
|
||||
def remove_outside_collaborator(self, collaborator):
|
||||
"""
|
||||
:calls: `DELETE /orgs/{org}/outside_collaborators/{username} <https://docs.github.com/en/rest/reference/orgs#outside_collaborators>`_
|
||||
:calls: `DELETE /orgs/{org}/outside_collaborators/{username} <https://docs.github.com/en/rest/reference/orgs#outside-collaborators>`_
|
||||
:param collaborator: :class:`github.NamedUser.NamedUser`
|
||||
:rtype: None
|
||||
"""
|
||||
@@ -903,7 +903,7 @@ class Organization(github.GithubObject.CompletableGithubObject):
|
||||
|
||||
def convert_to_outside_collaborator(self, member):
|
||||
"""
|
||||
:calls: `PUT /orgs/{org}/outside_collaborators/{username} <https://docs.github.com/en/rest/reference/orgs#outside_collaborators>`_
|
||||
:calls: `PUT /orgs/{org}/outside_collaborators/{username} <https://docs.github.com/en/rest/reference/orgs#outside-collaborators>`_
|
||||
:param member: :class:`github.NamedUser.NamedUser`
|
||||
:rtype: None
|
||||
"""
|
||||
@@ -914,7 +914,7 @@ class Organization(github.GithubObject.CompletableGithubObject):
|
||||
|
||||
def get_repo(self, name):
|
||||
"""
|
||||
:calls: `GET /repos/{owner}/{repo} <http://docs.github.com/en/rest/reference/repos>`_
|
||||
:calls: `GET /repos/{owner}/{repo} <https://docs.github.com/en/rest/reference/repos>`_
|
||||
:param name: string
|
||||
:rtype: :class:`github.Repository.Repository`
|
||||
"""
|
||||
@@ -933,7 +933,7 @@ class Organization(github.GithubObject.CompletableGithubObject):
|
||||
direction=github.GithubObject.NotSet,
|
||||
):
|
||||
"""
|
||||
:calls: `GET /orgs/{org}/repos <http://docs.github.com/en/rest/reference/repos>`_
|
||||
:calls: `GET /orgs/{org}/repos <https://docs.github.com/en/rest/reference/repos>`_
|
||||
:param type: string ('all', 'public', 'private', 'forks', 'sources', 'member')
|
||||
:param sort: string ('created', 'updated', 'pushed', 'full_name')
|
||||
:param direction: string ('asc', desc')
|
||||
@@ -961,7 +961,7 @@ class Organization(github.GithubObject.CompletableGithubObject):
|
||||
|
||||
def get_team(self, id):
|
||||
"""
|
||||
:calls: `GET /teams/{id} <http://docs.github.com/en/rest/reference/orgs#teams>`_
|
||||
:calls: `GET /teams/{id} <https://docs.github.com/en/rest/reference/teams>`_
|
||||
:param id: integer
|
||||
:rtype: :class:`github.Team.Team`
|
||||
"""
|
||||
@@ -971,7 +971,7 @@ class Organization(github.GithubObject.CompletableGithubObject):
|
||||
|
||||
def get_team_by_slug(self, slug):
|
||||
"""
|
||||
:calls: `GET /orgs/{org}/teams/{team_slug} <https://docs.github.com/en/rest/reference/teams>`_
|
||||
:calls: `GET /orgs/{org}/teams/{team_slug} <https://docs.github.com/en/rest/reference/teams#get-a-team-by-name>`_
|
||||
:param slug: string
|
||||
:rtype: :class:`github.Team.Team`
|
||||
"""
|
||||
@@ -983,7 +983,7 @@ class Organization(github.GithubObject.CompletableGithubObject):
|
||||
|
||||
def get_teams(self):
|
||||
"""
|
||||
:calls: `GET /orgs/{org}/teams <http://docs.github.com/en/rest/reference/orgs#teams>`_
|
||||
:calls: `GET /orgs/{org}/teams <https://docs.github.com/en/rest/reference/teams#list-teams>`_
|
||||
:rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.Team.Team`
|
||||
"""
|
||||
return github.PaginatedList.PaginatedList(
|
||||
@@ -1011,7 +1011,7 @@ class Organization(github.GithubObject.CompletableGithubObject):
|
||||
teams=github.GithubObject.NotSet,
|
||||
):
|
||||
"""
|
||||
:calls: `POST /orgs/{org}/invitations <http://docs.github.com/en/rest/reference/orgs#members>`_
|
||||
:calls: `POST /orgs/{org}/invitations <https://docs.github.com/en/rest/reference/orgs#members>`_
|
||||
:param user: :class:`github.NamedUser.NamedUser`
|
||||
:param email: string
|
||||
:param role: string
|
||||
@@ -1046,7 +1046,7 @@ class Organization(github.GithubObject.CompletableGithubObject):
|
||||
|
||||
def has_in_members(self, member):
|
||||
"""
|
||||
:calls: `GET /orgs/{org}/members/{user} <http://docs.github.com/en/rest/reference/orgs#members>`_
|
||||
:calls: `GET /orgs/{org}/members/{user} <https://docs.github.com/en/rest/reference/orgs#members>`_
|
||||
:param member: :class:`github.NamedUser.NamedUser`
|
||||
:rtype: bool
|
||||
"""
|
||||
@@ -1062,7 +1062,7 @@ class Organization(github.GithubObject.CompletableGithubObject):
|
||||
|
||||
def has_in_public_members(self, public_member):
|
||||
"""
|
||||
:calls: `GET /orgs/{org}/public_members/{user} <http://docs.github.com/en/rest/reference/orgs#members>`_
|
||||
:calls: `GET /orgs/{org}/public_members/{user} <https://docs.github.com/en/rest/reference/orgs#members>`_
|
||||
:param public_member: :class:`github.NamedUser.NamedUser`
|
||||
:rtype: bool
|
||||
"""
|
||||
@@ -1074,7 +1074,7 @@ class Organization(github.GithubObject.CompletableGithubObject):
|
||||
|
||||
def remove_from_membership(self, member):
|
||||
"""
|
||||
:calls: `DELETE /orgs/{org}/memberships/{user} <https://docs.github.com/en/rest/reference/orgs/members#remove-organization-membership>`_
|
||||
:calls: `DELETE /orgs/{org}/memberships/{user} <https://docs.github.com/en/rest/reference/orgs#remove-an-organization-member>`_
|
||||
:param member: :class:`github.NamedUser.NamedUser`
|
||||
:rtype: None
|
||||
"""
|
||||
@@ -1085,7 +1085,7 @@ class Organization(github.GithubObject.CompletableGithubObject):
|
||||
|
||||
def remove_from_members(self, member):
|
||||
"""
|
||||
:calls: `DELETE /orgs/{org}/members/{user} <http://docs.github.com/en/rest/reference/orgs#members>`_
|
||||
:calls: `DELETE /orgs/{org}/members/{user} <https://docs.github.com/en/rest/reference/orgs#members>`_
|
||||
:param member: :class:`github.NamedUser.NamedUser`
|
||||
:rtype: None
|
||||
"""
|
||||
@@ -1096,7 +1096,7 @@ class Organization(github.GithubObject.CompletableGithubObject):
|
||||
|
||||
def remove_from_public_members(self, public_member):
|
||||
"""
|
||||
:calls: `DELETE /orgs/{org}/public_members/{user} <http://docs.github.com/en/rest/reference/orgs#members>`_
|
||||
:calls: `DELETE /orgs/{org}/public_members/{user} <https://docs.github.com/en/rest/reference/orgs#members>`_
|
||||
:param public_member: :class:`github.NamedUser.NamedUser`
|
||||
:rtype: None
|
||||
"""
|
||||
@@ -1112,7 +1112,7 @@ class Organization(github.GithubObject.CompletableGithubObject):
|
||||
exclude_attachments=github.GithubObject.NotSet,
|
||||
):
|
||||
"""
|
||||
:calls: `POST /orgs/{org}/migrations <https://docs.github.com/en/rest/reference/migrations#users>`_
|
||||
:calls: `POST /orgs/{org}/migrations <https://docs.github.com/en/rest/reference/migrations#list-organization-migrations>`_
|
||||
:param repos: list or tuple of str
|
||||
:param lock_repositories: bool
|
||||
:param exclude_attachments: bool
|
||||
@@ -1143,7 +1143,7 @@ class Organization(github.GithubObject.CompletableGithubObject):
|
||||
|
||||
def get_migrations(self):
|
||||
"""
|
||||
:calls: `GET /orgs/{org}/migrations <https://docs.github.com/en/rest/reference/migrations#users>`_
|
||||
:calls: `GET /orgs/{org}/migrations <https://docs.github.com/en/rest/reference/migrations#list-organization-migrations>`_
|
||||
:rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.Migration.Migration`
|
||||
"""
|
||||
return github.PaginatedList.PaginatedList(
|
||||
|
||||
@@ -90,7 +90,7 @@ class PaginatedListBase:
|
||||
|
||||
class PaginatedList(PaginatedListBase):
|
||||
"""
|
||||
This class abstracts the `pagination of the API <http://docs.github.com/en/rest/reference/#pagination>`_.
|
||||
This class abstracts the `pagination of the API <https://docs.github.com/en/rest/guides/traversing-with-pagination>`_.
|
||||
|
||||
You can simply enumerate through instances of this class::
|
||||
|
||||
|
||||
+3
-3
@@ -28,7 +28,7 @@ from . import Consts
|
||||
|
||||
class Project(github.GithubObject.CompletableGithubObject):
|
||||
"""
|
||||
This class represents Projects. The reference can be found here http://docs.github.com/en/rest/reference/projects
|
||||
This class represents Projects. The reference can be found here https://docs.github.com/en/rest/reference/projects
|
||||
"""
|
||||
|
||||
def __repr__(self):
|
||||
@@ -194,7 +194,7 @@ class Project(github.GithubObject.CompletableGithubObject):
|
||||
|
||||
def get_columns(self):
|
||||
"""
|
||||
:calls: `GET /projects/{project_id}/columns <https://docs.github.com/en/rest/reference/projects/columns#list-project-columns>`_
|
||||
:calls: `GET /projects/{project_id}/columns <https://docs.github.com/en/rest/reference/projects#list-project-columns>`_
|
||||
:rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.ProjectColumn.ProjectColumn`
|
||||
"""
|
||||
|
||||
@@ -208,7 +208,7 @@ class Project(github.GithubObject.CompletableGithubObject):
|
||||
|
||||
def create_column(self, name):
|
||||
"""
|
||||
calls: `POST /projects/{project_id}/columns <https://docs.github.com/en/rest/reference/projects/columns#create-a-project-column>`_
|
||||
calls: `POST /projects/{project_id}/columns <https://docs.github.com/en/rest/reference/projects#create-a-project-column>`_
|
||||
:param name: string
|
||||
"""
|
||||
assert isinstance(name, str), name
|
||||
|
||||
@@ -114,7 +114,7 @@ class ProjectCard(github.GithubObject.CompletableGithubObject):
|
||||
# the API doesn't make it clear which you are dealing with.
|
||||
def get_content(self, content_type=github.GithubObject.NotSet):
|
||||
"""
|
||||
:calls: `GET /repos/{owner}/{repo}/pulls/{number} <https://docs.github.com/en/rest/reference/pulls#get-a-single-pull-request>`_
|
||||
:calls: `GET /repos/{owner}/{repo}/pulls/{number} <https://docs.github.com/en/rest/reference/pulls#get-a-pull-request>`_
|
||||
:param content_type: string, optional
|
||||
:rtype: :class:`github.PullRequest.PullRequest` or :class:`github.Issue.Issue`
|
||||
"""
|
||||
@@ -176,7 +176,7 @@ class ProjectCard(github.GithubObject.CompletableGithubObject):
|
||||
self, note=github.GithubObject.NotSet, archived=github.GithubObject.NotSet
|
||||
):
|
||||
"""
|
||||
:calls: `PATCH /projects/columns/cards/{card_id} <http://docs.github.com/en/rest/reference/projects#cards>`_
|
||||
:calls: `PATCH /projects/columns/cards/{card_id} <https://docs.github.com/en/rest/reference/projects#cards>`_
|
||||
:param note: string
|
||||
:param archived: bool
|
||||
:rtype: None
|
||||
|
||||
@@ -29,7 +29,7 @@ from . import Consts
|
||||
|
||||
class ProjectColumn(github.GithubObject.CompletableGithubObject):
|
||||
"""
|
||||
This class represents Project Columns. The reference can be found here http://docs.github.com/en/rest/reference/projects#columns
|
||||
This class represents Project Columns. The reference can be found here https://docs.github.com/en/rest/reference/projects#columns
|
||||
"""
|
||||
|
||||
def __repr__(self):
|
||||
@@ -93,7 +93,7 @@ class ProjectColumn(github.GithubObject.CompletableGithubObject):
|
||||
|
||||
def get_cards(self, archived_state=github.GithubObject.NotSet):
|
||||
"""
|
||||
:calls: `GET /projects/columns/{column_id}/cards <https://docs.github.com/en/rest/reference/projects/cards#list-project-cards>`_
|
||||
:calls: `GET /projects/columns/{column_id}/cards <https://docs.github.com/en/rest/reference/projects#list-project-cards>`_
|
||||
:rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.ProjectCard.ProjectCard`
|
||||
:param archived_state: string
|
||||
"""
|
||||
@@ -120,7 +120,7 @@ class ProjectColumn(github.GithubObject.CompletableGithubObject):
|
||||
content_type=github.GithubObject.NotSet,
|
||||
):
|
||||
"""
|
||||
:calls: `POST /projects/columns/{column_id}/cards <https://docs.github.com/en/rest/reference/projects/cards#create-a-project-card>`_
|
||||
:calls: `POST /projects/columns/{column_id}/cards <https://docs.github.com/en/rest/reference/projects#create-a-project-card>`_
|
||||
:param note: string
|
||||
:param content_id: integer
|
||||
:param content_type: string
|
||||
@@ -147,7 +147,7 @@ class ProjectColumn(github.GithubObject.CompletableGithubObject):
|
||||
|
||||
def move(self, position):
|
||||
"""
|
||||
:calls: `POST POST /projects/columns/{column_id}/moves <https://docs.github.com/en/rest/reference/projects/columns#move-a-project-column>`_
|
||||
:calls: `POST POST /projects/columns/{column_id}/moves <https://docs.github.com/en/rest/reference/projects#move-a-project-column>`_
|
||||
:param position: string
|
||||
|
||||
:rtype: bool
|
||||
@@ -164,7 +164,7 @@ class ProjectColumn(github.GithubObject.CompletableGithubObject):
|
||||
|
||||
def delete(self):
|
||||
"""
|
||||
:calls: `DELETE /projects/columns/{column_id} <https://docs.github.com/en/rest/reference/projects/columns#delete-a-project-column>`_
|
||||
:calls: `DELETE /projects/columns/{column_id} <https://docs.github.com/en/rest/reference/projects#delete-a-project-column>`_
|
||||
:rtype: bool
|
||||
"""
|
||||
status, _, _ = self._requester.requestJson(
|
||||
@@ -176,7 +176,7 @@ class ProjectColumn(github.GithubObject.CompletableGithubObject):
|
||||
|
||||
def edit(self, name):
|
||||
"""
|
||||
:calls: `PATCH /projects/columns/{column_id} <https://docs.github.com/en/rest/reference/projects/columns#update-a-project-column>`_
|
||||
:calls: `PATCH /projects/columns/{column_id} <https://docs.github.com/en/rest/reference/projects#update-an-existing-project-column>`_
|
||||
:param name: string
|
||||
:rtype: None
|
||||
"""
|
||||
|
||||
+26
-26
@@ -59,7 +59,7 @@ from . import Consts
|
||||
|
||||
class PullRequest(github.GithubObject.CompletableGithubObject):
|
||||
"""
|
||||
This class represents PullRequests. The reference can be found here http://docs.github.com/en/rest/reference/pulls
|
||||
This class represents PullRequests. The reference can be found here https://docs.github.com/en/rest/reference/pulls
|
||||
"""
|
||||
|
||||
def __repr__(self):
|
||||
@@ -381,7 +381,7 @@ class PullRequest(github.GithubObject.CompletableGithubObject):
|
||||
|
||||
def as_issue(self):
|
||||
"""
|
||||
:calls: `GET /repos/{owner}/{repo}/issues/{number} <http://docs.github.com/en/rest/reference/issues>`_
|
||||
:calls: `GET /repos/{owner}/{repo}/issues/{number} <https://docs.github.com/en/rest/reference/issues>`_
|
||||
:rtype: :class:`github.Issue.Issue`
|
||||
"""
|
||||
headers, data = self._requester.requestJsonAndCheck("GET", self.issue_url)
|
||||
@@ -389,7 +389,7 @@ class PullRequest(github.GithubObject.CompletableGithubObject):
|
||||
|
||||
def create_comment(self, body, commit_id, path, position):
|
||||
"""
|
||||
:calls: `POST /repos/{owner}/{repo}/pulls/{number}/comments <http://docs.github.com/en/rest/reference/pulls#review-comments>`_
|
||||
:calls: `POST /repos/{owner}/{repo}/pulls/{number}/comments <https://docs.github.com/en/rest/reference/pulls#review-comments>`_
|
||||
:param body: string
|
||||
:param commit_id: :class:`github.Commit.Commit`
|
||||
:param path: string
|
||||
@@ -400,7 +400,7 @@ class PullRequest(github.GithubObject.CompletableGithubObject):
|
||||
|
||||
def create_review_comment(self, body, commit_id, path, position):
|
||||
"""
|
||||
:calls: `POST /repos/{owner}/{repo}/pulls/{number}/comments <http://docs.github.com/en/rest/reference/pulls#review-comments>`_
|
||||
:calls: `POST /repos/{owner}/{repo}/pulls/{number}/comments <https://docs.github.com/en/rest/reference/pulls#review-comments>`_
|
||||
:param body: string
|
||||
:param commit_id: :class:`github.Commit.Commit`
|
||||
:param path: string
|
||||
@@ -426,7 +426,7 @@ class PullRequest(github.GithubObject.CompletableGithubObject):
|
||||
|
||||
def create_review_comment_reply(self, comment_id, body):
|
||||
"""
|
||||
:calls: `POST /repos/{owner}/{repo}/pulls/{pull_number}/comments/{comment_id}/replies <http://docs.github.com/en/rest/reference/pulls#review-comments>`_
|
||||
:calls: `POST /repos/{owner}/{repo}/pulls/{pull_number}/comments/{comment_id}/replies <https://docs.github.com/en/rest/reference/pulls#review-comments>`_
|
||||
:param comment_id: int
|
||||
:param body: string
|
||||
:rtype: :class:`github.PullRequestComment.PullRequestComment`
|
||||
@@ -445,7 +445,7 @@ class PullRequest(github.GithubObject.CompletableGithubObject):
|
||||
|
||||
def create_issue_comment(self, body):
|
||||
"""
|
||||
:calls: `POST /repos/{owner}/{repo}/issues/{number}/comments <http://docs.github.com/en/rest/reference/issues#comments>`_
|
||||
:calls: `POST /repos/{owner}/{repo}/issues/{number}/comments <https://docs.github.com/en/rest/reference/issues#comments>`_
|
||||
:param body: string
|
||||
:rtype: :class:`github.IssueComment.IssueComment`
|
||||
"""
|
||||
@@ -508,7 +508,7 @@ class PullRequest(github.GithubObject.CompletableGithubObject):
|
||||
team_reviewers=github.GithubObject.NotSet,
|
||||
):
|
||||
"""
|
||||
:calls: `POST /repos/{owner}/{repo}/pulls/{number}/requested_reviewers <https://docs.github.com/en/rest/reference/pulls#review_requests>`_
|
||||
:calls: `POST /repos/{owner}/{repo}/pulls/{number}/requested_reviewers <https://docs.github.com/en/rest/reference/pulls#review-requests>`_
|
||||
:param reviewers: list of strings
|
||||
:param team_reviewers: list of strings
|
||||
:rtype: None
|
||||
@@ -532,7 +532,7 @@ class PullRequest(github.GithubObject.CompletableGithubObject):
|
||||
team_reviewers=github.GithubObject.NotSet,
|
||||
):
|
||||
"""
|
||||
:calls: `DELETE /repos/{owner}/{repo}/pulls/{number}/requested_reviewers <https://docs.github.com/en/rest/reference/pulls#review_requests>`_
|
||||
:calls: `DELETE /repos/{owner}/{repo}/pulls/{number}/requested_reviewers <https://docs.github.com/en/rest/reference/pulls#review-requests>`_
|
||||
:param reviewers: list of strings
|
||||
:param team_reviewers: list of strings
|
||||
:rtype: None
|
||||
@@ -559,7 +559,7 @@ class PullRequest(github.GithubObject.CompletableGithubObject):
|
||||
maintainer_can_modify=github.GithubObject.NotSet,
|
||||
):
|
||||
"""
|
||||
:calls: `PATCH /repos/{owner}/{repo}/pulls/{number} <http://docs.github.com/en/rest/reference/pulls>`_
|
||||
:calls: `PATCH /repos/{owner}/{repo}/pulls/{number} <https://docs.github.com/en/rest/reference/pulls>`_
|
||||
:param title: string
|
||||
:param body: string
|
||||
:param state: string
|
||||
@@ -592,7 +592,7 @@ class PullRequest(github.GithubObject.CompletableGithubObject):
|
||||
|
||||
def get_comment(self, id):
|
||||
"""
|
||||
:calls: `GET /repos/{owner}/{repo}/pulls/comments/{number} <http://docs.github.com/en/rest/reference/pulls#review-comments>`_
|
||||
:calls: `GET /repos/{owner}/{repo}/pulls/comments/{number} <https://docs.github.com/en/rest/reference/pulls#review-comments>`_
|
||||
:param id: integer
|
||||
:rtype: :class:`github.PullRequestComment.PullRequestComment`
|
||||
"""
|
||||
@@ -600,7 +600,7 @@ class PullRequest(github.GithubObject.CompletableGithubObject):
|
||||
|
||||
def get_review_comment(self, id):
|
||||
"""
|
||||
:calls: `GET /repos/{owner}/{repo}/pulls/comments/{number} <http://docs.github.com/en/rest/reference/pulls#review-comments>`_
|
||||
:calls: `GET /repos/{owner}/{repo}/pulls/comments/{number} <https://docs.github.com/en/rest/reference/pulls#review-comments>`_
|
||||
:param id: integer
|
||||
:rtype: :class:`github.PullRequestComment.PullRequestComment`
|
||||
"""
|
||||
@@ -616,14 +616,14 @@ class PullRequest(github.GithubObject.CompletableGithubObject):
|
||||
"""
|
||||
Warning: this only returns review comments. For normal conversation comments, use get_issue_comments.
|
||||
|
||||
:calls: `GET /repos/{owner}/{repo}/pulls/{number}/comments <http://docs.github.com/en/rest/reference/pulls#review-comments>`_
|
||||
:calls: `GET /repos/{owner}/{repo}/pulls/{number}/comments <https://docs.github.com/en/rest/reference/pulls#review-comments>`_
|
||||
:rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.PullRequestComment.PullRequestComment`
|
||||
"""
|
||||
return self.get_review_comments()
|
||||
|
||||
def get_review_comments(self, since=github.GithubObject.NotSet):
|
||||
"""
|
||||
:calls: `GET /repos/{owner}/{repo}/pulls/{number}/comments <http://docs.github.com/en/rest/reference/pulls#review-comments>`_
|
||||
:calls: `GET /repos/{owner}/{repo}/pulls/{number}/comments <https://docs.github.com/en/rest/reference/pulls#review-comments>`_
|
||||
:param since: datetime.datetime format YYYY-MM-DDTHH:MM:SSZ
|
||||
:rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.PullRequestComment.PullRequestComment`
|
||||
"""
|
||||
@@ -656,7 +656,7 @@ class PullRequest(github.GithubObject.CompletableGithubObject):
|
||||
|
||||
def get_commits(self):
|
||||
"""
|
||||
:calls: `GET /repos/{owner}/{repo}/pulls/{number}/commits <http://docs.github.com/en/rest/reference/pulls>`_
|
||||
:calls: `GET /repos/{owner}/{repo}/pulls/{number}/commits <https://docs.github.com/en/rest/reference/pulls>`_
|
||||
:rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.Commit.Commit`
|
||||
"""
|
||||
return github.PaginatedList.PaginatedList(
|
||||
@@ -665,7 +665,7 @@ class PullRequest(github.GithubObject.CompletableGithubObject):
|
||||
|
||||
def get_files(self):
|
||||
"""
|
||||
:calls: `GET /repos/{owner}/{repo}/pulls/{number}/files <http://docs.github.com/en/rest/reference/pulls>`_
|
||||
:calls: `GET /repos/{owner}/{repo}/pulls/{number}/files <https://docs.github.com/en/rest/reference/pulls>`_
|
||||
:rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.File.File`
|
||||
"""
|
||||
return github.PaginatedList.PaginatedList(
|
||||
@@ -674,7 +674,7 @@ class PullRequest(github.GithubObject.CompletableGithubObject):
|
||||
|
||||
def get_issue_comment(self, id):
|
||||
"""
|
||||
:calls: `GET /repos/{owner}/{repo}/issues/comments/{id} <http://docs.github.com/en/rest/reference/issues#comments>`_
|
||||
:calls: `GET /repos/{owner}/{repo}/issues/comments/{id} <https://docs.github.com/en/rest/reference/issues#comments>`_
|
||||
:param id: integer
|
||||
:rtype: :class:`github.IssueComment.IssueComment`
|
||||
"""
|
||||
@@ -688,7 +688,7 @@ class PullRequest(github.GithubObject.CompletableGithubObject):
|
||||
|
||||
def get_issue_comments(self):
|
||||
"""
|
||||
:calls: `GET /repos/{owner}/{repo}/issues/{number}/comments <http://docs.github.com/en/rest/reference/issues#comments>`_
|
||||
:calls: `GET /repos/{owner}/{repo}/issues/{number}/comments <https://docs.github.com/en/rest/reference/issues#comments>`_
|
||||
:rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.IssueComment.IssueComment`
|
||||
"""
|
||||
return github.PaginatedList.PaginatedList(
|
||||
@@ -700,7 +700,7 @@ class PullRequest(github.GithubObject.CompletableGithubObject):
|
||||
|
||||
def get_issue_events(self):
|
||||
"""
|
||||
:calls: `GET /repos/{owner}/{repo}/issues/{issue_number}/events <http://docs.github.com/en/rest/reference/issues#events>`_
|
||||
:calls: `GET /repos/{owner}/{repo}/issues/{issue_number}/events <https://docs.github.com/en/rest/reference/issues#events>`_
|
||||
:rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.IssueEvent.IssueEvent`
|
||||
"""
|
||||
return github.PaginatedList.PaginatedList(
|
||||
@@ -740,7 +740,7 @@ class PullRequest(github.GithubObject.CompletableGithubObject):
|
||||
|
||||
def get_review_requests(self):
|
||||
"""
|
||||
:calls: `GET /repos/{owner}/{repo}/pulls/{number}/requested_reviewers <https://docs.github.com/en/rest/reference/pulls#review_requests>`_
|
||||
:calls: `GET /repos/{owner}/{repo}/pulls/{number}/requested_reviewers <https://docs.github.com/en/rest/reference/pulls#review-requests>`_
|
||||
:rtype: tuple of :class:`github.PaginatedList.PaginatedList` of :class:`github.NamedUser.NamedUser` and of :class:`github.PaginatedList.PaginatedList` of :class:`github.Team.Team`
|
||||
"""
|
||||
return (
|
||||
@@ -762,7 +762,7 @@ class PullRequest(github.GithubObject.CompletableGithubObject):
|
||||
|
||||
def get_labels(self):
|
||||
"""
|
||||
:calls: `GET /repos/{owner}/{repo}/issues/{number}/labels <http://docs.github.com/en/rest/reference/issues#labels>`_
|
||||
:calls: `GET /repos/{owner}/{repo}/issues/{number}/labels <https://docs.github.com/en/rest/reference/issues#labels>`_
|
||||
:rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.Label.Label`
|
||||
"""
|
||||
return github.PaginatedList.PaginatedList(
|
||||
@@ -771,7 +771,7 @@ class PullRequest(github.GithubObject.CompletableGithubObject):
|
||||
|
||||
def add_to_labels(self, *labels):
|
||||
"""
|
||||
:calls: `POST /repos/{owner}/{repo}/issues/{number}/labels <http://docs.github.com/en/rest/reference/issues#labels>`_
|
||||
:calls: `POST /repos/{owner}/{repo}/issues/{number}/labels <https://docs.github.com/en/rest/reference/issues#labels>`_
|
||||
:param label: :class:`github.Label.Label` or string
|
||||
:rtype: None
|
||||
"""
|
||||
@@ -788,7 +788,7 @@ class PullRequest(github.GithubObject.CompletableGithubObject):
|
||||
|
||||
def delete_labels(self):
|
||||
"""
|
||||
:calls: `DELETE /repos/{owner}/{repo}/issues/{number}/labels <http://docs.github.com/en/rest/reference/issues#labels>`_
|
||||
:calls: `DELETE /repos/{owner}/{repo}/issues/{number}/labels <https://docs.github.com/en/rest/reference/issues#labels>`_
|
||||
:rtype: None
|
||||
"""
|
||||
headers, data = self._requester.requestJsonAndCheck(
|
||||
@@ -797,7 +797,7 @@ class PullRequest(github.GithubObject.CompletableGithubObject):
|
||||
|
||||
def remove_from_labels(self, label):
|
||||
"""
|
||||
:calls: `DELETE /repos/{owner}/{repo}/issues/{number}/labels/{name} <http://docs.github.com/en/rest/reference/issues#labels>`_
|
||||
:calls: `DELETE /repos/{owner}/{repo}/issues/{number}/labels/{name} <https://docs.github.com/en/rest/reference/issues#labels>`_
|
||||
:param label: :class:`github.Label.Label` or string
|
||||
:rtype: None
|
||||
"""
|
||||
@@ -812,7 +812,7 @@ class PullRequest(github.GithubObject.CompletableGithubObject):
|
||||
|
||||
def set_labels(self, *labels):
|
||||
"""
|
||||
:calls: `PUT /repos/{owner}/{repo}/issues/{number}/labels <http://docs.github.com/en/rest/reference/issues#labels>`_
|
||||
:calls: `PUT /repos/{owner}/{repo}/issues/{number}/labels <https://docs.github.com/en/rest/reference/issues#labels>`_
|
||||
:param labels: list of :class:`github.Label.Label` or strings
|
||||
:rtype: None
|
||||
"""
|
||||
@@ -829,7 +829,7 @@ class PullRequest(github.GithubObject.CompletableGithubObject):
|
||||
|
||||
def is_merged(self):
|
||||
"""
|
||||
:calls: `GET /repos/{owner}/{repo}/pulls/{number}/merge <http://docs.github.com/en/rest/reference/pulls>`_
|
||||
:calls: `GET /repos/{owner}/{repo}/pulls/{number}/merge <https://docs.github.com/en/rest/reference/pulls>`_
|
||||
:rtype: bool
|
||||
"""
|
||||
status, headers, data = self._requester.requestJson("GET", f"{self.url}/merge")
|
||||
@@ -843,7 +843,7 @@ class PullRequest(github.GithubObject.CompletableGithubObject):
|
||||
sha=github.GithubObject.NotSet,
|
||||
):
|
||||
"""
|
||||
:calls: `PUT /repos/{owner}/{repo}/pulls/{number}/merge <http://docs.github.com/en/rest/reference/pulls>`_
|
||||
:calls: `PUT /repos/{owner}/{repo}/pulls/{number}/merge <https://docs.github.com/en/rest/reference/pulls>`_
|
||||
:param commit_message: string
|
||||
:param commit_title: string
|
||||
:param merge_method: string
|
||||
|
||||
@@ -41,7 +41,7 @@ from . import Consts
|
||||
|
||||
class PullRequestComment(github.GithubObject.CompletableGithubObject):
|
||||
"""
|
||||
This class represents PullRequestComments. The reference can be found here http://docs.github.com/en/rest/reference/pulls#comments
|
||||
This class represents PullRequestComments. The reference can be found here https://docs.github.com/en/rest/reference/pulls#review-comments
|
||||
"""
|
||||
|
||||
def __repr__(self):
|
||||
@@ -169,14 +169,14 @@ class PullRequestComment(github.GithubObject.CompletableGithubObject):
|
||||
|
||||
def delete(self):
|
||||
"""
|
||||
:calls: `DELETE /repos/{owner}/{repo}/pulls/comments/{number} <http://docs.github.com/en/rest/reference/pulls#comments>`_
|
||||
:calls: `DELETE /repos/{owner}/{repo}/pulls/comments/{number} <https://docs.github.com/en/rest/reference/pulls#review-comments>`_
|
||||
:rtype: None
|
||||
"""
|
||||
headers, data = self._requester.requestJsonAndCheck("DELETE", self.url)
|
||||
|
||||
def edit(self, body):
|
||||
"""
|
||||
:calls: `PATCH /repos/{owner}/{repo}/pulls/comments/{number} <http://docs.github.com/en/rest/reference/pulls#comments>`_
|
||||
:calls: `PATCH /repos/{owner}/{repo}/pulls/comments/{number} <https://docs.github.com/en/rest/reference/pulls#review-comments>`_
|
||||
:param body: string
|
||||
:rtype: None
|
||||
"""
|
||||
|
||||
@@ -34,7 +34,7 @@ import github.GithubObject
|
||||
|
||||
class PullRequestMergeStatus(github.GithubObject.NonCompletableGithubObject):
|
||||
"""
|
||||
This class represents PullRequestMergeStatuses. The reference can be found here http://docs.github.com/en/rest/reference/pulls#get-if-a-pull-request-has-been-merged
|
||||
This class represents PullRequestMergeStatuses. The reference can be found here https://docs.github.com/en/rest/reference/pulls#check-if-a-pull-request-has-been-merged
|
||||
"""
|
||||
|
||||
def __repr__(self):
|
||||
|
||||
+1
-1
@@ -30,7 +30,7 @@ import github.GithubObject
|
||||
|
||||
class Rate(github.GithubObject.NonCompletableGithubObject):
|
||||
"""
|
||||
This class represents Rates. The reference can be found here http://docs.github.com/en/rest/reference/rate_limit
|
||||
This class represents Rates. The reference can be found here https://docs.github.com/en/rest/reference/rate-limit
|
||||
"""
|
||||
|
||||
def __repr__(self):
|
||||
|
||||
+1
-1
@@ -31,7 +31,7 @@ import github.Rate
|
||||
|
||||
class RateLimit(github.GithubObject.NonCompletableGithubObject):
|
||||
"""
|
||||
This class represents RateLimits. The reference can be found here http://docs.github.com/en/rest/reference/rate_limit
|
||||
This class represents RateLimits. The reference can be found here https://docs.github.com/en/rest/reference/rate-limit
|
||||
"""
|
||||
|
||||
def __repr__(self):
|
||||
|
||||
+1
-1
@@ -70,7 +70,7 @@ class Reaction(github.GithubObject.CompletableGithubObject):
|
||||
|
||||
def delete(self):
|
||||
"""
|
||||
:calls: `DELETE /reactions/{id} <https://docs.github.com/en/rest/reference/reactions#delete-a-reaction>`_
|
||||
:calls: `DELETE /reactions/{id} <https://docs.github.com/en/rest/reference/reactions#delete-a-reaction-legacy>`_
|
||||
:rtype: None
|
||||
"""
|
||||
self._requester.requestJsonAndCheck(
|
||||
|
||||
+94
-94
@@ -147,7 +147,7 @@ from . import Consts
|
||||
|
||||
class Repository(github.GithubObject.CompletableGithubObject):
|
||||
"""
|
||||
This class represents Repositories. The reference can be found here http://docs.github.com/en/rest/reference/repos
|
||||
This class represents Repositories. The reference can be found here https://docs.github.com/en/rest/reference/repos
|
||||
"""
|
||||
|
||||
def __repr__(self):
|
||||
@@ -805,7 +805,7 @@ class Repository(github.GithubObject.CompletableGithubObject):
|
||||
|
||||
def add_to_collaborators(self, collaborator, permission=github.GithubObject.NotSet):
|
||||
"""
|
||||
:calls: `PUT /repos/{owner}/{repo}/collaborators/{user} <http://docs.github.com/en/rest/reference/repos#collaborators>`_
|
||||
:calls: `PUT /repos/{owner}/{repo}/collaborators/{user} <https://docs.github.com/en/rest/reference/repos#collaborators>`_
|
||||
:param collaborator: string or :class:`github.NamedUser.NamedUser`
|
||||
:param permission: string 'pull', 'push' or 'admin'
|
||||
:rtype: None
|
||||
@@ -838,7 +838,7 @@ class Repository(github.GithubObject.CompletableGithubObject):
|
||||
|
||||
def get_collaborator_permission(self, collaborator):
|
||||
"""
|
||||
:calls: `GET /repos/{owner}/{repo}/collaborators/{username}/permission <http://docs.github.com/en/rest/reference/repos#collaborators>`_
|
||||
:calls: `GET /repos/{owner}/{repo}/collaborators/{username}/permission <https://docs.github.com/en/rest/reference/repos#collaborators>`_
|
||||
:param collaborator: string or :class:`github.NamedUser.NamedUser`
|
||||
:rtype: string
|
||||
"""
|
||||
@@ -878,7 +878,7 @@ class Repository(github.GithubObject.CompletableGithubObject):
|
||||
|
||||
def compare(self, base, head):
|
||||
"""
|
||||
:calls: `GET /repos/{owner}/{repo}/compare/{base...:head} <http://docs.github.com/en/rest/reference/repos#commits>`_
|
||||
:calls: `GET /repos/{owner}/{repo}/compare/{base...:head} <https://docs.github.com/en/rest/reference/repos#commits>`_
|
||||
:param base: string
|
||||
:param head: string
|
||||
:rtype: :class:`github.Comparison.Comparison`
|
||||
@@ -894,7 +894,7 @@ class Repository(github.GithubObject.CompletableGithubObject):
|
||||
|
||||
def create_git_blob(self, content, encoding):
|
||||
"""
|
||||
:calls: `POST /repos/{owner}/{repo}/git/blobs <http://docs.github.com/en/rest/reference/git#blobs>`_
|
||||
:calls: `POST /repos/{owner}/{repo}/git/blobs <https://docs.github.com/en/rest/reference/git#blobs>`_
|
||||
:param content: string
|
||||
:param encoding: string
|
||||
:rtype: :class:`github.GitBlob.GitBlob`
|
||||
@@ -919,7 +919,7 @@ class Repository(github.GithubObject.CompletableGithubObject):
|
||||
committer=github.GithubObject.NotSet,
|
||||
):
|
||||
"""
|
||||
:calls: `POST /repos/{owner}/{repo}/git/commits <http://docs.github.com/en/rest/reference/git#commits>`_
|
||||
:calls: `POST /repos/{owner}/{repo}/git/commits <https://docs.github.com/en/rest/reference/git#commits>`_
|
||||
:param message: string
|
||||
:param tree: :class:`github.GitTree.GitTree`
|
||||
:param parents: list of :class:`github.GitCommit.GitCommit`
|
||||
@@ -956,7 +956,7 @@ class Repository(github.GithubObject.CompletableGithubObject):
|
||||
|
||||
def create_git_ref(self, ref, sha):
|
||||
"""
|
||||
:calls: `POST /repos/{owner}/{repo}/git/refs <http://docs.github.com/en/rest/reference/git#refs>`_
|
||||
:calls: `POST /repos/{owner}/{repo}/git/refs <https://docs.github.com/en/rest/reference/git#references>`_
|
||||
:param ref: string
|
||||
:param sha: string
|
||||
:rtype: :class:`github.GitRef.GitRef`
|
||||
@@ -1019,7 +1019,7 @@ class Repository(github.GithubObject.CompletableGithubObject):
|
||||
target_commitish=github.GithubObject.NotSet,
|
||||
):
|
||||
"""
|
||||
:calls: `POST /repos/{owner}/{repo}/releases <http://docs.github.com/en/rest/reference/repos#releases>`_
|
||||
:calls: `POST /repos/{owner}/{repo}/releases <https://docs.github.com/en/rest/reference/repos#releases>`_
|
||||
:param tag: string
|
||||
:param name: string
|
||||
:param message: string
|
||||
@@ -1068,7 +1068,7 @@ class Repository(github.GithubObject.CompletableGithubObject):
|
||||
self, tag, message, object, type, tagger=github.GithubObject.NotSet
|
||||
):
|
||||
"""
|
||||
:calls: `POST /repos/{owner}/{repo}/git/tags <http://docs.github.com/en/rest/reference/git#tags>`_
|
||||
:calls: `POST /repos/{owner}/{repo}/git/tags <https://docs.github.com/en/rest/reference/git#tags>`_
|
||||
:param tag: string
|
||||
:param message: string
|
||||
:param object: string
|
||||
@@ -1098,7 +1098,7 @@ class Repository(github.GithubObject.CompletableGithubObject):
|
||||
|
||||
def create_git_tree(self, tree, base_tree=github.GithubObject.NotSet):
|
||||
"""
|
||||
:calls: `POST /repos/{owner}/{repo}/git/trees <http://docs.github.com/en/rest/reference/git#trees>`_
|
||||
:calls: `POST /repos/{owner}/{repo}/git/trees <https://docs.github.com/en/rest/reference/git#trees>`_
|
||||
:param tree: list of :class:`github.InputGitTreeElement.InputGitTreeElement`
|
||||
:param base_tree: :class:`github.GitTree.GitTree`
|
||||
:rtype: :class:`github.GitTree.GitTree`
|
||||
@@ -1127,7 +1127,7 @@ class Repository(github.GithubObject.CompletableGithubObject):
|
||||
active=github.GithubObject.NotSet,
|
||||
):
|
||||
"""
|
||||
:calls: `POST /repos/{owner}/{repo}/hooks <http://docs.github.com/en/rest/reference/repos#webhooks>`_
|
||||
:calls: `POST /repos/{owner}/{repo}/hooks <https://docs.github.com/en/rest/reference/repos#webhooks>`_
|
||||
:param name: string
|
||||
:param config: dict
|
||||
:param events: list of string
|
||||
@@ -1163,7 +1163,7 @@ class Repository(github.GithubObject.CompletableGithubObject):
|
||||
assignees=github.GithubObject.NotSet,
|
||||
):
|
||||
"""
|
||||
:calls: `POST /repos/{owner}/{repo}/issues <http://docs.github.com/en/rest/reference/issues>`_
|
||||
:calls: `POST /repos/{owner}/{repo}/issues <https://docs.github.com/en/rest/reference/issues>`_
|
||||
:param title: string
|
||||
:param body: string
|
||||
:param assignee: string or :class:`github.NamedUser.NamedUser`
|
||||
@@ -1222,7 +1222,7 @@ class Repository(github.GithubObject.CompletableGithubObject):
|
||||
|
||||
def create_key(self, title, key, read_only=False):
|
||||
"""
|
||||
:calls: `POST /repos/{owner}/{repo}/keys <http://docs.github.com/en/rest/reference/repos#deploy-keys>`_
|
||||
:calls: `POST /repos/{owner}/{repo}/keys <https://docs.github.com/en/rest/reference/repos#deploy-keys>`_
|
||||
:param title: string
|
||||
:param key: string
|
||||
:param read_only: bool
|
||||
@@ -1245,7 +1245,7 @@ class Repository(github.GithubObject.CompletableGithubObject):
|
||||
|
||||
def create_label(self, name, color, description=github.GithubObject.NotSet):
|
||||
"""
|
||||
:calls: `POST /repos/{owner}/{repo}/labels <http://docs.github.com/en/rest/reference/issues#labels>`_
|
||||
:calls: `POST /repos/{owner}/{repo}/labels <https://docs.github.com/en/rest/reference/issues#labels>`_
|
||||
:param name: string
|
||||
:param color: string
|
||||
:param description: string
|
||||
@@ -1278,7 +1278,7 @@ class Repository(github.GithubObject.CompletableGithubObject):
|
||||
due_on=github.GithubObject.NotSet,
|
||||
):
|
||||
"""
|
||||
:calls: `POST /repos/{owner}/{repo}/milestones <http://docs.github.com/en/rest/reference/issues#milestones>`_
|
||||
:calls: `POST /repos/{owner}/{repo}/milestones <https://docs.github.com/en/rest/reference/issues#milestones>`_
|
||||
:param title: string
|
||||
:param state: string
|
||||
:param description: string
|
||||
@@ -1334,7 +1334,7 @@ class Repository(github.GithubObject.CompletableGithubObject):
|
||||
|
||||
def create_pull(self, *args, **kwds):
|
||||
"""
|
||||
:calls: `POST /repos/{owner}/{repo}/pulls <http://docs.github.com/en/rest/reference/pulls>`_
|
||||
:calls: `POST /repos/{owner}/{repo}/pulls <https://docs.github.com/en/rest/reference/pulls>`_
|
||||
:param title: string
|
||||
:param body: string
|
||||
:param issue: :class:`github.Issue.Issue`
|
||||
@@ -1457,7 +1457,7 @@ class Repository(github.GithubObject.CompletableGithubObject):
|
||||
vcs_password=github.GithubObject.NotSet,
|
||||
):
|
||||
"""
|
||||
:calls: `PUT /repos/{owner}/{repo}/import <https://docs.github.com/en/rest/reference/migration/source_imports#start-an-import>`_
|
||||
:calls: `PUT /repos/{owner}/{repo}/import <https://docs.github.com/en/rest/reference/migrations#start-an-import>`_
|
||||
:param vcs: string
|
||||
:param vcs_url: string
|
||||
:param vcs_username: string
|
||||
@@ -1492,7 +1492,7 @@ class Repository(github.GithubObject.CompletableGithubObject):
|
||||
|
||||
def delete(self):
|
||||
"""
|
||||
:calls: `DELETE /repos/{owner}/{repo} <http://docs.github.com/en/rest/reference/repos>`_
|
||||
:calls: `DELETE /repos/{owner}/{repo} <https://docs.github.com/en/rest/reference/repos>`_
|
||||
:rtype: None
|
||||
"""
|
||||
headers, data = self._requester.requestJsonAndCheck("DELETE", self.url)
|
||||
@@ -1515,7 +1515,7 @@ class Repository(github.GithubObject.CompletableGithubObject):
|
||||
archived=github.GithubObject.NotSet,
|
||||
):
|
||||
"""
|
||||
:calls: `PATCH /repos/{owner}/{repo} <http://docs.github.com/en/rest/reference/repos>`_
|
||||
:calls: `PATCH /repos/{owner}/{repo} <https://docs.github.com/en/rest/reference/repos>`_
|
||||
:param name: string
|
||||
:param description: string
|
||||
:param homepage: string
|
||||
@@ -1529,7 +1529,7 @@ class Repository(github.GithubObject.CompletableGithubObject):
|
||||
:param allow_merge_commit: bool
|
||||
:param allow_rebase_merge: bool
|
||||
:param delete_branch_on_merge: bool
|
||||
:param archived: bool. Unarchiving repositories is currently not supported through API (https://docs.github.com/en/rest/reference/repos#edit)
|
||||
:param archived: bool. Unarchiving repositories is currently not supported through API (https://docs.github.com/en/rest/reference/repos#update-a-repository)
|
||||
:rtype: None
|
||||
"""
|
||||
if name is None:
|
||||
@@ -1610,7 +1610,7 @@ class Repository(github.GithubObject.CompletableGithubObject):
|
||||
|
||||
def get_archive_link(self, archive_format, ref=github.GithubObject.NotSet):
|
||||
"""
|
||||
:calls: `GET /repos/{owner}/{repo}/{archive_format}/{ref} <http://docs.github.com/en/rest/reference/repos#contents>`_
|
||||
:calls: `GET /repos/{owner}/{repo}/{archive_format}/{ref} <https://docs.github.com/en/rest/reference/repos#contents>`_
|
||||
:param archive_format: string
|
||||
:param ref: string
|
||||
:rtype: string
|
||||
@@ -1625,7 +1625,7 @@ class Repository(github.GithubObject.CompletableGithubObject):
|
||||
|
||||
def get_assignees(self):
|
||||
"""
|
||||
:calls: `GET /repos/{owner}/{repo}/assignees <http://docs.github.com/en/rest/reference/issues#assignees>`_
|
||||
:calls: `GET /repos/{owner}/{repo}/assignees <https://docs.github.com/en/rest/reference/issues#assignees>`_
|
||||
:rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.NamedUser.NamedUser`
|
||||
"""
|
||||
return github.PaginatedList.PaginatedList(
|
||||
@@ -1634,7 +1634,7 @@ class Repository(github.GithubObject.CompletableGithubObject):
|
||||
|
||||
def get_branch(self, branch):
|
||||
"""
|
||||
:calls: `GET /repos/{owner}/{repo}/branches/{branch} <https://docs.github.com/en/rest/reference/repos/branches#get-branch>`_
|
||||
:calls: `GET /repos/{owner}/{repo}/branches/{branch} <https://docs.github.com/en/rest/reference/repos#get-a-branch>`_
|
||||
:param branch: string
|
||||
:rtype: :class:`github.Branch.Branch`
|
||||
"""
|
||||
@@ -1646,7 +1646,7 @@ class Repository(github.GithubObject.CompletableGithubObject):
|
||||
|
||||
def get_branches(self):
|
||||
"""
|
||||
:calls: `GET /repos/{owner}/{repo}/branches <http://docs.github.com/en/rest/reference/repos>`_
|
||||
:calls: `GET /repos/{owner}/{repo}/branches <https://docs.github.com/en/rest/reference/repos>`_
|
||||
:rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.Branch.Branch`
|
||||
"""
|
||||
return github.PaginatedList.PaginatedList(
|
||||
@@ -1655,7 +1655,7 @@ class Repository(github.GithubObject.CompletableGithubObject):
|
||||
|
||||
def get_collaborators(self, affiliation=github.GithubObject.NotSet):
|
||||
"""
|
||||
:calls: `GET /repos/{owner}/{repo}/collaborators <http://docs.github.com/en/rest/reference/repos#collaborators>`_
|
||||
:calls: `GET /repos/{owner}/{repo}/collaborators <https://docs.github.com/en/rest/reference/repos#collaborators>`_
|
||||
:param affiliation: string
|
||||
:rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.NamedUser.NamedUser`
|
||||
"""
|
||||
@@ -1678,7 +1678,7 @@ class Repository(github.GithubObject.CompletableGithubObject):
|
||||
|
||||
def get_comment(self, id):
|
||||
"""
|
||||
:calls: `GET /repos/{owner}/{repo}/comments/{id} <http://docs.github.com/en/rest/reference/repos#comments>`_
|
||||
:calls: `GET /repos/{owner}/{repo}/comments/{id} <https://docs.github.com/en/rest/reference/repos#comments>`_
|
||||
:param id: integer
|
||||
:rtype: :class:`github.CommitComment.CommitComment`
|
||||
"""
|
||||
@@ -1692,7 +1692,7 @@ class Repository(github.GithubObject.CompletableGithubObject):
|
||||
|
||||
def get_comments(self):
|
||||
"""
|
||||
:calls: `GET /repos/{owner}/{repo}/comments <http://docs.github.com/en/rest/reference/repos#comments>`_
|
||||
:calls: `GET /repos/{owner}/{repo}/comments <https://docs.github.com/en/rest/reference/repos#comments>`_
|
||||
:rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.CommitComment.CommitComment`
|
||||
"""
|
||||
return github.PaginatedList.PaginatedList(
|
||||
@@ -1704,7 +1704,7 @@ class Repository(github.GithubObject.CompletableGithubObject):
|
||||
|
||||
def get_commit(self, sha):
|
||||
"""
|
||||
:calls: `GET /repos/{owner}/{repo}/commits/{sha} <http://docs.github.com/en/rest/reference/repos#commits>`_
|
||||
:calls: `GET /repos/{owner}/{repo}/commits/{sha} <https://docs.github.com/en/rest/reference/repos#commits>`_
|
||||
:param sha: string
|
||||
:rtype: :class:`github.Commit.Commit`
|
||||
"""
|
||||
@@ -1723,7 +1723,7 @@ class Repository(github.GithubObject.CompletableGithubObject):
|
||||
author=github.GithubObject.NotSet,
|
||||
):
|
||||
"""
|
||||
:calls: `GET /repos/{owner}/{repo}/commits <http://docs.github.com/en/rest/reference/repos#commits>`_
|
||||
:calls: `GET /repos/{owner}/{repo}/commits <https://docs.github.com/en/rest/reference/repos#commits>`_
|
||||
:param sha: string
|
||||
:param path: string
|
||||
:param since: datetime.datetime
|
||||
@@ -1773,7 +1773,7 @@ class Repository(github.GithubObject.CompletableGithubObject):
|
||||
|
||||
def get_contents(self, path, ref=github.GithubObject.NotSet):
|
||||
"""
|
||||
:calls: `GET /repos/{owner}/{repo}/contents/{path} <http://docs.github.com/en/rest/reference/repos#contents>`_
|
||||
:calls: `GET /repos/{owner}/{repo}/contents/{path} <https://docs.github.com/en/rest/reference/repos#contents>`_
|
||||
:param path: string
|
||||
:param ref: string
|
||||
:rtype: :class:`github.ContentFile.ContentFile` or a list of them
|
||||
@@ -2177,7 +2177,7 @@ class Repository(github.GithubObject.CompletableGithubObject):
|
||||
):
|
||||
"""This method deletes a file in a repository
|
||||
|
||||
:calls: `DELETE /repos/{owner}/{repo}/contents/{path} <https://docs.github.com/en/rest/reference/repos/contents#delete-a-file>`_
|
||||
:calls: `DELETE /repos/{owner}/{repo}/contents/{path} <https://docs.github.com/en/rest/reference/repos#delete-a-file>`_
|
||||
:param path: string, Required. The content path.
|
||||
:param message: string, Required. The commit message.
|
||||
:param sha: string, Required. The blob SHA of the file being replaced.
|
||||
@@ -2230,7 +2230,7 @@ class Repository(github.GithubObject.CompletableGithubObject):
|
||||
)
|
||||
def get_dir_contents(self, path, ref=github.GithubObject.NotSet):
|
||||
"""
|
||||
:calls: `GET /repos/{owner}/{repo}/contents/{path} <http://docs.github.com/en/rest/reference/repos#contents>`_
|
||||
:calls: `GET /repos/{owner}/{repo}/contents/{path} <https://docs.github.com/en/rest/reference/repos#contents>`_
|
||||
:param path: string
|
||||
:param ref: string
|
||||
:rtype: list of :class:`github.ContentFile.ContentFile`
|
||||
@@ -2239,7 +2239,7 @@ class Repository(github.GithubObject.CompletableGithubObject):
|
||||
|
||||
def get_contributors(self, anon=github.GithubObject.NotSet):
|
||||
"""
|
||||
:calls: `GET /repos/{owner}/{repo}/contributors <http://docs.github.com/en/rest/reference/repos>`_
|
||||
:calls: `GET /repos/{owner}/{repo}/contributors <https://docs.github.com/en/rest/reference/repos>`_
|
||||
:param anon: string
|
||||
:rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.NamedUser.NamedUser`
|
||||
"""
|
||||
@@ -2256,7 +2256,7 @@ class Repository(github.GithubObject.CompletableGithubObject):
|
||||
|
||||
def get_download(self, id):
|
||||
"""
|
||||
:calls: `GET /repos/{owner}/{repo}/downloads/{id} <http://docs.github.com/en/rest/reference/repos>`_
|
||||
:calls: `GET /repos/{owner}/{repo}/downloads/{id} <https://docs.github.com/en/rest/reference/repos>`_
|
||||
:param id: integer
|
||||
:rtype: :class:`github.Download.Download`
|
||||
"""
|
||||
@@ -2268,7 +2268,7 @@ class Repository(github.GithubObject.CompletableGithubObject):
|
||||
|
||||
def get_downloads(self):
|
||||
"""
|
||||
:calls: `GET /repos/{owner}/{repo}/downloads <http://docs.github.com/en/rest/reference/repos>`_
|
||||
:calls: `GET /repos/{owner}/{repo}/downloads <https://docs.github.com/en/rest/reference/repos>`_
|
||||
:rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.Download.Download`
|
||||
"""
|
||||
return github.PaginatedList.PaginatedList(
|
||||
@@ -2277,7 +2277,7 @@ class Repository(github.GithubObject.CompletableGithubObject):
|
||||
|
||||
def get_events(self):
|
||||
"""
|
||||
:calls: `GET /repos/{owner}/{repo}/events <http://docs.github.com/en/rest/reference/activity#events>`_
|
||||
:calls: `GET /repos/{owner}/{repo}/events <https://docs.github.com/en/rest/reference/activity#events>`_
|
||||
:rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.Event.Event`
|
||||
"""
|
||||
return github.PaginatedList.PaginatedList(
|
||||
@@ -2286,7 +2286,7 @@ class Repository(github.GithubObject.CompletableGithubObject):
|
||||
|
||||
def get_forks(self):
|
||||
"""
|
||||
:calls: `GET /repos/{owner}/{repo}/forks <http://docs.github.com/en/rest/reference/repos#forks>`_
|
||||
:calls: `GET /repos/{owner}/{repo}/forks <https://docs.github.com/en/rest/reference/repos#forks>`_
|
||||
:rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.Repository.Repository`
|
||||
"""
|
||||
return github.PaginatedList.PaginatedList(
|
||||
@@ -2295,7 +2295,7 @@ class Repository(github.GithubObject.CompletableGithubObject):
|
||||
|
||||
def create_fork(self, organization=github.GithubObject.NotSet):
|
||||
"""
|
||||
:calls: `POST /repos/{owner}/{repo}/forks <http://docs.github.com/en/rest/reference/repos#forks>`_
|
||||
:calls: `POST /repos/{owner}/{repo}/forks <https://docs.github.com/en/rest/reference/repos#forks>`_
|
||||
:param organization: string or "none" or "*"
|
||||
:rtype: :class:`github.Repository.Repository`
|
||||
"""
|
||||
@@ -2314,7 +2314,7 @@ class Repository(github.GithubObject.CompletableGithubObject):
|
||||
|
||||
def get_git_blob(self, sha):
|
||||
"""
|
||||
:calls: `GET /repos/{owner}/{repo}/git/blobs/{sha} <http://docs.github.com/en/rest/reference/git#blobs>`_
|
||||
:calls: `GET /repos/{owner}/{repo}/git/blobs/{sha} <https://docs.github.com/en/rest/reference/git#blobs>`_
|
||||
:param sha: string
|
||||
:rtype: :class:`github.GitBlob.GitBlob`
|
||||
"""
|
||||
@@ -2326,7 +2326,7 @@ class Repository(github.GithubObject.CompletableGithubObject):
|
||||
|
||||
def get_git_commit(self, sha):
|
||||
"""
|
||||
:calls: `GET /repos/{owner}/{repo}/git/commits/{sha} <http://docs.github.com/en/rest/reference/git#commits>`_
|
||||
:calls: `GET /repos/{owner}/{repo}/git/commits/{sha} <https://docs.github.com/en/rest/reference/git#commits>`_
|
||||
:param sha: string
|
||||
:rtype: :class:`github.GitCommit.GitCommit`
|
||||
"""
|
||||
@@ -2340,7 +2340,7 @@ class Repository(github.GithubObject.CompletableGithubObject):
|
||||
|
||||
def get_git_ref(self, ref):
|
||||
"""
|
||||
:calls: `GET /repos/{owner}/{repo}/git/refs/{ref} <http://docs.github.com/en/rest/reference/git#refs>`_
|
||||
:calls: `GET /repos/{owner}/{repo}/git/refs/{ref} <https://docs.github.com/en/rest/reference/git#references>`_
|
||||
:param ref: string
|
||||
:rtype: :class:`github.GitRef.GitRef`
|
||||
"""
|
||||
@@ -2355,7 +2355,7 @@ class Repository(github.GithubObject.CompletableGithubObject):
|
||||
|
||||
def get_git_refs(self):
|
||||
"""
|
||||
:calls: `GET /repos/{owner}/{repo}/git/refs <http://docs.github.com/en/rest/reference/git#refs>`_
|
||||
:calls: `GET /repos/{owner}/{repo}/git/refs <https://docs.github.com/en/rest/reference/git#references>`_
|
||||
:rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.GitRef.GitRef`
|
||||
"""
|
||||
return github.PaginatedList.PaginatedList(
|
||||
@@ -2364,7 +2364,7 @@ class Repository(github.GithubObject.CompletableGithubObject):
|
||||
|
||||
def get_git_matching_refs(self, ref):
|
||||
"""
|
||||
:calls: `GET /repos/{owner}/{repo}/git/matching-refs/{ref} <https://docs.github.com/en/rest/reference/git/refs#list-matching-references>`
|
||||
:calls: `GET /repos/{owner}/{repo}/git/matching-refs/{ref} <https://docs.github.com/en/rest/reference/git#list-matching-references>`
|
||||
:rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.GitRef.GitRef`
|
||||
"""
|
||||
assert isinstance(ref, str), ref
|
||||
@@ -2377,7 +2377,7 @@ class Repository(github.GithubObject.CompletableGithubObject):
|
||||
|
||||
def get_git_tag(self, sha):
|
||||
"""
|
||||
:calls: `GET /repos/{owner}/{repo}/git/tags/{sha} <http://docs.github.com/en/rest/reference/git#tags>`_
|
||||
:calls: `GET /repos/{owner}/{repo}/git/tags/{sha} <https://docs.github.com/en/rest/reference/git#tags>`_
|
||||
:param sha: string
|
||||
:rtype: :class:`github.GitTag.GitTag`
|
||||
"""
|
||||
@@ -2389,7 +2389,7 @@ class Repository(github.GithubObject.CompletableGithubObject):
|
||||
|
||||
def get_git_tree(self, sha, recursive=github.GithubObject.NotSet):
|
||||
"""
|
||||
:calls: `GET /repos/{owner}/{repo}/git/trees/{sha} <http://docs.github.com/en/rest/reference/git#trees>`_
|
||||
:calls: `GET /repos/{owner}/{repo}/git/trees/{sha} <https://docs.github.com/en/rest/reference/git#trees>`_
|
||||
:param sha: string
|
||||
:param recursive: bool
|
||||
:rtype: :class:`github.GitTree.GitTree`
|
||||
@@ -2409,7 +2409,7 @@ class Repository(github.GithubObject.CompletableGithubObject):
|
||||
|
||||
def get_hook(self, id):
|
||||
"""
|
||||
:calls: `GET /repos/{owner}/{repo}/hooks/{id} <http://docs.github.com/en/rest/reference/repos#webhooks>`_
|
||||
:calls: `GET /repos/{owner}/{repo}/hooks/{id} <https://docs.github.com/en/rest/reference/repos#webhooks>`_
|
||||
:param id: integer
|
||||
:rtype: :class:`github.Hook.Hook`
|
||||
"""
|
||||
@@ -2421,7 +2421,7 @@ class Repository(github.GithubObject.CompletableGithubObject):
|
||||
|
||||
def get_hooks(self):
|
||||
"""
|
||||
:calls: `GET /repos/{owner}/{repo}/hooks <http://docs.github.com/en/rest/reference/repos#webhooks>`_
|
||||
:calls: `GET /repos/{owner}/{repo}/hooks <https://docs.github.com/en/rest/reference/repos#webhooks>`_
|
||||
:rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.Hook.Hook`
|
||||
"""
|
||||
return github.PaginatedList.PaginatedList(
|
||||
@@ -2430,7 +2430,7 @@ class Repository(github.GithubObject.CompletableGithubObject):
|
||||
|
||||
def get_issue(self, number):
|
||||
"""
|
||||
:calls: `GET /repos/{owner}/{repo}/issues/{number} <http://docs.github.com/en/rest/reference/issues>`_
|
||||
:calls: `GET /repos/{owner}/{repo}/issues/{number} <https://docs.github.com/en/rest/reference/issues>`_
|
||||
:param number: integer
|
||||
:rtype: :class:`github.Issue.Issue`
|
||||
"""
|
||||
@@ -2453,7 +2453,7 @@ class Repository(github.GithubObject.CompletableGithubObject):
|
||||
creator=github.GithubObject.NotSet,
|
||||
):
|
||||
"""
|
||||
:calls: `GET /repos/{owner}/{repo}/issues <http://docs.github.com/en/rest/reference/issues>`_
|
||||
:calls: `GET /repos/{owner}/{repo}/issues <https://docs.github.com/en/rest/reference/issues>`_
|
||||
:param milestone: :class:`github.Milestone.Milestone` or "none" or "*"
|
||||
:param state: string. `open`, `closed`, or `all`. If this is not set the GitHub API default behavior will be used. At the moment this is to return only open issues. This might change anytime on GitHub API side and it could be clever to explicitly specify the state value.
|
||||
:param assignee: string or :class:`github.NamedUser.NamedUser` or "none" or "*"
|
||||
@@ -2540,7 +2540,7 @@ class Repository(github.GithubObject.CompletableGithubObject):
|
||||
since=github.GithubObject.NotSet,
|
||||
):
|
||||
"""
|
||||
:calls: `GET /repos/{owner}/{repo}/issues/comments <http://docs.github.com/en/rest/reference/issues#comments>`_
|
||||
:calls: `GET /repos/{owner}/{repo}/issues/comments <https://docs.github.com/en/rest/reference/issues#comments>`_
|
||||
:param sort: string
|
||||
:param direction: string
|
||||
:param since: datetime.datetime
|
||||
@@ -2569,7 +2569,7 @@ class Repository(github.GithubObject.CompletableGithubObject):
|
||||
|
||||
def get_issues_event(self, id):
|
||||
"""
|
||||
:calls: `GET /repos/{owner}/{repo}/issues/events/{id} <http://docs.github.com/en/rest/reference/issues#events>`_
|
||||
:calls: `GET /repos/{owner}/{repo}/issues/events/{id} <https://docs.github.com/en/rest/reference/issues#events>`_
|
||||
:param id: integer
|
||||
:rtype: :class:`github.IssueEvent.IssueEvent`
|
||||
"""
|
||||
@@ -2585,7 +2585,7 @@ class Repository(github.GithubObject.CompletableGithubObject):
|
||||
|
||||
def get_issues_events(self):
|
||||
"""
|
||||
:calls: `GET /repos/{owner}/{repo}/issues/events <http://docs.github.com/en/rest/reference/issues#events>`_
|
||||
:calls: `GET /repos/{owner}/{repo}/issues/events <https://docs.github.com/en/rest/reference/issues#events>`_
|
||||
:rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.IssueEvent.IssueEvent`
|
||||
"""
|
||||
return github.PaginatedList.PaginatedList(
|
||||
@@ -2598,7 +2598,7 @@ class Repository(github.GithubObject.CompletableGithubObject):
|
||||
|
||||
def get_key(self, id):
|
||||
"""
|
||||
:calls: `GET /repos/{owner}/{repo}/keys/{id} <http://docs.github.com/en/rest/reference/repos#deploy-keys>`_
|
||||
:calls: `GET /repos/{owner}/{repo}/keys/{id} <https://docs.github.com/en/rest/reference/repos#deploy-keys>`_
|
||||
:param id: integer
|
||||
:rtype: :class:`github.RepositoryKey.RepositoryKey`
|
||||
"""
|
||||
@@ -2612,7 +2612,7 @@ class Repository(github.GithubObject.CompletableGithubObject):
|
||||
|
||||
def get_keys(self):
|
||||
"""
|
||||
:calls: `GET /repos/{owner}/{repo}/keys <http://docs.github.com/en/rest/reference/repos#deploy-keys>`_
|
||||
:calls: `GET /repos/{owner}/{repo}/keys <https://docs.github.com/en/rest/reference/repos#deploy-keys>`_
|
||||
:rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.RepositoryKey.RepositoryKey`
|
||||
"""
|
||||
return github.PaginatedList.PaginatedList(
|
||||
@@ -2624,7 +2624,7 @@ class Repository(github.GithubObject.CompletableGithubObject):
|
||||
|
||||
def get_label(self, name):
|
||||
"""
|
||||
:calls: `GET /repos/{owner}/{repo}/labels/{name} <http://docs.github.com/en/rest/reference/issues#labels>`_
|
||||
:calls: `GET /repos/{owner}/{repo}/labels/{name} <https://docs.github.com/en/rest/reference/issues#labels>`_
|
||||
:param name: string
|
||||
:rtype: :class:`github.Label.Label`
|
||||
"""
|
||||
@@ -2636,7 +2636,7 @@ class Repository(github.GithubObject.CompletableGithubObject):
|
||||
|
||||
def get_labels(self):
|
||||
"""
|
||||
:calls: `GET /repos/{owner}/{repo}/labels <http://docs.github.com/en/rest/reference/issues#labels>`_
|
||||
:calls: `GET /repos/{owner}/{repo}/labels <https://docs.github.com/en/rest/reference/issues#labels>`_
|
||||
:rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.Label.Label`
|
||||
"""
|
||||
return github.PaginatedList.PaginatedList(
|
||||
@@ -2645,7 +2645,7 @@ class Repository(github.GithubObject.CompletableGithubObject):
|
||||
|
||||
def get_languages(self):
|
||||
"""
|
||||
:calls: `GET /repos/{owner}/{repo}/languages <http://docs.github.com/en/rest/reference/repos>`_
|
||||
:calls: `GET /repos/{owner}/{repo}/languages <https://docs.github.com/en/rest/reference/repos>`_
|
||||
:rtype: dict of string to integer
|
||||
"""
|
||||
headers, data = self._requester.requestJsonAndCheck(
|
||||
@@ -2668,7 +2668,7 @@ class Repository(github.GithubObject.CompletableGithubObject):
|
||||
|
||||
def get_milestone(self, number):
|
||||
"""
|
||||
:calls: `GET /repos/{owner}/{repo}/milestones/{number} <http://docs.github.com/en/rest/reference/issues#milestones>`_
|
||||
:calls: `GET /repos/{owner}/{repo}/milestones/{number} <https://docs.github.com/en/rest/reference/issues#milestones>`_
|
||||
:param number: integer
|
||||
:rtype: :class:`github.Milestone.Milestone`
|
||||
"""
|
||||
@@ -2687,7 +2687,7 @@ class Repository(github.GithubObject.CompletableGithubObject):
|
||||
direction=github.GithubObject.NotSet,
|
||||
):
|
||||
"""
|
||||
:calls: `GET /repos/{owner}/{repo}/milestones <http://docs.github.com/en/rest/reference/issues#milestones>`_
|
||||
:calls: `GET /repos/{owner}/{repo}/milestones <https://docs.github.com/en/rest/reference/issues#milestones>`_
|
||||
:param state: string
|
||||
:param sort: string
|
||||
:param direction: string
|
||||
@@ -2714,7 +2714,7 @@ class Repository(github.GithubObject.CompletableGithubObject):
|
||||
|
||||
def get_network_events(self):
|
||||
"""
|
||||
:calls: `GET /networks/{owner}/{repo}/events <http://docs.github.com/en/rest/reference/activity#events>`_
|
||||
:calls: `GET /networks/{owner}/{repo}/events <https://docs.github.com/en/rest/reference/activity#events>`_
|
||||
:rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.Event.Event`
|
||||
"""
|
||||
return github.PaginatedList.PaginatedList(
|
||||
@@ -2738,7 +2738,7 @@ class Repository(github.GithubObject.CompletableGithubObject):
|
||||
|
||||
def get_pull(self, number):
|
||||
"""
|
||||
:calls: `GET /repos/{owner}/{repo}/pulls/{number} <http://docs.github.com/en/rest/reference/pulls>`_
|
||||
:calls: `GET /repos/{owner}/{repo}/pulls/{number} <https://docs.github.com/en/rest/reference/pulls>`_
|
||||
:param number: integer
|
||||
:rtype: :class:`github.PullRequest.PullRequest`
|
||||
"""
|
||||
@@ -2759,7 +2759,7 @@ class Repository(github.GithubObject.CompletableGithubObject):
|
||||
head=github.GithubObject.NotSet,
|
||||
):
|
||||
"""
|
||||
:calls: `GET /repos/{owner}/{repo}/pulls <http://docs.github.com/en/rest/reference/pulls>`_
|
||||
:calls: `GET /repos/{owner}/{repo}/pulls <https://docs.github.com/en/rest/reference/pulls>`_
|
||||
:param state: string
|
||||
:param sort: string
|
||||
:param direction: string
|
||||
@@ -2799,7 +2799,7 @@ class Repository(github.GithubObject.CompletableGithubObject):
|
||||
since=github.GithubObject.NotSet,
|
||||
):
|
||||
"""
|
||||
:calls: `GET /repos/{owner}/{repo}/pulls/comments <http://docs.github.com/en/rest/reference/pulls#comments>`_
|
||||
:calls: `GET /repos/{owner}/{repo}/pulls/comments <https://docs.github.com/en/rest/reference/pulls#comments>`_
|
||||
:param sort: string
|
||||
:param direction: string
|
||||
:param since: datetime.datetime
|
||||
@@ -2814,7 +2814,7 @@ class Repository(github.GithubObject.CompletableGithubObject):
|
||||
since=github.GithubObject.NotSet,
|
||||
):
|
||||
"""
|
||||
:calls: `GET /repos/{owner}/{repo}/pulls/comments <http://docs.github.com/en/rest/reference/pulls#review-comments>`_
|
||||
:calls: `GET /repos/{owner}/{repo}/pulls/comments <https://docs.github.com/en/rest/reference/pulls#review-comments>`_
|
||||
:param sort: string
|
||||
:param direction: string
|
||||
:param since: datetime.datetime
|
||||
@@ -2843,7 +2843,7 @@ class Repository(github.GithubObject.CompletableGithubObject):
|
||||
|
||||
def get_readme(self, ref=github.GithubObject.NotSet):
|
||||
"""
|
||||
:calls: `GET /repos/{owner}/{repo}/readme <http://docs.github.com/en/rest/reference/repos#contents>`_
|
||||
:calls: `GET /repos/{owner}/{repo}/readme <https://docs.github.com/en/rest/reference/repos#contents>`_
|
||||
:param ref: string
|
||||
:rtype: :class:`github.ContentFile.ContentFile`
|
||||
"""
|
||||
@@ -2887,7 +2887,7 @@ class Repository(github.GithubObject.CompletableGithubObject):
|
||||
|
||||
def get_source_import(self):
|
||||
"""
|
||||
:calls: `GET /repos/{owner}/{repo}/import <https://docs.github.com/en/rest/reference/migration/source_imports#get-import-progress>`_
|
||||
:calls: `GET /repos/{owner}/{repo}/import <https://docs.github.com/en/rest/reference/migrations#source-imports>`_
|
||||
:rtype: :class:`github.SourceImport.SourceImport`
|
||||
"""
|
||||
import_header = {"Accept": Consts.mediaTypeImportPreview}
|
||||
@@ -2905,7 +2905,7 @@ class Repository(github.GithubObject.CompletableGithubObject):
|
||||
|
||||
def get_stargazers(self):
|
||||
"""
|
||||
:calls: `GET /repos/{owner}/{repo}/stargazers <http://docs.github.com/en/rest/reference/activity#starring>`_
|
||||
:calls: `GET /repos/{owner}/{repo}/stargazers <https://docs.github.com/en/rest/reference/activity#starring>`_
|
||||
:rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.NamedUser.NamedUser`
|
||||
"""
|
||||
return github.PaginatedList.PaginatedList(
|
||||
@@ -2914,7 +2914,7 @@ class Repository(github.GithubObject.CompletableGithubObject):
|
||||
|
||||
def get_stargazers_with_dates(self):
|
||||
"""
|
||||
:calls: `GET /repos/{owner}/{repo}/stargazers <http://docs.github.com/en/rest/reference/activity#starring>`_
|
||||
:calls: `GET /repos/{owner}/{repo}/stargazers <https://docs.github.com/en/rest/reference/activity#starring>`_
|
||||
:rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.Stargazer.Stargazer`
|
||||
"""
|
||||
return github.PaginatedList.PaginatedList(
|
||||
@@ -2927,7 +2927,7 @@ class Repository(github.GithubObject.CompletableGithubObject):
|
||||
|
||||
def get_stats_contributors(self):
|
||||
"""
|
||||
:calls: `GET /repos/{owner}/{repo}/stats/contributors <http://docs.github.com/en/rest/reference/repos/statistics#get-contributors-list-with-additions-deletions-and-commit-counts>`_
|
||||
:calls: `GET /repos/{owner}/{repo}/stats/contributors <https://docs.github.com/en/rest/reference/repos#get-all-contributor-commit-activity>`_
|
||||
:rtype: None or list of :class:`github.StatsContributor.StatsContributor`
|
||||
"""
|
||||
headers, data = self._requester.requestJsonAndCheck(
|
||||
@@ -2945,7 +2945,7 @@ class Repository(github.GithubObject.CompletableGithubObject):
|
||||
|
||||
def get_stats_commit_activity(self):
|
||||
"""
|
||||
:calls: `GET /repos/{owner}/{repo}/stats/commit_activity <docs.github.com/en/rest/reference/repos/statistics#get-the-number-of-commits-per-hour-in-each-day>`_
|
||||
:calls: `GET /repos/{owner}/{repo}/stats/commit_activity <https://docs.github.com/en/rest/reference/repos#get-the-last-year-of-commit-activity>`_
|
||||
:rtype: None or list of :class:`github.StatsCommitActivity.StatsCommitActivity`
|
||||
"""
|
||||
headers, data = self._requester.requestJsonAndCheck(
|
||||
@@ -2963,7 +2963,7 @@ class Repository(github.GithubObject.CompletableGithubObject):
|
||||
|
||||
def get_stats_code_frequency(self):
|
||||
"""
|
||||
:calls: `GET /repos/{owner}/{repo}/stats/code_frequency <http://docs.github.com/en/rest/reference/repos/statistics#get-the-number-of-additions-and-deletions-per-week>`_
|
||||
:calls: `GET /repos/{owner}/{repo}/stats/code_frequency <https://docs.github.com/en/rest/reference/repos#get-the-weekly-commit-activity>`_
|
||||
:rtype: None or list of :class:`github.StatsCodeFrequency.StatsCodeFrequency`
|
||||
"""
|
||||
headers, data = self._requester.requestJsonAndCheck(
|
||||
@@ -2981,7 +2981,7 @@ class Repository(github.GithubObject.CompletableGithubObject):
|
||||
|
||||
def get_stats_participation(self):
|
||||
"""
|
||||
:calls: `GET /repos/{owner}/{repo}/stats/participation <http://docs.github.com/en/rest/reference/repos/statistics#get-the-weekly-commit-count-for-the-repo-owner-and-everyone-else>`_
|
||||
:calls: `GET /repos/{owner}/{repo}/stats/participation <https://docs.github.com/en/rest/reference/repos#get-the-weekly-commit-count>`_
|
||||
:rtype: None or :class:`github.StatsParticipation.StatsParticipation`
|
||||
"""
|
||||
headers, data = self._requester.requestJsonAndCheck(
|
||||
@@ -2996,7 +2996,7 @@ class Repository(github.GithubObject.CompletableGithubObject):
|
||||
|
||||
def get_stats_punch_card(self):
|
||||
"""
|
||||
:calls: `GET /repos/{owner}/{repo}/stats/punch_card <http://docs.github.com/en/rest/reference/repos/statistics#get-the-number-of-commits-per-hour-in-each-day>`_
|
||||
:calls: `GET /repos/{owner}/{repo}/stats/punch_card <https://docs.github.com/en/rest/reference/repos#get-the-hourly-commit-count-for-each-day>`_
|
||||
:rtype: None or :class:`github.StatsPunchCard.StatsPunchCard`
|
||||
"""
|
||||
headers, data = self._requester.requestJsonAndCheck(
|
||||
@@ -3011,7 +3011,7 @@ class Repository(github.GithubObject.CompletableGithubObject):
|
||||
|
||||
def get_subscribers(self):
|
||||
"""
|
||||
:calls: `GET /repos/{owner}/{repo}/subscribers <http://docs.github.com/en/rest/reference/activity#watching>`_
|
||||
:calls: `GET /repos/{owner}/{repo}/subscribers <https://docs.github.com/en/rest/reference/activity#watching>`_
|
||||
:rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.NamedUser.NamedUser`
|
||||
"""
|
||||
return github.PaginatedList.PaginatedList(
|
||||
@@ -3020,7 +3020,7 @@ class Repository(github.GithubObject.CompletableGithubObject):
|
||||
|
||||
def get_tags(self):
|
||||
"""
|
||||
:calls: `GET /repos/{owner}/{repo}/tags <http://docs.github.com/en/rest/reference/repos>`_
|
||||
:calls: `GET /repos/{owner}/{repo}/tags <https://docs.github.com/en/rest/reference/repos>`_
|
||||
:rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.Tag.Tag`
|
||||
"""
|
||||
return github.PaginatedList.PaginatedList(
|
||||
@@ -3029,7 +3029,7 @@ class Repository(github.GithubObject.CompletableGithubObject):
|
||||
|
||||
def get_releases(self):
|
||||
"""
|
||||
:calls: `GET /repos/{owner}/{repo}/releases <https://docs.github.com/en/rest/reference/repos/releases#list-releases-for-a-repository>`_
|
||||
:calls: `GET /repos/{owner}/{repo}/releases <https://docs.github.com/en/rest/reference/repos#list-releases>`_
|
||||
:rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.GitRelease.GitRelease`
|
||||
"""
|
||||
return github.PaginatedList.PaginatedList(
|
||||
@@ -3038,7 +3038,7 @@ class Repository(github.GithubObject.CompletableGithubObject):
|
||||
|
||||
def get_release(self, id):
|
||||
"""
|
||||
:calls: `GET /repos/{owner}/{repo}/releases/{id} <https://docs.github.com/en/rest/reference/repos/releases#get-a-single-release>`_
|
||||
:calls: `GET /repos/{owner}/{repo}/releases/{id} <https://docs.github.com/en/rest/reference/repos#get-a-release>`_
|
||||
:param id: int (release id), str (tag name)
|
||||
:rtype: None or :class:`github.GitRelease.GitRelease`
|
||||
"""
|
||||
@@ -3059,7 +3059,7 @@ class Repository(github.GithubObject.CompletableGithubObject):
|
||||
|
||||
def get_latest_release(self):
|
||||
"""
|
||||
:calls: `GET /repos/{owner}/{repo}/releases/latest <https://docs.github.com/en/rest/reference/repos/releases#get-the-latest-release>`_
|
||||
:calls: `GET /repos/{owner}/{repo}/releases/latest <https://docs.github.com/en/rest/reference/repos#get-the-latest-release>`_
|
||||
:rtype: :class:`github.GitRelease.GitRelease`
|
||||
"""
|
||||
headers, data = self._requester.requestJsonAndCheck(
|
||||
@@ -3071,7 +3071,7 @@ class Repository(github.GithubObject.CompletableGithubObject):
|
||||
|
||||
def get_teams(self):
|
||||
"""
|
||||
:calls: `GET /repos/{owner}/{repo}/teams <http://docs.github.com/en/rest/reference/repos>`_
|
||||
:calls: `GET /repos/{owner}/{repo}/teams <https://docs.github.com/en/rest/reference/repos>`_
|
||||
:rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.Team.Team`
|
||||
"""
|
||||
return github.PaginatedList.PaginatedList(
|
||||
@@ -3080,7 +3080,7 @@ class Repository(github.GithubObject.CompletableGithubObject):
|
||||
|
||||
def get_topics(self):
|
||||
"""
|
||||
:calls: `GET /repos/{owner}/{repo}/topics <https://docs.github.com/en/rest/reference/repos#list-all-topics-for-a-repository>`_
|
||||
:calls: `GET /repos/{owner}/{repo}/topics <https://docs.github.com/en/rest/reference/repos#replace-all-repository-topics>`_
|
||||
:rtype: list of strings
|
||||
"""
|
||||
headers, data = self._requester.requestJsonAndCheck(
|
||||
@@ -3092,7 +3092,7 @@ class Repository(github.GithubObject.CompletableGithubObject):
|
||||
|
||||
def get_watchers(self):
|
||||
"""
|
||||
:calls: `GET /repos/{owner}/{repo}/watchers <http://docs.github.com/en/rest/reference/activity#starring>`_
|
||||
:calls: `GET /repos/{owner}/{repo}/watchers <https://docs.github.com/en/rest/reference/activity#starring>`_
|
||||
:rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.NamedUser.NamedUser`
|
||||
"""
|
||||
return github.PaginatedList.PaginatedList(
|
||||
@@ -3133,7 +3133,7 @@ class Repository(github.GithubObject.CompletableGithubObject):
|
||||
status=github.GithubObject.NotSet,
|
||||
):
|
||||
"""
|
||||
:calls: `GET /repos/{owner}/{repo}/actions/runs <https://docs.github.com/en/rest/reference/actions/workflow-runs#list-workflow-runs-for-a-repository>`_
|
||||
:calls: `GET /repos/{owner}/{repo}/actions/runs <https://docs.github.com/en/rest/reference/actions#list-workflow-runs-for-a-repository>`_
|
||||
:param actor: :class:`github.NamedUser.NamedUser` or string
|
||||
:param branch: :class:`github.Branch.Branch` or string
|
||||
:param event: string
|
||||
@@ -3195,7 +3195,7 @@ class Repository(github.GithubObject.CompletableGithubObject):
|
||||
|
||||
def has_in_assignees(self, assignee):
|
||||
"""
|
||||
:calls: `GET /repos/{owner}/{repo}/assignees/{assignee} <http://docs.github.com/en/rest/reference/issues#assignees>`_
|
||||
:calls: `GET /repos/{owner}/{repo}/assignees/{assignee} <https://docs.github.com/en/rest/reference/issues#assignees>`_
|
||||
:param assignee: string or :class:`github.NamedUser.NamedUser`
|
||||
:rtype: bool
|
||||
"""
|
||||
@@ -3213,7 +3213,7 @@ class Repository(github.GithubObject.CompletableGithubObject):
|
||||
|
||||
def has_in_collaborators(self, collaborator):
|
||||
"""
|
||||
:calls: `GET /repos/{owner}/{repo}/collaborators/{user} <http://docs.github.com/en/rest/reference/repos#collaborators>`_
|
||||
:calls: `GET /repos/{owner}/{repo}/collaborators/{user} <https://docs.github.com/en/rest/reference/repos#collaborators>`_
|
||||
:param collaborator: string or :class:`github.NamedUser.NamedUser`
|
||||
:rtype: bool
|
||||
"""
|
||||
@@ -3249,7 +3249,7 @@ class Repository(github.GithubObject.CompletableGithubObject):
|
||||
|
||||
def legacy_search_issues(self, state, keyword):
|
||||
"""
|
||||
:calls: `GET /legacy/issues/search/{owner}/{repository}/{state}/{keyword} <http://docs.github.com/en/rest/reference/search#legacy>`_
|
||||
:calls: `GET /legacy/issues/search/{owner}/{repository}/{state}/{keyword} <https://docs.github.com/en/rest/reference/search>`_
|
||||
:param state: "open" or "closed"
|
||||
:param keyword: string
|
||||
:rtype: List of :class:`github.Issue.Issue`
|
||||
@@ -3278,7 +3278,7 @@ class Repository(github.GithubObject.CompletableGithubObject):
|
||||
before=github.GithubObject.NotSet,
|
||||
):
|
||||
"""
|
||||
:calls: `GET /repos/{owner}/{repo}/notifications <http://docs.github.com/en/rest/reference/activity#notifications>`_
|
||||
:calls: `GET /repos/{owner}/{repo}/notifications <https://docs.github.com/en/rest/reference/activity#notifications>`_
|
||||
:param all: bool
|
||||
:param participating: bool
|
||||
:param since: datetime.datetime
|
||||
@@ -3328,7 +3328,7 @@ class Repository(github.GithubObject.CompletableGithubObject):
|
||||
|
||||
def merge(self, base, head, commit_message=github.GithubObject.NotSet):
|
||||
"""
|
||||
:calls: `POST /repos/{owner}/{repo}/merges <http://docs.github.com/en/rest/reference/repos#merging>`_
|
||||
:calls: `POST /repos/{owner}/{repo}/merges <https://docs.github.com/en/rest/reference/repos#merging>`_
|
||||
:param base: string
|
||||
:param head: string
|
||||
:param commit_message: string
|
||||
@@ -3355,7 +3355,7 @@ class Repository(github.GithubObject.CompletableGithubObject):
|
||||
|
||||
def replace_topics(self, topics):
|
||||
"""
|
||||
:calls: `PUT /repos/{owner}/{repo}/topics <http://docs.github.com/en/rest/reference/repos>`_
|
||||
:calls: `PUT /repos/{owner}/{repo}/topics <https://docs.github.com/en/rest/reference/repos>`_
|
||||
:param topics: list of strings
|
||||
:rtype: None
|
||||
"""
|
||||
@@ -3369,7 +3369,7 @@ class Repository(github.GithubObject.CompletableGithubObject):
|
||||
|
||||
def get_vulnerability_alert(self):
|
||||
"""
|
||||
:calls: `GET /repos/{owner}/{repo}/vulnerability-alerts <http://docs.github.com/en/rest/reference/repos>`_
|
||||
:calls: `GET /repos/{owner}/{repo}/vulnerability-alerts <https://docs.github.com/en/rest/reference/repos>`_
|
||||
:rtype: bool
|
||||
"""
|
||||
status, _, _ = self._requester.requestJson(
|
||||
@@ -3381,7 +3381,7 @@ class Repository(github.GithubObject.CompletableGithubObject):
|
||||
|
||||
def enable_vulnerability_alert(self):
|
||||
"""
|
||||
:calls: `PUT /repos/{owner}/{repo}/vulnerability-alerts <http://docs.github.com/en/rest/reference/repos>`_
|
||||
:calls: `PUT /repos/{owner}/{repo}/vulnerability-alerts <https://docs.github.com/en/rest/reference/repos>`_
|
||||
:rtype: bool
|
||||
"""
|
||||
status, _, _ = self._requester.requestJson(
|
||||
@@ -3393,7 +3393,7 @@ class Repository(github.GithubObject.CompletableGithubObject):
|
||||
|
||||
def disable_vulnerability_alert(self):
|
||||
"""
|
||||
:calls: `DELETE /repos/{owner}/{repo}/vulnerability-alerts <http://docs.github.com/en/rest/reference/repos>`_
|
||||
:calls: `DELETE /repos/{owner}/{repo}/vulnerability-alerts <https://docs.github.com/en/rest/reference/repos>`_
|
||||
:rtype: bool
|
||||
"""
|
||||
status, _, _ = self._requester.requestJson(
|
||||
@@ -3405,7 +3405,7 @@ class Repository(github.GithubObject.CompletableGithubObject):
|
||||
|
||||
def enable_automated_security_fixes(self):
|
||||
"""
|
||||
:calls: `PUT /repos/{owner}/{repo}/automated-security-fixes <http://docs.github.com/en/rest/reference/repos>`_
|
||||
:calls: `PUT /repos/{owner}/{repo}/automated-security-fixes <https://docs.github.com/en/rest/reference/repos>`_
|
||||
:rtype: bool
|
||||
"""
|
||||
status, _, _ = self._requester.requestJson(
|
||||
@@ -3417,7 +3417,7 @@ class Repository(github.GithubObject.CompletableGithubObject):
|
||||
|
||||
def disable_automated_security_fixes(self):
|
||||
"""
|
||||
:calls: `DELETE /repos/{owner}/{repo}/automated-security-fixes <http://docs.github.com/en/rest/reference/repos>`_
|
||||
:calls: `DELETE /repos/{owner}/{repo}/automated-security-fixes <https://docs.github.com/en/rest/reference/repos>`_
|
||||
:rtype: bool
|
||||
"""
|
||||
status, _, _ = self._requester.requestJson(
|
||||
@@ -3429,7 +3429,7 @@ class Repository(github.GithubObject.CompletableGithubObject):
|
||||
|
||||
def remove_from_collaborators(self, collaborator):
|
||||
"""
|
||||
:calls: `DELETE /repos/{owner}/{repo}/collaborators/{user} <http://docs.github.com/en/rest/reference/repos#collaborators>`_
|
||||
:calls: `DELETE /repos/{owner}/{repo}/collaborators/{user} <https://docs.github.com/en/rest/reference/repos#collaborators>`_
|
||||
:param collaborator: string or :class:`github.NamedUser.NamedUser`
|
||||
:rtype: None
|
||||
"""
|
||||
|
||||
@@ -38,7 +38,7 @@ import github.GithubObject
|
||||
|
||||
class RepositoryKey(github.GithubObject.CompletableGithubObject):
|
||||
"""
|
||||
This class represents RepositoryKeys. The reference can be found here http://docs.github.com/en/rest/reference/repos#deploy-keys
|
||||
This class represents RepositoryKeys. The reference can be found here https://docs.github.com/en/rest/reference/repos#deploy-keys
|
||||
"""
|
||||
|
||||
def __repr__(self):
|
||||
@@ -102,7 +102,7 @@ class RepositoryKey(github.GithubObject.CompletableGithubObject):
|
||||
|
||||
def delete(self):
|
||||
"""
|
||||
:calls: `DELETE /repos/{owner}/{repo}/keys/{id} <http://docs.github.com/en/rest/reference/repos#deploy-keys>`_
|
||||
:calls: `DELETE /repos/{owner}/{repo}/keys/{id} <https://docs.github.com/en/rest/reference/repos#deploy-keys>`_
|
||||
:rtype: None
|
||||
"""
|
||||
headers, data = self._requester.requestJsonAndCheck("DELETE", self.url)
|
||||
|
||||
+1
-1
@@ -344,7 +344,7 @@ class Requester:
|
||||
|
||||
assert user_agent is not None, (
|
||||
"github now requires a user-agent. "
|
||||
"See http://docs.github.com/en/rest/reference/#user-agent-required"
|
||||
"See https://docs.github.com/en/rest/overview/resources-in-the-rest-api#user-agent-required"
|
||||
)
|
||||
self.__userAgent = user_agent
|
||||
self.__verify = verify
|
||||
|
||||
@@ -27,7 +27,7 @@ import github.Team
|
||||
|
||||
class RequiredPullRequestReviews(github.GithubObject.CompletableGithubObject):
|
||||
"""
|
||||
This class represents Required Pull Request Reviews. The reference can be found here https://docs.github.com/en/rest/reference/repos/branches#get-pull-request-review-enforcement-of-protected-branch
|
||||
This class represents Required Pull Request Reviews. The reference can be found here https://docs.github.com/en/rest/reference/repos#get-pull-request-review-protection
|
||||
"""
|
||||
|
||||
def __repr__(self):
|
||||
|
||||
@@ -25,7 +25,7 @@ import github.GithubObject
|
||||
|
||||
class RequiredStatusChecks(github.GithubObject.CompletableGithubObject):
|
||||
"""
|
||||
This class represents Required Status Checks. The reference can be found here https://docs.github.com/en/rest/reference/repos/branches#get-required-status-checks-of-protected-branch
|
||||
This class represents Required Status Checks. The reference can be found here https://docs.github.com/en/rest/reference/repos#get-status-checks-protection
|
||||
"""
|
||||
|
||||
def __repr__(self):
|
||||
|
||||
@@ -26,7 +26,7 @@ from github import Consts
|
||||
|
||||
class SourceImport(github.GithubObject.CompletableGithubObject):
|
||||
"""
|
||||
This class represents SourceImports. The reference can be found here https://docs.github.com/en/rest/reference/migration#source_imports
|
||||
This class represents SourceImports. The reference can be found here https://docs.github.com/en/rest/reference/migrations#source-imports
|
||||
"""
|
||||
|
||||
def __repr__(self):
|
||||
|
||||
+1
-1
@@ -29,7 +29,7 @@ import github
|
||||
|
||||
class Stargazer(github.GithubObject.NonCompletableGithubObject):
|
||||
"""
|
||||
This class represents Stargazers. The reference can be found here https://docs.github.com/en/rest/reference/activity/starring#alternative-response-with-star-creation-timestamps
|
||||
This class represents Stargazers. The reference can be found here https://docs.github.com/en/rest/reference/activity#starring
|
||||
"""
|
||||
|
||||
def __repr__(self):
|
||||
|
||||
@@ -29,7 +29,7 @@ import github.GithubObject
|
||||
|
||||
class StatsCodeFrequency(github.GithubObject.NonCompletableGithubObject):
|
||||
"""
|
||||
This class represents statistics of StatsCodeFrequencies. The reference can be found here http://docs.github.com/en/rest/reference/repos/statistics#get-the-number-of-additions-and-deletions-per-week
|
||||
This class represents statistics of StatsCodeFrequencies. The reference can be found here https://docs.github.com/en/rest/reference/repos#get-the-weekly-commit-activity
|
||||
"""
|
||||
|
||||
@property
|
||||
|
||||
@@ -29,7 +29,7 @@ import github.GithubObject
|
||||
|
||||
class StatsCommitActivity(github.GithubObject.NonCompletableGithubObject):
|
||||
"""
|
||||
This class represents StatsCommitActivities. The reference can be found here http://docs.github.com/en/rest/reference/repos/statistics#get-the-last-year-of-commit-activity-data
|
||||
This class represents StatsCommitActivities. The reference can be found here https://docs.github.com/en/rest/reference/repos#get-the-last-year-of-commit-activity
|
||||
"""
|
||||
|
||||
@property
|
||||
|
||||
@@ -30,7 +30,7 @@ import github.NamedUser
|
||||
|
||||
class StatsContributor(github.GithubObject.NonCompletableGithubObject):
|
||||
"""
|
||||
This class represents StatsContributors. The reference can be found here http://docs.github.com/en/rest/reference/repos/statistics#get-contributors-list-with-additions-deletions-and-commit-counts
|
||||
This class represents StatsContributors. The reference can be found here https://docs.github.com/en/rest/reference/repos#get-all-contributor-commit-activity
|
||||
"""
|
||||
|
||||
class Week(github.GithubObject.NonCompletableGithubObject):
|
||||
|
||||
@@ -29,7 +29,7 @@ import github.GithubObject
|
||||
|
||||
class StatsParticipation(github.GithubObject.NonCompletableGithubObject):
|
||||
"""
|
||||
This class represents StatsParticipations. The reference can be found here http://docs.github.com/en/rest/reference/repos/statistics#get-the-weekly-commit-count-for-the-repo-owner-and-everyone-else
|
||||
This class represents StatsParticipations. The reference can be found here https://docs.github.com/en/rest/reference/repos#get-the-weekly-commit-count
|
||||
"""
|
||||
|
||||
@property
|
||||
|
||||
@@ -30,7 +30,7 @@ import github.NamedUser # TODO remove unused
|
||||
|
||||
class StatsPunchCard(github.GithubObject.NonCompletableGithubObject):
|
||||
"""
|
||||
This class represents StatsPunchCards. The reference can be found here http://docs.github.com/en/rest/reference/repos/statistics#get-the-number-of-commits-per-hour-in-each-day
|
||||
This class represents StatsPunchCards. The reference can be found here https://docs.github.com/en/rest/reference/repos#get-the-hourly-commit-count-for-each-day
|
||||
"""
|
||||
|
||||
def get(self, day, hour):
|
||||
|
||||
+1
-1
@@ -35,7 +35,7 @@ import github.GithubObject
|
||||
|
||||
class Tag(github.GithubObject.NonCompletableGithubObject):
|
||||
"""
|
||||
This class represents Tags. The reference can be found here https://docs.github.com/en/rest/reference/repos#list-tags
|
||||
This class represents Tags. The reference can be found here https://docs.github.com/en/rest/reference/repos#list-repository-tags
|
||||
"""
|
||||
|
||||
def __repr__(self):
|
||||
|
||||
+18
-18
@@ -54,7 +54,7 @@ from . import Consts
|
||||
|
||||
class Team(github.GithubObject.CompletableGithubObject):
|
||||
"""
|
||||
This class represents Teams. The reference can be found here http://docs.github.com/en/rest/reference/teams
|
||||
This class represents Teams. The reference can be found here https://docs.github.com/en/rest/reference/teams
|
||||
"""
|
||||
|
||||
def __repr__(self):
|
||||
@@ -169,7 +169,7 @@ class Team(github.GithubObject.CompletableGithubObject):
|
||||
This API call is deprecated. Use `add_membership` instead.
|
||||
https://docs.github.com/en/rest/reference/teams#add-or-update-team-membership-for-a-user-legacy
|
||||
|
||||
:calls: `PUT /teams/{id}/members/{user} <http://docs.github.com/en/rest/reference/teams>`_
|
||||
:calls: `PUT /teams/{id}/members/{user} <https://docs.github.com/en/rest/reference/teams>`_
|
||||
:param member: :class:`github.NamedUser.NamedUser`
|
||||
:rtype: None
|
||||
"""
|
||||
@@ -180,7 +180,7 @@ class Team(github.GithubObject.CompletableGithubObject):
|
||||
|
||||
def add_membership(self, member, role=github.GithubObject.NotSet):
|
||||
"""
|
||||
:calls: `PUT /teams/{id}/memberships/{user} <http://docs.github.com/en/rest/reference/teams>`_
|
||||
:calls: `PUT /teams/{id}/memberships/{user} <https://docs.github.com/en/rest/reference/teams>`_
|
||||
:param member: :class:`github.Nameduser.NamedUser`
|
||||
:param role: string
|
||||
:rtype: None
|
||||
@@ -220,7 +220,7 @@ class Team(github.GithubObject.CompletableGithubObject):
|
||||
|
||||
def add_to_repos(self, repo):
|
||||
"""
|
||||
:calls: `PUT /teams/{id}/repos/{org}/{repo} <http://docs.github.com/en/rest/reference/teams>`_
|
||||
:calls: `PUT /teams/{id}/repos/{org}/{repo} <https://docs.github.com/en/rest/reference/teams>`_
|
||||
:param repo: :class:`github.Repository.Repository`
|
||||
:rtype: None
|
||||
"""
|
||||
@@ -231,7 +231,7 @@ class Team(github.GithubObject.CompletableGithubObject):
|
||||
|
||||
def get_repo_permission(self, repo):
|
||||
"""
|
||||
:calls: `GET /teams/{id}/repos/{org}/{repo} <http://docs.github.com/en/rest/reference/teams>`_
|
||||
:calls: `GET /teams/{id}/repos/{org}/{repo} <https://docs.github.com/en/rest/reference/teams>`_
|
||||
:param repo: string or :class:`github.Repository.Repository`
|
||||
:rtype: None or :class:`github.Permissions.Permissions`
|
||||
"""
|
||||
@@ -259,7 +259,7 @@ class Team(github.GithubObject.CompletableGithubObject):
|
||||
)
|
||||
def set_repo_permission(self, repo, permission):
|
||||
"""
|
||||
:calls: `PUT /teams/{id}/repos/{org}/{repo} <http://docs.github.com/en/rest/reference/teams>`_
|
||||
:calls: `PUT /teams/{id}/repos/{org}/{repo} <https://docs.github.com/en/rest/reference/teams>`_
|
||||
:param repo: :class:`github.Repository.Repository`
|
||||
:param permission: string
|
||||
:rtype: None
|
||||
@@ -275,7 +275,7 @@ class Team(github.GithubObject.CompletableGithubObject):
|
||||
|
||||
def update_team_repository(self, repo, permission):
|
||||
"""
|
||||
:calls: `PUT /orgs/{org}/teams/{team_slug}/repos/{owner}/{repo} <https://docs.github.com/en/rest/reference/teams#add-or-update-team-repository-permissions>`_
|
||||
:calls: `PUT /orgs/{org}/teams/{team_slug}/repos/{owner}/{repo} <https://docs.github.com/en/rest/reference/teams#check-team-permissions-for-a-repository>`_
|
||||
:param repo: string or :class:`github.Repository.Repository`
|
||||
:param permission: string
|
||||
:rtype: bool
|
||||
@@ -299,7 +299,7 @@ class Team(github.GithubObject.CompletableGithubObject):
|
||||
|
||||
def delete(self):
|
||||
"""
|
||||
:calls: `DELETE /teams/{id} <http://docs.github.com/en/rest/reference/teams>`_
|
||||
:calls: `DELETE /teams/{id} <https://docs.github.com/en/rest/reference/teams#delete-a-team>`_
|
||||
:rtype: None
|
||||
"""
|
||||
headers, data = self._requester.requestJsonAndCheck("DELETE", self.url)
|
||||
@@ -312,7 +312,7 @@ class Team(github.GithubObject.CompletableGithubObject):
|
||||
privacy=github.GithubObject.NotSet,
|
||||
):
|
||||
"""
|
||||
:calls: `PATCH /teams/{id} <http://docs.github.com/en/rest/reference/teams>`_
|
||||
:calls: `PATCH /teams/{id} <https://docs.github.com/en/rest/reference/teams#update-a-team>`_
|
||||
:param name: string
|
||||
:param description: string
|
||||
:param permission: string
|
||||
@@ -345,7 +345,7 @@ class Team(github.GithubObject.CompletableGithubObject):
|
||||
|
||||
def get_teams(self):
|
||||
"""
|
||||
:calls: `GET /teams/{id}/teams <https://docs.github.com/en/rest/reference/teams#list-child-teams>`_
|
||||
:calls: `GET /teams/{id}/teams <https://docs.github.com/en/rest/reference/teams#list-teams>`_
|
||||
:rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.Team.Team`
|
||||
"""
|
||||
return github.PaginatedList.PaginatedList(
|
||||
@@ -357,7 +357,7 @@ class Team(github.GithubObject.CompletableGithubObject):
|
||||
|
||||
def get_discussions(self):
|
||||
"""
|
||||
:calls: `GET /teams/{id}/discussions <https://docs.github.com/en/rest/reference/teams/discussions#list-discussions>`_
|
||||
:calls: `GET /teams/{id}/discussions <https://docs.github.com/en/rest/reference/teams#list-discussions>`_
|
||||
:rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.TeamDiscussion.TeamDiscussion`
|
||||
"""
|
||||
return github.PaginatedList.PaginatedList(
|
||||
@@ -370,7 +370,7 @@ class Team(github.GithubObject.CompletableGithubObject):
|
||||
|
||||
def get_members(self, role=github.GithubObject.NotSet):
|
||||
"""
|
||||
:calls: `GET /teams/{id}/members <https://docs.github.com/en/rest/reference/teams/members#list-team-members>`_
|
||||
:calls: `GET /teams/{id}/members <https://docs.github.com/en/rest/reference/teams#list-team-members>`_
|
||||
:param role: string
|
||||
:rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.NamedUser.NamedUser`
|
||||
"""
|
||||
@@ -388,7 +388,7 @@ class Team(github.GithubObject.CompletableGithubObject):
|
||||
|
||||
def get_repos(self):
|
||||
"""
|
||||
:calls: `GET /teams/{id}/repos <http://docs.github.com/en/rest/reference/teams>`_
|
||||
:calls: `GET /teams/{id}/repos <https://docs.github.com/en/rest/reference/teams>`_
|
||||
:rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.Repository.Repository`
|
||||
"""
|
||||
return github.PaginatedList.PaginatedList(
|
||||
@@ -410,7 +410,7 @@ class Team(github.GithubObject.CompletableGithubObject):
|
||||
|
||||
def has_in_members(self, member):
|
||||
"""
|
||||
:calls: `GET /teams/{id}/members/{user} <http://docs.github.com/en/rest/reference/teams>`_
|
||||
:calls: `GET /teams/{id}/members/{user} <https://docs.github.com/en/rest/reference/teams>`_
|
||||
:param member: :class:`github.NamedUser.NamedUser`
|
||||
:rtype: bool
|
||||
"""
|
||||
@@ -422,7 +422,7 @@ class Team(github.GithubObject.CompletableGithubObject):
|
||||
|
||||
def has_in_repos(self, repo):
|
||||
"""
|
||||
:calls: `GET /teams/{id}/repos/{owner}/{repo} <http://docs.github.com/en/rest/reference/teams>`_
|
||||
:calls: `GET /teams/{id}/repos/{owner}/{repo} <https://docs.github.com/en/rest/reference/teams>`_
|
||||
:param repo: :class:`github.Repository.Repository`
|
||||
:rtype: bool
|
||||
"""
|
||||
@@ -434,7 +434,7 @@ class Team(github.GithubObject.CompletableGithubObject):
|
||||
|
||||
def remove_membership(self, member):
|
||||
"""
|
||||
:calls: `DELETE /teams/{team_id}/memberships/{username} <https://docs.github.com/en/rest/reference/teams/members#remove-team-membership>`
|
||||
:calls: `DELETE /teams/{team_id}/memberships/{username} <https://docs.github.com/en/rest/reference/teams#remove-team-membership-for-a-user>`
|
||||
:param member:
|
||||
:return:
|
||||
"""
|
||||
@@ -448,7 +448,7 @@ class Team(github.GithubObject.CompletableGithubObject):
|
||||
This API call is deprecated. Use `remove_membership` instead:
|
||||
https://docs.github.com/en/rest/reference/teams#add-or-update-team-membership-for-a-user-legacy
|
||||
|
||||
:calls: `DELETE /teams/{id}/members/{user} <http://docs.github.com/en/rest/reference/teams>`_
|
||||
:calls: `DELETE /teams/{id}/members/{user} <https://docs.github.com/en/rest/reference/teams>`_
|
||||
:param member: :class:`github.NamedUser.NamedUser`
|
||||
:rtype: None
|
||||
"""
|
||||
@@ -459,7 +459,7 @@ class Team(github.GithubObject.CompletableGithubObject):
|
||||
|
||||
def remove_from_repos(self, repo):
|
||||
"""
|
||||
:calls: `DELETE /teams/{id}/repos/{owner}/{repo} <http://docs.github.com/en/rest/reference/teams>`_
|
||||
:calls: `DELETE /teams/{id}/repos/{owner}/{repo} <https://docs.github.com/en/rest/reference/teams>`_
|
||||
:param repo: :class:`github.Repository.Repository`
|
||||
:rtype: None
|
||||
"""
|
||||
|
||||
+2
-2
@@ -34,7 +34,7 @@ import github.GithubObject
|
||||
|
||||
class UserKey(github.GithubObject.CompletableGithubObject):
|
||||
"""
|
||||
This class represents UserKeys. The reference can be found here http://docs.github.com/en/rest/reference/users#keys
|
||||
This class represents UserKeys. The reference can be found here https://docs.github.com/en/rest/reference/users#keys
|
||||
"""
|
||||
|
||||
def __repr__(self):
|
||||
@@ -82,7 +82,7 @@ class UserKey(github.GithubObject.CompletableGithubObject):
|
||||
|
||||
def delete(self):
|
||||
"""
|
||||
:calls: `DELETE /user/keys/{id} <http://docs.github.com/en/rest/reference/users#keys>`_
|
||||
:calls: `DELETE /user/keys/{id} <https://docs.github.com/en/rest/reference/users#get-a-public-ssh-key-for-the-authenticated-user>`_
|
||||
:rtype: None
|
||||
"""
|
||||
headers, data = self._requester.requestJsonAndCheck("DELETE", self.url)
|
||||
|
||||
Reference in New Issue
Block a user