mirror of
https://github.com/status-im/PyGithub.git
synced 2026-09-02 11:51:10 +00:00
Update most URLs to docs.github.com (#1896)
Now that GitHub have moved their documentation from developer.github.com, we should update our links. I have also tried to update the call strings to their new format, but since it was done via regex, some of them may not match exactly.
This commit is contained in:
+33
-33
@@ -59,7 +59,7 @@ from . import Consts
|
||||
|
||||
class PullRequest(github.GithubObject.CompletableGithubObject):
|
||||
"""
|
||||
This class represents PullRequests. The reference can be found here http://developer.github.com/v3/pulls/
|
||||
This class represents PullRequests. The reference can be found here http://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://developer.github.com/v3/issues>`_
|
||||
:calls: `GET /repos/{owner}/{repo}/issues/{number} <http://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://developer.github.com/v3/pulls/comments>`_
|
||||
:calls: `POST /repos/{owner}/{repo}/pulls/{number}/comments <http://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://developer.github.com/v3/pulls/comments>`_
|
||||
:calls: `POST /repos/{owner}/{repo}/pulls/{number}/comments <http://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://developer.github.com/v3/pulls/comments>`_
|
||||
:calls: `POST /repos/{owner}/{repo}/pulls/{pull_number}/comments/{comment_id}/replies <http://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://developer.github.com/v3/issues/comments>`_
|
||||
:calls: `POST /repos/{owner}/{repo}/issues/{number}/comments <http://docs.github.com/en/rest/reference/issues#comments>`_
|
||||
:param body: string
|
||||
:rtype: :class:`github.IssueComment.IssueComment`
|
||||
"""
|
||||
@@ -468,7 +468,7 @@ class PullRequest(github.GithubObject.CompletableGithubObject):
|
||||
comments=github.GithubObject.NotSet,
|
||||
):
|
||||
"""
|
||||
:calls: `POST /repos/:owner/:repo/pulls/:number/reviews <https://developer.github.com/v3/pulls/reviews/>`_
|
||||
:calls: `POST /repos/{owner}/{repo}/pulls/{number}/reviews <https://docs.github.com/en/rest/reference/pulls#reviews>`_
|
||||
:param commit: github.Commit.Commit
|
||||
:param body: string
|
||||
:param event: string
|
||||
@@ -508,7 +508,7 @@ class PullRequest(github.GithubObject.CompletableGithubObject):
|
||||
team_reviewers=github.GithubObject.NotSet,
|
||||
):
|
||||
"""
|
||||
:calls: `POST /repos/:owner/:repo/pulls/:number/requested_reviewers <https://developer.github.com/v3/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://developer.github.com/v3/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://developer.github.com/v3/pulls>`_
|
||||
:calls: `PATCH /repos/{owner}/{repo}/pulls/{number} <http://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://developer.github.com/v3/pulls/comments>`_
|
||||
:calls: `GET /repos/{owner}/{repo}/pulls/comments/{number} <http://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://developer.github.com/v3/pulls/comments>`_
|
||||
:calls: `GET /repos/{owner}/{repo}/pulls/comments/{number} <http://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://developer.github.com/v3/pulls/comments>`_
|
||||
:calls: `GET /repos/{owner}/{repo}/pulls/{number}/comments <http://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://developer.github.com/v3/pulls/comments>`_
|
||||
:calls: `GET /repos/{owner}/{repo}/pulls/{number}/comments <http://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`
|
||||
"""
|
||||
@@ -642,7 +642,7 @@ class PullRequest(github.GithubObject.CompletableGithubObject):
|
||||
|
||||
def get_single_review_comments(self, id):
|
||||
"""
|
||||
:calls: `GET /repos/:owner/:repo/pulls/:number/review/:id/comments <https://developer.github.com/v3/pulls/reviews/>`_
|
||||
:calls: `GET /repos/{owner}/{repo}/pulls/{number}/review/{id}/comments <https://docs.github.com/en/rest/reference/pulls#reviews>`_
|
||||
:param id: integer
|
||||
: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://developer.github.com/v3/pulls>`_
|
||||
:calls: `GET /repos/{owner}/{repo}/pulls/{number}/commits <http://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://developer.github.com/v3/pulls>`_
|
||||
:calls: `GET /repos/{owner}/{repo}/pulls/{number}/files <http://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://developer.github.com/v3/issues/comments>`_
|
||||
:calls: `GET /repos/{owner}/{repo}/issues/comments/{id} <http://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://developer.github.com/v3/issues/comments>`_
|
||||
:calls: `GET /repos/{owner}/{repo}/issues/{number}/comments <http://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://developer.github.com/v3/issues/events>`_
|
||||
:calls: `GET /repos/{owner}/{repo}/issues/{issue_number}/events <http://docs.github.com/en/rest/reference/issues#events>`_
|
||||
:rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.IssueEvent.IssueEvent`
|
||||
"""
|
||||
return github.PaginatedList.PaginatedList(
|
||||
@@ -713,7 +713,7 @@ class PullRequest(github.GithubObject.CompletableGithubObject):
|
||||
|
||||
def get_review(self, id):
|
||||
"""
|
||||
:calls: `GET /repos/:owner/:repo/pulls/:number/reviews/:id <https://developer.github.com/v3/pulls/reviews>`_
|
||||
:calls: `GET /repos/{owner}/{repo}/pulls/{number}/reviews/{id} <https://docs.github.com/en/rest/reference/pulls#reviews>`_
|
||||
:param id: integer
|
||||
:rtype: :class:`github.PullRequestReview.PullRequestReview`
|
||||
"""
|
||||
@@ -728,7 +728,7 @@ class PullRequest(github.GithubObject.CompletableGithubObject):
|
||||
|
||||
def get_reviews(self):
|
||||
"""
|
||||
:calls: `GET /repos/:owner/:repo/pulls/:number/reviews <https://developer.github.com/v3/pulls/reviews/>`_
|
||||
:calls: `GET /repos/{owner}/{repo}/pulls/{number}/reviews <https://docs.github.com/en/rest/reference/pulls#reviews>`_
|
||||
:rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.PullRequestReview.PullRequestReview`
|
||||
"""
|
||||
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://developer.github.com/v3/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://developer.github.com/v3/issues/labels>`_
|
||||
:calls: `GET /repos/{owner}/{repo}/issues/{number}/labels <http://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://developer.github.com/v3/issues/labels>`_
|
||||
:calls: `POST /repos/{owner}/{repo}/issues/{number}/labels <http://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://developer.github.com/v3/issues/labels>`_
|
||||
:calls: `DELETE /repos/{owner}/{repo}/issues/{number}/labels <http://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://developer.github.com/v3/issues/labels>`_
|
||||
:calls: `DELETE /repos/{owner}/{repo}/issues/{number}/labels/{name} <http://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://developer.github.com/v3/issues/labels>`_
|
||||
:calls: `PUT /repos/{owner}/{repo}/issues/{number}/labels <http://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://developer.github.com/v3/pulls>`_
|
||||
:calls: `GET /repos/{owner}/{repo}/pulls/{number}/merge <http://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://developer.github.com/v3/pulls>`_
|
||||
:calls: `PUT /repos/{owner}/{repo}/pulls/{number}/merge <http://docs.github.com/en/rest/reference/pulls>`_
|
||||
:param commit_message: string
|
||||
:param commit_title: string
|
||||
:param merge_method: string
|
||||
@@ -878,7 +878,7 @@ class PullRequest(github.GithubObject.CompletableGithubObject):
|
||||
|
||||
def add_to_assignees(self, *assignees):
|
||||
"""
|
||||
:calls: `POST /repos/:owner/:repo/issues/:number/assignees <https://developer.github.com/v3/issues/assignees>`_
|
||||
:calls: `POST /repos/{owner}/{repo}/issues/{number}/assignees <https://docs.github.com/en/rest/reference/issues#assignees>`_
|
||||
:param assignees: list of :class:`github.NamedUser.NamedUser` or string
|
||||
:rtype: None
|
||||
"""
|
||||
@@ -902,7 +902,7 @@ class PullRequest(github.GithubObject.CompletableGithubObject):
|
||||
|
||||
def remove_from_assignees(self, *assignees):
|
||||
"""
|
||||
:calls: `DELETE /repos/:owner/:repo/issues/:number/assignees <https://developer.github.com/v3/issues/assignees>`_
|
||||
:calls: `DELETE /repos/{owner}/{repo}/issues/{number}/assignees <https://docs.github.com/en/rest/reference/issues#assignees>`_
|
||||
:param assignees: list of :class:`github.NamedUser.NamedUser` or string
|
||||
:rtype: None
|
||||
"""
|
||||
@@ -926,7 +926,7 @@ class PullRequest(github.GithubObject.CompletableGithubObject):
|
||||
|
||||
def update_branch(self, expected_head_sha=github.GithubObject.NotSet):
|
||||
"""
|
||||
:calls `PUT /repos/:owner/:repo/pulls/:pull_number/update-branch <https://developer.github.com/v3/pulls>`_
|
||||
:calls `PUT /repos/{owner}/{repo}/pulls/{pull_number}/update-branch <https://docs.github.com/en/rest/reference/pulls>`_
|
||||
:param expected_head_sha: string
|
||||
:rtype: bool
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user