diff --git a/README.md b/README.md
index 8cc74483..9e749abe 100644
--- a/README.md
+++ b/README.md
@@ -9,11 +9,10 @@
[](https://codecov.io/gh/PyGithub/PyGithub)
[](https://github.com/psf/black)
-PyGitHub is a Python library to access the [GitHub API v3] and [Github Enterprise API v3].
+PyGitHub is a Python library to access the [GitHub REST API].
This library enables you to manage [GitHub] resources such as repositories, user profiles, and organizations in your Python applications.
-[GitHub API v3]: https://developer.github.com/v3
-[Github Enterprise API v3]: https://developer.github.com/enterprise/v3/
+[GitHub REST API]: https://docs.github.com/en/rest
[GitHub]: https://github.com
## Install
diff --git a/github/ApplicationOAuth.py b/github/ApplicationOAuth.py
index 2d1f81d9..e8aea899 100644
--- a/github/ApplicationOAuth.py
+++ b/github/ApplicationOAuth.py
@@ -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.
- https://developer.github.com/apps/building-github-apps/identifying-and-authorizing-users-for-github-apps/#1-users-are-redirected-to-request-their-github-identity
+ The reference can be found at https://docs.github.com/en/developers/apps/identifying-and-authorizing-users-for-github-apps
"""
def __repr__(self):
@@ -77,7 +77,7 @@ class ApplicationOAuth(github.GithubObject.NonCompletableGithubObject):
def get_access_token(self, code, state=None):
"""
- :calls: `POST /login/oauth/access_token `_
+ :calls: `POST /login/oauth/access_token `_
:param code: string
:param state: string
"""
diff --git a/github/AuthenticatedUser.py b/github/AuthenticatedUser.py
index 5f645ac2..9f9993d5 100644
--- a/github/AuthenticatedUser.py
+++ b/github/AuthenticatedUser.py
@@ -63,7 +63,7 @@ from . import Consts
class AuthenticatedUser(github.GithubObject.CompletableGithubObject):
"""
- This class represents AuthenticatedUsers as returned by https://developer.github.com/v3/users/#get-the-authenticated-user
+ This class represents AuthenticatedUsers as returned by https://docs.github.com/en/rest/reference/users#get-the-authenticated-user
An AuthenticatedUser object can be created by calling ``get_user()`` on a Github object.
"""
@@ -369,7 +369,7 @@ class AuthenticatedUser(github.GithubObject.CompletableGithubObject):
def add_to_emails(self, *emails):
"""
- :calls: `POST /user/emails `_
+ :calls: `POST /user/emails `_
:param email: string
:rtype: None
"""
@@ -381,7 +381,7 @@ class AuthenticatedUser(github.GithubObject.CompletableGithubObject):
def add_to_following(self, following):
"""
- :calls: `PUT /user/following/:user `_
+ :calls: `PUT /user/following/{user} `_
:param following: :class:`github.NamedUser.NamedUser`
:rtype: None
"""
@@ -392,7 +392,7 @@ class AuthenticatedUser(github.GithubObject.CompletableGithubObject):
def add_to_starred(self, starred):
"""
- :calls: `PUT /user/starred/:owner/:repo `_
+ :calls: `PUT /user/starred/{owner}/{repo} `_
:param starred: :class:`github.Repository.Repository`
:rtype: None
"""
@@ -403,7 +403,7 @@ class AuthenticatedUser(github.GithubObject.CompletableGithubObject):
def add_to_subscriptions(self, subscription):
"""
- :calls: `PUT /user/subscriptions/:owner/:repo `_
+ :calls: `PUT /user/subscriptions/{owner}/{repo} `_
:param subscription: :class:`github.Repository.Repository`
:rtype: None
"""
@@ -414,7 +414,7 @@ class AuthenticatedUser(github.GithubObject.CompletableGithubObject):
def add_to_watched(self, watched):
"""
- :calls: `PUT /repos/:owner/:repo/subscription `_
+ :calls: `PUT /repos/{owner}/{repo}/subscription `_
:param watched: :class:`github.Repository.Repository`
:rtype: None
"""
@@ -435,7 +435,7 @@ class AuthenticatedUser(github.GithubObject.CompletableGithubObject):
onetime_password=None,
):
"""
- :calls: `POST /authorizations `_
+ :calls: `POST /authorizations `_
:param scopes: list of string
:param note: string
:param note_url: string
@@ -489,7 +489,7 @@ class AuthenticatedUser(github.GithubObject.CompletableGithubObject):
def create_fork(self, repo):
"""
- :calls: `POST /repos/:owner/:repo/forks `_
+ :calls: `POST /repos/{owner}/{repo}/forks `_
:param repo: :class:`github.Repository.Repository`
:rtype: :class:`github.Repository.Repository`
"""
@@ -503,7 +503,7 @@ class AuthenticatedUser(github.GithubObject.CompletableGithubObject):
def create_gist(self, public, files, description=github.GithubObject.NotSet):
"""
- :calls: `POST /gists `_
+ :calls: `POST /gists `_
:param public: bool
:param files: dict of string to :class:`github.InputFileContent.InputFileContent`
:param description: string
@@ -529,7 +529,7 @@ class AuthenticatedUser(github.GithubObject.CompletableGithubObject):
def create_key(self, title, key):
"""
- :calls: `POST /user/keys `_
+ :calls: `POST /user/keys `_
:param title: string
:param key: string
:rtype: :class:`github.UserKey.UserKey`
@@ -547,7 +547,7 @@ class AuthenticatedUser(github.GithubObject.CompletableGithubObject):
def create_project(self, name, body=github.GithubObject.NotSet):
"""
- :calls: `POST /user/projects `_
+ :calls: `POST /user/projects `_
:param name: string
:param body: string
:rtype: :class:`github.Project.Project`
@@ -585,7 +585,7 @@ class AuthenticatedUser(github.GithubObject.CompletableGithubObject):
delete_branch_on_merge=github.GithubObject.NotSet,
):
"""
- :calls: `POST /user/repos `_
+ :calls: `POST /user/repos `_
:param name: string
:param description: string
:param homepage: string
@@ -695,7 +695,7 @@ class AuthenticatedUser(github.GithubObject.CompletableGithubObject):
bio=github.GithubObject.NotSet,
):
"""
- :calls: `PATCH /user `_
+ :calls: `PATCH /user `_
:param name: string
:param email: string
:param blog: string
@@ -740,7 +740,7 @@ class AuthenticatedUser(github.GithubObject.CompletableGithubObject):
def get_authorization(self, id):
"""
- :calls: `GET /authorizations/:id `_
+ :calls: `GET /authorizations/{id} `_
:param id: integer
:rtype: :class:`github.Authorization.Authorization`
"""
@@ -754,7 +754,7 @@ class AuthenticatedUser(github.GithubObject.CompletableGithubObject):
def get_authorizations(self):
"""
- :calls: `GET /authorizations `_
+ :calls: `GET /authorizations `_
:rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.Authorization.Authorization`
"""
return github.PaginatedList.PaginatedList(
@@ -763,7 +763,7 @@ class AuthenticatedUser(github.GithubObject.CompletableGithubObject):
def get_emails(self):
"""
- :calls: `GET /user/emails `_
+ :calls: `GET /user/emails `_
:rtype: list of namedtuples with members email, primary, verified and visibility
"""
headers, data = self._requester.requestJsonAndCheck("GET", "/user/emails")
@@ -772,7 +772,7 @@ class AuthenticatedUser(github.GithubObject.CompletableGithubObject):
def get_events(self):
"""
- :calls: `GET /events `_
+ :calls: `GET /events `_
:rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.Event.Event`
"""
return github.PaginatedList.PaginatedList(
@@ -781,7 +781,7 @@ class AuthenticatedUser(github.GithubObject.CompletableGithubObject):
def get_followers(self):
"""
- :calls: `GET /user/followers `_
+ :calls: `GET /user/followers `_
:rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.NamedUser.NamedUser`
"""
return github.PaginatedList.PaginatedList(
@@ -790,7 +790,7 @@ class AuthenticatedUser(github.GithubObject.CompletableGithubObject):
def get_following(self):
"""
- :calls: `GET /user/following `_
+ :calls: `GET /user/following `_
:rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.NamedUser.NamedUser`
"""
return github.PaginatedList.PaginatedList(
@@ -799,7 +799,7 @@ class AuthenticatedUser(github.GithubObject.CompletableGithubObject):
def get_gists(self, since=github.GithubObject.NotSet):
"""
- :calls: `GET /gists `_
+ :calls: `GET /gists `_
:param since: datetime.datetime format YYYY-MM-DDTHH:MM:SSZ
:rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.Gist.Gist`
"""
@@ -823,7 +823,7 @@ class AuthenticatedUser(github.GithubObject.CompletableGithubObject):
since=github.GithubObject.NotSet,
):
"""
- :calls: `GET /issues `_
+ :calls: `GET /issues `_
:rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.Issue.Issue`
:param filter: string
:param state: string
@@ -872,7 +872,7 @@ class AuthenticatedUser(github.GithubObject.CompletableGithubObject):
since=github.GithubObject.NotSet,
):
"""
- :calls: `GET /user/issues `_
+ :calls: `GET /user/issues `_
:rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.Issue.Issue`
:param filter: string
:param state: string
@@ -913,7 +913,7 @@ class AuthenticatedUser(github.GithubObject.CompletableGithubObject):
def get_key(self, id):
"""
- :calls: `GET /user/keys/:id `_
+ :calls: `GET /user/keys/{id} `_
:param id: integer
:rtype: :class:`github.UserKey.UserKey`
"""
@@ -923,7 +923,7 @@ class AuthenticatedUser(github.GithubObject.CompletableGithubObject):
def get_keys(self):
"""
- :calls: `GET /user/keys `_
+ :calls: `GET /user/keys `_
:rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.UserKey.UserKey`
"""
return github.PaginatedList.PaginatedList(
@@ -932,7 +932,7 @@ class AuthenticatedUser(github.GithubObject.CompletableGithubObject):
def get_notification(self, id):
"""
- :calls: `GET /notifications/threads/:id `_
+ :calls: `GET /notifications/threads/{id} `_
:rtype: :class:`github.Notification.Notification`
"""
@@ -952,7 +952,7 @@ class AuthenticatedUser(github.GithubObject.CompletableGithubObject):
before=github.GithubObject.NotSet,
):
"""
- :calls: `GET /notifications `_
+ :calls: `GET /notifications `_
:param all: bool
:param participating: bool
:param since: datetime.datetime
@@ -987,7 +987,7 @@ class AuthenticatedUser(github.GithubObject.CompletableGithubObject):
def get_organization_events(self, org):
"""
- :calls: `GET /users/:user/events/orgs/:org `_
+ :calls: `GET /users/{user}/events/orgs/{org} `_
:param org: :class:`github.Organization.Organization`
:rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.Event.Event`
"""
@@ -1001,7 +1001,7 @@ class AuthenticatedUser(github.GithubObject.CompletableGithubObject):
def get_orgs(self):
"""
- :calls: `GET /user/orgs `_
+ :calls: `GET /user/orgs `_
:rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.Organization.Organization`
"""
return github.PaginatedList.PaginatedList(
@@ -1010,7 +1010,7 @@ class AuthenticatedUser(github.GithubObject.CompletableGithubObject):
def get_repo(self, name):
"""
- :calls: `GET /repos/:owner/:repo `_
+ :calls: `GET /repos/{owner}/{repo} `_
:param name: string
:rtype: :class:`github.Repository.Repository`
"""
@@ -1031,7 +1031,7 @@ class AuthenticatedUser(github.GithubObject.CompletableGithubObject):
direction=github.GithubObject.NotSet,
):
"""
- :calls: `GET /user/repos `
+ :calls: `GET /user/repos `
:param visibility: string
:param affiliation: string
:param type: string
@@ -1067,7 +1067,7 @@ class AuthenticatedUser(github.GithubObject.CompletableGithubObject):
def get_starred(self):
"""
- :calls: `GET /user/starred `_
+ :calls: `GET /user/starred `_
:rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.Repository.Repository`
"""
return github.PaginatedList.PaginatedList(
@@ -1076,7 +1076,7 @@ class AuthenticatedUser(github.GithubObject.CompletableGithubObject):
def get_starred_gists(self):
"""
- :calls: `GET /gists/starred `_
+ :calls: `GET /gists/starred `_
:rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.Gist.Gist`
"""
return github.PaginatedList.PaginatedList(
@@ -1085,7 +1085,7 @@ class AuthenticatedUser(github.GithubObject.CompletableGithubObject):
def get_subscriptions(self):
"""
- :calls: `GET /user/subscriptions `_
+ :calls: `GET /user/subscriptions `_
:rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.Repository.Repository`
"""
return github.PaginatedList.PaginatedList(
@@ -1094,7 +1094,7 @@ class AuthenticatedUser(github.GithubObject.CompletableGithubObject):
def get_teams(self):
"""
- :calls: `GET /user/teams `_
+ :calls: `GET /user/teams `_
:rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.Team.Team`
"""
return github.PaginatedList.PaginatedList(
@@ -1103,7 +1103,7 @@ class AuthenticatedUser(github.GithubObject.CompletableGithubObject):
def get_watched(self):
"""
- :calls: `GET /user/subscriptions `_
+ :calls: `GET /user/subscriptions `_
:rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.Repository.Repository`
"""
return github.PaginatedList.PaginatedList(
@@ -1112,7 +1112,7 @@ class AuthenticatedUser(github.GithubObject.CompletableGithubObject):
def get_installations(self):
"""
- :calls: `GET /user/installations `_
+ :calls: `GET /user/installations `_
:rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.Installation.Installation`
"""
return github.PaginatedList.PaginatedList(
@@ -1126,7 +1126,7 @@ class AuthenticatedUser(github.GithubObject.CompletableGithubObject):
def has_in_following(self, following):
"""
- :calls: `GET /user/following/:user `_
+ :calls: `GET /user/following/{user} `_
:param following: :class:`github.NamedUser.NamedUser`
:rtype: bool
"""
@@ -1138,7 +1138,7 @@ class AuthenticatedUser(github.GithubObject.CompletableGithubObject):
def has_in_starred(self, starred):
"""
- :calls: `GET /user/starred/:owner/:repo `_
+ :calls: `GET /user/starred/{owner}/{repo} `_
:param starred: :class:`github.Repository.Repository`
:rtype: bool
"""
@@ -1150,7 +1150,7 @@ class AuthenticatedUser(github.GithubObject.CompletableGithubObject):
def has_in_subscriptions(self, subscription):
"""
- :calls: `GET /user/subscriptions/:owner/:repo `_
+ :calls: `GET /user/subscriptions/{owner}/{repo} `_
:param subscription: :class:`github.Repository.Repository`
:rtype: bool
"""
@@ -1162,7 +1162,7 @@ class AuthenticatedUser(github.GithubObject.CompletableGithubObject):
def has_in_watched(self, watched):
"""
- :calls: `GET /repos/:owner/:repo/subscription `_
+ :calls: `GET /repos/{owner}/{repo}/subscription `_
:param watched: :class:`github.Repository.Repository`
:rtype: bool
"""
@@ -1174,7 +1174,7 @@ class AuthenticatedUser(github.GithubObject.CompletableGithubObject):
def mark_notifications_as_read(self, last_read_at=datetime.datetime.utcnow()):
"""
- :calls: `PUT /notifications `_
+ :calls: `PUT /notifications `_
:param last_read_at: datetime
"""
assert isinstance(last_read_at, datetime.datetime)
@@ -1186,7 +1186,7 @@ class AuthenticatedUser(github.GithubObject.CompletableGithubObject):
def remove_from_emails(self, *emails):
"""
- :calls: `DELETE /user/emails `_
+ :calls: `DELETE /user/emails `_
:param email: string
:rtype: None
"""
@@ -1198,7 +1198,7 @@ class AuthenticatedUser(github.GithubObject.CompletableGithubObject):
def remove_from_following(self, following):
"""
- :calls: `DELETE /user/following/:user `_
+ :calls: `DELETE /user/following/{user} `_
:param following: :class:`github.NamedUser.NamedUser`
:rtype: None
"""
@@ -1209,7 +1209,7 @@ class AuthenticatedUser(github.GithubObject.CompletableGithubObject):
def remove_from_starred(self, starred):
"""
- :calls: `DELETE /user/starred/:owner/:repo `_
+ :calls: `DELETE /user/starred/{owner}/{repo} `_
:param starred: :class:`github.Repository.Repository`
:rtype: None
"""
@@ -1220,7 +1220,7 @@ class AuthenticatedUser(github.GithubObject.CompletableGithubObject):
def remove_from_subscriptions(self, subscription):
"""
- :calls: `DELETE /user/subscriptions/:owner/:repo `_
+ :calls: `DELETE /user/subscriptions/{owner}/{repo} `_
:param subscription: :class:`github.Repository.Repository`
:rtype: None
"""
@@ -1231,7 +1231,7 @@ class AuthenticatedUser(github.GithubObject.CompletableGithubObject):
def remove_from_watched(self, watched):
"""
- :calls: `DELETE /repos/:owner/:repo/subscription `_
+ :calls: `DELETE /repos/{owner}/{repo}/subscription `_
:param watched: :class:`github.Repository.Repository`
:rtype: None
"""
@@ -1242,7 +1242,7 @@ class AuthenticatedUser(github.GithubObject.CompletableGithubObject):
def accept_invitation(self, invitation):
"""
- :calls: `PATCH /user/repository_invitations/:invitation_id `
+ :calls: `PATCH /user/repository_invitations/{invitation_id} `
:param invitation: :class:`github.Invitation.Invitation` or int
:rtype: None
"""
@@ -1259,7 +1259,7 @@ class AuthenticatedUser(github.GithubObject.CompletableGithubObject):
def get_invitations(self):
"""
- :calls: `GET /user/repository_invitations `_
+ :calls: `GET /user/repository_invitations `_
:rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.Invitation.Invitation`
"""
return github.PaginatedList.PaginatedList(
@@ -1276,7 +1276,7 @@ class AuthenticatedUser(github.GithubObject.CompletableGithubObject):
exclude_attachments=github.GithubObject.NotSet,
):
"""
- :calls: `POST /user/migrations `_
+ :calls: `POST /user/migrations `_
:param repos: list or tuple of str
:param lock_repositories: bool
:param exclude_attachments: bool
@@ -1307,7 +1307,7 @@ class AuthenticatedUser(github.GithubObject.CompletableGithubObject):
def get_migrations(self):
"""
- :calls: `GET /user/migrations `_
+ :calls: `GET /user/migrations `_
:rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.Migration.Migration`
"""
return github.PaginatedList.PaginatedList(
@@ -1320,7 +1320,7 @@ class AuthenticatedUser(github.GithubObject.CompletableGithubObject):
def get_organization_membership(self, org):
"""
- :calls: `GET /user/memberships/orgs/:org `_
+ :calls: `GET /user/memberships/orgs/{org} `_
:rtype: :class:`github.Membership.Membership`
"""
assert isinstance(org, str)
diff --git a/github/Authorization.py b/github/Authorization.py
index bbddd170..b495d4b3 100644
--- a/github/Authorization.py
+++ b/github/Authorization.py
@@ -34,7 +34,7 @@ import github.GithubObject
class Authorization(github.GithubObject.CompletableGithubObject):
"""
- This class represents Authorizations. The reference can be found here https://developer.github.com/v3/oauth_authorizations/
+ This class represents Authorizations. The reference can be found here https://docs.github.com/en/enterprise-server@3.0/rest/reference/oauth-authorizations
"""
def __repr__(self):
@@ -114,7 +114,7 @@ class Authorization(github.GithubObject.CompletableGithubObject):
def delete(self):
"""
- :calls: `DELETE /authorizations/:id `_
+ :calls: `DELETE /authorizations/{id} `_
:rtype: None
"""
headers, data = self._requester.requestJsonAndCheck("DELETE", self.url)
@@ -128,7 +128,7 @@ class Authorization(github.GithubObject.CompletableGithubObject):
note_url=github.GithubObject.NotSet,
):
"""
- :calls: `PATCH /authorizations/:id `_
+ :calls: `PATCH /authorizations/{id} `_
:param scopes: list of string
:param add_scopes: list of string
:param remove_scopes: list of string
diff --git a/github/Branch.py b/github/Branch.py
index a8d4cc3b..5e037268 100644
--- a/github/Branch.py
+++ b/github/Branch.py
@@ -42,7 +42,7 @@ from . import Consts
class Branch(github.GithubObject.NonCompletableGithubObject):
"""
- This class represents Branches. The reference can be found here https://developer.github.com/v3/repos/branches
+ This class represents Branches. The reference can be found here https://docs.github.com/en/rest/reference/repos#branches
"""
def __repr__(self):
@@ -98,7 +98,7 @@ class Branch(github.GithubObject.NonCompletableGithubObject):
def get_protection(self):
"""
- :calls: `GET /repos/:owner/:repo/branches/:branch/protection `_
+ :calls: `GET /repos/{owner}/{repo}/branches/{branch}/protection `_
"""
headers, data = self._requester.requestJsonAndCheck(
"GET",
@@ -123,7 +123,7 @@ class Branch(github.GithubObject.NonCompletableGithubObject):
team_push_restrictions=github.GithubObject.NotSet,
):
"""
- :calls: `PUT /repos/:owner/:repo/branches/:branch/protection `_
+ :calls: `PUT /repos/{owner}/{repo}/branches/{branch}/protection `_
:strict: bool
:contexts: list of strings
:enforce_admins: bool
@@ -245,7 +245,7 @@ class Branch(github.GithubObject.NonCompletableGithubObject):
def remove_protection(self):
"""
- :calls: `DELETE /repos/:owner/:repo/branches/:branch/protection `_
+ :calls: `DELETE /repos/{owner}/{repo}/branches/{branch}/protection `_
"""
headers, data = self._requester.requestJsonAndCheck(
"DELETE",
@@ -254,7 +254,7 @@ class Branch(github.GithubObject.NonCompletableGithubObject):
def get_required_status_checks(self):
"""
- :calls: `GET /repos/:owner/:repo/branches/:branch/protection/required_status_checks `_
+ :calls: `GET /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks `_
:rtype: :class:`github.RequiredStatusChecks.RequiredStatusChecks`
"""
headers, data = self._requester.requestJsonAndCheck(
@@ -268,7 +268,7 @@ class Branch(github.GithubObject.NonCompletableGithubObject):
self, strict=github.GithubObject.NotSet, contexts=github.GithubObject.NotSet
):
"""
- :calls: `PATCH /repos/:owner/:repo/branches/:branch/protection/required_status_checks `_
+ :calls: `PATCH /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks `_
:strict: bool
:contexts: list of strings
"""
@@ -290,7 +290,7 @@ class Branch(github.GithubObject.NonCompletableGithubObject):
def remove_required_status_checks(self):
"""
- :calls: `DELETE /repos/:owner/:repo/branches/:branch/protection/required_status_checks `_
+ :calls: `DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks `_
"""
headers, data = self._requester.requestJsonAndCheck(
"DELETE",
@@ -299,7 +299,7 @@ class Branch(github.GithubObject.NonCompletableGithubObject):
def get_required_pull_request_reviews(self):
"""
- :calls: `GET /repos/:owner/:repo/branches/:branch/protection/required_pull_request_reviews `_
+ :calls: `GET /repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews `_
:rtype: :class:`github.RequiredPullRequestReviews.RequiredPullRequestReviews`
"""
headers, data = self._requester.requestJsonAndCheck(
@@ -320,7 +320,7 @@ class Branch(github.GithubObject.NonCompletableGithubObject):
required_approving_review_count=github.GithubObject.NotSet,
):
"""
- :calls: `PATCH /repos/:owner/:repo/branches/:branch/protection/required_pull_request_reviews `_
+ :calls: `PATCH /repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews `_
:dismissal_users: list of strings
:dismissal_teams: list of strings
:dismiss_stale_reviews: bool
@@ -368,7 +368,7 @@ class Branch(github.GithubObject.NonCompletableGithubObject):
def remove_required_pull_request_reviews(self):
"""
- :calls: `DELETE /repos/:owner/:repo/branches/:branch/protection/required_pull_request_reviews `_
+ :calls: `DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews `_
"""
headers, data = self._requester.requestJsonAndCheck(
"DELETE",
@@ -377,7 +377,7 @@ class Branch(github.GithubObject.NonCompletableGithubObject):
def get_admin_enforcement(self):
"""
- :calls: `GET /repos/:owner/:repo/branches/:branch/protection/enforce_admins `_
+ :calls: `GET /repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins `_
:rtype: bool
"""
headers, data = self._requester.requestJsonAndCheck(
@@ -387,7 +387,7 @@ class Branch(github.GithubObject.NonCompletableGithubObject):
def set_admin_enforcement(self):
"""
- :calls: `POST /repos/:owner/:repo/branches/:branch/protection/enforce_admins `_
+ :calls: `POST /repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins `_
"""
headers, data = self._requester.requestJsonAndCheck(
"POST", f"{self.protection_url}/enforce_admins"
@@ -395,7 +395,7 @@ class Branch(github.GithubObject.NonCompletableGithubObject):
def remove_admin_enforcement(self):
"""
- :calls: `DELETE /repos/:owner/:repo/branches/:branch/protection/enforce_admins `_
+ :calls: `DELETE /repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins `_
"""
headers, data = self._requester.requestJsonAndCheck(
"DELETE", f"{self.protection_url}/enforce_admins"
@@ -403,7 +403,7 @@ class Branch(github.GithubObject.NonCompletableGithubObject):
def get_user_push_restrictions(self):
"""
- :calls: `GET /repos/:owner/:repo/branches/:branch/protection/restrictions/users `_
+ :calls: `GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users `_
:rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.NamedUser.NamedUser`
"""
return github.PaginatedList.PaginatedList(
@@ -415,7 +415,7 @@ class Branch(github.GithubObject.NonCompletableGithubObject):
def get_team_push_restrictions(self):
"""
- :calls: `GET /repos/:owner/:repo/branches/:branch/protection/restrictions/teams `_
+ :calls: `GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams `_
:rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.Team.Team`
"""
return github.PaginatedList.PaginatedList(
@@ -427,7 +427,7 @@ class Branch(github.GithubObject.NonCompletableGithubObject):
def add_user_push_restrictions(self, *users):
"""
- :calls: `POST /repos/:owner/:repo/branches/:branch/protection/restrictions/users `_
+ :calls: `POST /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users `_
:users: list of strings (user names)
"""
assert all(isinstance(element, str) for element in users), users
@@ -438,7 +438,7 @@ class Branch(github.GithubObject.NonCompletableGithubObject):
def replace_user_push_restrictions(self, *users):
"""
- :calls: `PUT /repos/:owner/:repo/branches/:branch/protection/restrictions/users `_
+ :calls: `PUT /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users `_
:users: list of strings (user names)
"""
assert all(isinstance(element, str) for element in users), users
@@ -449,7 +449,7 @@ class Branch(github.GithubObject.NonCompletableGithubObject):
def remove_user_push_restrictions(self, *users):
"""
- :calls: `DELETE /repos/:owner/:repo/branches/:branch/protection/restrictions/users `_
+ :calls: `DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users `_
:users: list of strings (user names)
"""
assert all(isinstance(element, str) for element in users), users
@@ -460,7 +460,7 @@ class Branch(github.GithubObject.NonCompletableGithubObject):
def add_team_push_restrictions(self, *teams):
"""
- :calls: `POST /repos/:owner/:repo/branches/:branch/protection/restrictions/teams `_
+ :calls: `POST /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams `_
:teams: list of strings (team slugs)
"""
assert all(isinstance(element, str) for element in teams), teams
@@ -471,7 +471,7 @@ class Branch(github.GithubObject.NonCompletableGithubObject):
def replace_team_push_restrictions(self, *teams):
"""
- :calls: `PUT /repos/:owner/:repo/branches/:branch/protection/restrictions/teams `_
+ :calls: `PUT /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams `_
:teams: list of strings (team slugs)
"""
assert all(isinstance(element, str) for element in teams), teams
@@ -482,7 +482,7 @@ class Branch(github.GithubObject.NonCompletableGithubObject):
def remove_team_push_restrictions(self, *teams):
"""
- :calls: `DELETE /repos/:owner/:repo/branches/:branch/protection/restrictions/teams `_
+ :calls: `DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams `_
:teams: list of strings (team slugs)
"""
assert all(isinstance(element, str) for element in teams), teams
@@ -493,7 +493,7 @@ class Branch(github.GithubObject.NonCompletableGithubObject):
def remove_push_restrictions(self):
"""
- :calls: `DELETE /repos/:owner/:repo/branches/:branch/protection/restrictions `_
+ :calls: `DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions `_
"""
headers, data = self._requester.requestJsonAndCheck(
"DELETE", f"{self.protection_url}/restrictions"
@@ -501,7 +501,7 @@ class Branch(github.GithubObject.NonCompletableGithubObject):
def get_required_signatures(self):
"""
- :calls: `GET /repos/:owner/:repo/branches/:branch/protection/required_signatures `
+ :calls: `GET /repos/{owner}/{repo}/branches/{branch}/protection/required_signatures `
"""
headers, data = self._requester.requestJsonAndCheck(
"GET",
@@ -512,7 +512,7 @@ class Branch(github.GithubObject.NonCompletableGithubObject):
def add_required_signatures(self):
"""
- :calls: `POST /repos/:owner/:repo/branches/:branch/protection/required_signatures `
+ :calls: `POST /repos/{owner}/{repo}/branches/{branch}/protection/required_signatures `
"""
headers, data = self._requester.requestJsonAndCheck(
"POST",
@@ -522,7 +522,7 @@ class Branch(github.GithubObject.NonCompletableGithubObject):
def remove_required_signatures(self):
"""
- :calls: `DELETE /repos/:owner/:repo/branches/:branch/protection/required_signatures `
+ :calls: `DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_signatures `
"""
headers, data = self._requester.requestJsonAndCheck(
"DELETE",
diff --git a/github/BranchProtection.py b/github/BranchProtection.py
index ffc364c8..03cc3984 100644
--- a/github/BranchProtection.py
+++ b/github/BranchProtection.py
@@ -29,7 +29,7 @@ import github.Team
class BranchProtection(github.GithubObject.CompletableGithubObject):
"""
- This class represents Branch Protection. The reference can be found here https://developer.github.com/v3/repos/branches/#get-branch-protection
+ This class represents Branch Protection. The reference can be found here https://docs.github.com/en/rest/reference/repos#get-branch-protection
"""
def __repr__(self):
diff --git a/github/CheckRun.py b/github/CheckRun.py
index 09f3df76..79add412 100644
--- a/github/CheckRun.py
+++ b/github/CheckRun.py
@@ -171,7 +171,7 @@ class CheckRun(github.GithubObject.CompletableGithubObject):
def get_annotations(self):
"""
- :calls: `GET /repos/:owner/:repo/check-runs/:check_run_id/annotations `_
+ :calls: `GET /repos/{owner}/{repo}/check-runs/{check_run_id}/annotations `_
:rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.CheckRunAnnotation.CheckRunAnnotation`
"""
return github.PaginatedList.PaginatedList(
@@ -196,7 +196,7 @@ class CheckRun(github.GithubObject.CompletableGithubObject):
actions=github.GithubObject.NotSet,
):
"""
- :calls: `PATCH /repos/:owner/:repo/check-runs/:check_run_id `_
+ :calls: `PATCH /repos/{owner}/{repo}/check-runs/{check_run_id} `_
:param name: string
:param head_sha: string
:param details_url: string
diff --git a/github/CheckSuite.py b/github/CheckSuite.py
index 73a97a40..a244d1f8 100644
--- a/github/CheckSuite.py
+++ b/github/CheckSuite.py
@@ -161,7 +161,7 @@ class CheckSuite(github.GithubObject.CompletableGithubObject):
def rerequest(self):
"""
- :calls: `POST /repos/:owner/:repo/check-suites/:check_suite_id/rerequest `_
+ :calls: `POST /repos/{owner}/{repo}/check-suites/{check_suite_id}/rerequest `_
:rtype: bool
"""
request_headers = {"Accept": "application/vnd.github.v3+json"}
@@ -177,7 +177,7 @@ class CheckSuite(github.GithubObject.CompletableGithubObject):
filter=github.GithubObject.NotSet,
):
"""
- :calls: `GET /repos/:owner/:repo/check-suites/:check_suite_id/check-runs `_
+ :calls: `GET /repos/{owner}/{repo}/check-suites/{check_suite_id}/check-runs `_
:param check_name: string
:param status: string
:param filter: string
diff --git a/github/Clones.py b/github/Clones.py
index bf07b60b..e3970e31 100644
--- a/github/Clones.py
+++ b/github/Clones.py
@@ -30,7 +30,7 @@ import github.GithubObject
class Clones(github.GithubObject.NonCompletableGithubObject):
"""
This class represents a popular Path for a GitHub repository.
- The reference can be found here https://developer.github.com/v3/repos/traffic/
+ The reference can be found here https://docs.github.com/en/rest/reference/repos#get-repository-clones
"""
def __repr__(self):
diff --git a/github/Commit.py b/github/Commit.py
index 146905b1..60507426 100644
--- a/github/Commit.py
+++ b/github/Commit.py
@@ -45,7 +45,7 @@ import github.PaginatedList
class Commit(github.GithubObject.CompletableGithubObject):
"""
- This class represents Commits. The reference can be found here http://developer.github.com/v3/git/commits/
+ This class represents Commits. The reference can be found here http://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 `_
+ :calls: `POST /repos/{owner}/{repo}/commits/{sha}/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 `_
+ :calls: `POST /repos/{owner}/{repo}/statuses/{sha} `_
: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 `_
+ :calls: `GET /repos/{owner}/{repo}/commits/{sha}/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 `_
+ :calls: `GET /repos/{owner}/{repo}/statuses/{ref} `_
:rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.CommitStatus.CommitStatus`
"""
return github.PaginatedList.PaginatedList(
@@ -237,7 +237,7 @@ class Commit(github.GithubObject.CompletableGithubObject):
def get_combined_status(self):
"""
- :calls: `GET /repos/:owner/:repo/commits/:ref/status/ `_
+ :calls: `GET /repos/{owner}/{repo}/commits/{ref}/status/ `_
:rtype: :class:`github.CommitCombinedStatus.CommitCombinedStatus`
"""
headers, data = self._requester.requestJsonAndCheck("GET", f"{self.url}/status")
@@ -247,7 +247,7 @@ class Commit(github.GithubObject.CompletableGithubObject):
def get_pulls(self):
"""
- :calls: `GET /repos/:owner/:repo/commits/:sha/pulls `_
+ :calls: `GET /repos/{owner}/{repo}/commits/{sha}/pulls `_
:rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.PullRequest.PullRequest`
"""
return github.PaginatedList.PaginatedList(
@@ -265,7 +265,7 @@ class Commit(github.GithubObject.CompletableGithubObject):
filter=github.GithubObject.NotSet,
):
"""
- :calls: `GET /repos/:owner/:repo/commits/:sha/check-runs `_
+ :calls: `GET /repos/{owner}/{repo}/commits/{sha}/check-runs `_
:param check_name: string
:param status: string
:param filter: string
@@ -296,7 +296,7 @@ class Commit(github.GithubObject.CompletableGithubObject):
self, app_id=github.GithubObject.NotSet, check_name=github.GithubObject.NotSet
):
"""
- :class: `GET /repos/:owner/:repo/commits/:ref/check-suites `_
+ :class: `GET /repos/{owner}/{repo}/commits/{ref}/check-suites `_
:param app_id: int
:param check_name: string
:rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.CheckSuite.CheckSuite`
diff --git a/github/CommitCombinedStatus.py b/github/CommitCombinedStatus.py
index fb420d86..63259615 100644
--- a/github/CommitCombinedStatus.py
+++ b/github/CommitCombinedStatus.py
@@ -31,7 +31,7 @@ import github.Repository
class CommitCombinedStatus(github.GithubObject.NonCompletableGithubObject):
"""
- This class represents CommitCombinedStatuses. The reference can be found here https://developer.github.com/v3/repos/statuses/#get-the-combined-status-for-a-specific-ref
+ This class represents CommitCombinedStatuses. The reference can be found here https://docs.github.com/en/rest/reference/repos#statuses
"""
def __repr__(self):
diff --git a/github/CommitComment.py b/github/CommitComment.py
index be5a1d0a..06235f87 100644
--- a/github/CommitComment.py
+++ b/github/CommitComment.py
@@ -39,7 +39,7 @@ from . import Consts
class CommitComment(github.GithubObject.CompletableGithubObject):
"""
- This class represents CommitComments. The reference can be found here https://developer.github.com/v3/repos/comments/
+ This class represents CommitComments. The reference can be found here https://docs.github.com/en/rest/reference/repos#comments
"""
def __repr__(self):
@@ -135,14 +135,14 @@ class CommitComment(github.GithubObject.CompletableGithubObject):
def delete(self):
"""
- :calls: `DELETE /repos/:owner/:repo/comments/:id `_
+ :calls: `DELETE /repos/{owner}/{repo}/comments/{id} `_
:rtype: None
"""
headers, data = self._requester.requestJsonAndCheck("DELETE", self.url)
def edit(self, body):
"""
- :calls: `PATCH /repos/:owner/:repo/comments/:id `_
+ :calls: `PATCH /repos/{owner}/{repo}/comments/{id} `_
:param body: string
:rtype: None
"""
@@ -157,8 +157,8 @@ class CommitComment(github.GithubObject.CompletableGithubObject):
def get_reactions(self):
"""
- :calls: `GET /repos/:owner/:repo/comments/:id/reactions
- `_
+ :calls: `GET /repos/{owner}/{repo}/comments/{id}/reactions
+ `_
:return: :class: :class:`github.PaginatedList.PaginatedList` of :class:`github.Reaction.Reaction`
"""
return github.PaginatedList.PaginatedList(
@@ -171,8 +171,8 @@ class CommitComment(github.GithubObject.CompletableGithubObject):
def create_reaction(self, reaction_type):
"""
- :calls: `POST /repos/:owner/:repo/comments/:id/reactions
- `_
+ :calls: `POST /repos/{owner}/{repo}/comments/{id}/reactions
+ `_
:param reaction_type: string
:rtype: :class:`github.Reaction.Reaction`
"""
@@ -190,8 +190,8 @@ class CommitComment(github.GithubObject.CompletableGithubObject):
def delete_reaction(self, reaction_id):
"""
- :calls: `DELETE /repos/:owner/:repo/comments/:comment_id/reactions/:reaction_id
- `_
+ :calls: `DELETE /repos/{owner}/{repo}/comments/{comment_id}/reactions/{reaction_id}
+ `_
:param reaction_id: integer
:rtype: bool
"""
diff --git a/github/CommitStatus.py b/github/CommitStatus.py
index b95b49e4..40338d34 100644
--- a/github/CommitStatus.py
+++ b/github/CommitStatus.py
@@ -36,7 +36,7 @@ import github.NamedUser
class CommitStatus(github.GithubObject.NonCompletableGithubObject):
"""
- This class represents CommitStatuses.The reference can be found here https://developer.github.com/v3/repos/statuses/
+ This class represents CommitStatuses.The reference can be found here https://docs.github.com/en/rest/reference/repos#statuses
"""
def __repr__(self):
diff --git a/github/Consts.py b/github/Consts.py
index d5cbcb7e..ec2ae6bf 100644
--- a/github/Consts.py
+++ b/github/Consts.py
@@ -99,7 +99,7 @@ mediaTypeRequireMultipleApprovingReviews = (
# https://developer.github.com/changes/2018-05-24-user-migration-api/
mediaTypeMigrationPreview = "application/vnd.github.wyandotte-preview+json"
-# https://developer.github.com/v3/search/#highlighting-code-search-results-1
+# https://docs.github.com/en/rest/reference/search#highlighting-code-search-results-1
highLightSearchPreview = "application/vnd.github.v3.text-match+json"
# https://developer.github.com/changes/2018-02-22-protected-branches-required-signatures/
@@ -117,7 +117,7 @@ updateBranchPreview = "application/vnd.github.lydian-preview+json"
# https://developer.github.com/changes/2016-05-23-timeline-preview-api/
issueTimelineEventsPreview = "application/vnd.github.mockingbird-preview"
-# https://developer.github.com/v3/teams/#check-if-a-team-manages-a-repository
+# https://docs.github.com/en/rest/reference/teams#check-if-a-team-manages-a-repository
teamRepositoryPermissions = "application/vnd.github.v3.repository+json"
# https://developer.github.com/changes/2016-04-06-deployment-and-deployment-status-enhancements/
diff --git a/github/ContentFile.py b/github/ContentFile.py
index abc13808..007f17fb 100644
--- a/github/ContentFile.py
+++ b/github/ContentFile.py
@@ -37,7 +37,7 @@ import github.Repository
class ContentFile(github.GithubObject.CompletableGithubObject):
"""
- This class represents ContentFiles. The reference can be found here https://developer.github.com/v3/repos/contents/#get-contents
+ This class represents ContentFiles. The reference can be found here https://docs.github.com/en/rest/reference/repos#contents
"""
def __repr__(self):
diff --git a/github/Deployment.py b/github/Deployment.py
index dadc76c7..ae7472bb 100644
--- a/github/Deployment.py
+++ b/github/Deployment.py
@@ -29,7 +29,7 @@ import github.GithubObject
class Deployment(github.GithubObject.CompletableGithubObject):
"""
- This class represents Deployments. The reference can be found here https://developer.github.com/v3/repos/deployments
+ This class represents Deployments. The reference can be found here https://docs.github.com/en/rest/reference/repos#deployments
"""
def __repr__(self):
@@ -157,7 +157,7 @@ class Deployment(github.GithubObject.CompletableGithubObject):
def get_statuses(self):
"""
- :calls: `GET /repos/:owner/deployments/:deployment_id/statuses `_
+ :calls: `GET /repos/{owner}/deployments/{deployment_id}/statuses `_
:rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.DeploymentStatus.DeploymentStatus`
"""
return github.PaginatedList.PaginatedList(
@@ -170,7 +170,7 @@ class Deployment(github.GithubObject.CompletableGithubObject):
def get_status(self, id_):
"""
- :calls: `GET /repos/:owner/deployments/:deployment_id/statuses/:status_id `_
+ :calls: `GET /repos/{owner}/deployments/{deployment_id}/statuses/{status_id} `_
:param id_: int
:rtype: :class:`github.DeploymentStatus.DeploymentStatus`
"""
@@ -194,7 +194,7 @@ class Deployment(github.GithubObject.CompletableGithubObject):
auto_inactive=github.GithubObject.NotSet,
):
"""
- :calls: `POST /repos/:owner/:repo/deployments/:deployment_id/statuses `_
+ :calls: `POST /repos/{owner}/{repo}/deployments/{deployment_id}/statuses `_
:param: state: string
:param: target_url: string
:param: description: string
diff --git a/github/DeploymentStatus.py b/github/DeploymentStatus.py
index 518f0b4a..3e49fc29 100644
--- a/github/DeploymentStatus.py
+++ b/github/DeploymentStatus.py
@@ -26,7 +26,7 @@ import github.GithubObject
class DeploymentStatus(github.GithubObject.CompletableGithubObject):
"""
- This class represents Deployment Statuses. The reference can be found here https://developer.github.com/v3/repos/deployments/
+ This class represents Deployment Statuses. The reference can be found here https://docs.github.com/en/rest/reference/repos#deployments
"""
def __repr__(self):
diff --git a/github/Download.py b/github/Download.py
index 5c7932ea..bbdc9587 100644
--- a/github/Download.py
+++ b/github/Download.py
@@ -33,7 +33,7 @@ import github.GithubObject
class Download(github.GithubObject.CompletableGithubObject):
"""
- This class represents Downloads. The reference can be found here https://developer.github.com/v3/repos/downloads/
+ This class represents Downloads. The reference can be found here https://docs.github.com/en/rest/reference/repos
"""
def __repr__(self):
@@ -201,7 +201,7 @@ class Download(github.GithubObject.CompletableGithubObject):
def delete(self):
"""
- :calls: `DELETE /repos/:owner/:repo/downloads/:id `_
+ :calls: `DELETE /repos/{owner}/{repo}/downloads/{id} `_
:rtype: None
"""
headers, data = self._requester.requestJsonAndCheck("DELETE", self.url)
diff --git a/github/Event.py b/github/Event.py
index f690d802..61d03773 100644
--- a/github/Event.py
+++ b/github/Event.py
@@ -36,7 +36,7 @@ import github.Repository
class Event(github.GithubObject.NonCompletableGithubObject):
"""
- This class represents Events. The reference can be found here http://developer.github.com/v3/activity/events/
+ This class represents Events. The reference can be found here https://docs.github.com/en/rest/reference/activity#events
"""
def __repr__(self):
diff --git a/github/Gist.py b/github/Gist.py
index aeff1bde..40f76090 100644
--- a/github/Gist.py
+++ b/github/Gist.py
@@ -41,7 +41,7 @@ import github.PaginatedList
class Gist(github.GithubObject.CompletableGithubObject):
"""
- This class represents Gists. The reference can be found here https://developer.github.com/v3/gists/
+ This class represents Gists. The reference can be found here https://docs.github.com/en/rest/reference/gists
"""
def __repr__(self):
@@ -201,7 +201,7 @@ class Gist(github.GithubObject.CompletableGithubObject):
def create_comment(self, body):
"""
- :calls: `POST /gists/:gist_id/comments `_
+ :calls: `POST /gists/{gist_id}/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 `_
+ :calls: `POST /gists/{id}/forks `_
: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 `_
+ :calls: `DELETE /gists/{id} `_
: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 `_
+ :calls: `PATCH /gists/{id} `_
: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 `_
+ :calls: `GET /gists/{gist_id}/comments/{id} `_
: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 `_
+ :calls: `GET /gists/{gist_id}/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 `_
+ :calls: `GET /gists/{id}/star `_
: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 `_
+ :calls: `DELETE /gists/{id}/star `_
: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 `_
+ :calls: `PUT /gists/{id}/star `_
:rtype: None
"""
headers, data = self._requester.requestJsonAndCheck("PUT", f"{self.url}/star")
diff --git a/github/GistComment.py b/github/GistComment.py
index 7bf85ec5..f8ecc34b 100644
--- a/github/GistComment.py
+++ b/github/GistComment.py
@@ -34,7 +34,7 @@ import github.NamedUser
class GistComment(github.GithubObject.CompletableGithubObject):
"""
- This class represents GistComments. The reference can be found here https://developer.github.com/v3/gists/comments/
+ This class represents GistComments. The reference can be found here https://docs.github.com/en/rest/reference/gists#comments
"""
def __repr__(self):
@@ -90,14 +90,14 @@ class GistComment(github.GithubObject.CompletableGithubObject):
def delete(self):
"""
- :calls: `DELETE /gists/:gist_id/comments/:id `_
+ :calls: `DELETE /gists/{gist_id}/comments/{id} `_
:rtype: None
"""
headers, data = self._requester.requestJsonAndCheck("DELETE", self.url)
def edit(self, body):
"""
- :calls: `PATCH /gists/:gist_id/comments/:id `_
+ :calls: `PATCH /gists/{gist_id}/comments/{id} `_
:param body: string
:rtype: None
"""
diff --git a/github/GitBlob.py b/github/GitBlob.py
index c93e8c63..01e0a3f7 100644
--- a/github/GitBlob.py
+++ b/github/GitBlob.py
@@ -33,7 +33,7 @@ import github.GithubObject
class GitBlob(github.GithubObject.CompletableGithubObject):
"""
- This class represents GitBlobs. The reference can be found here https://developer.github.com/v3/git/blobs/
+ This class represents GitBlobs. The reference can be found here https://docs.github.com/en/rest/reference/git#blobs
"""
def __repr__(self):
diff --git a/github/GitCommit.py b/github/GitCommit.py
index 0a7aa6d8..601aa4fa 100644
--- a/github/GitCommit.py
+++ b/github/GitCommit.py
@@ -35,7 +35,7 @@ import github.GitTree
class GitCommit(github.GithubObject.CompletableGithubObject):
"""
- This class represents GitCommits. The reference can be found here https://developer.github.com/v3/git/commits/
+ This class represents GitCommits. The reference can be found here https://docs.github.com/en/rest/reference/git#commits
"""
def __repr__(self):
diff --git a/github/GitRef.py b/github/GitRef.py
index 69222b7d..4c1f7cdc 100644
--- a/github/GitRef.py
+++ b/github/GitRef.py
@@ -34,7 +34,7 @@ import github.GitObject
class GitRef(github.GithubObject.CompletableGithubObject):
"""
- This class represents GitRefs. The reference can be found here https://developer.github.com/v3/git/refs/
+ This class represents GitRefs. The reference can be found here https://docs.github.com/en/rest/reference/git#refs
"""
def __repr__(self):
@@ -66,14 +66,14 @@ class GitRef(github.GithubObject.CompletableGithubObject):
def delete(self):
"""
- :calls: `DELETE /repos/:owner/:repo/git/refs/:ref `_
+ :calls: `DELETE /repos/{owner}/{repo}/git/refs/{ref} `_
: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 `_
+ :calls: `PATCH /repos/{owner}/{repo}/git/refs/{ref} `_
:param sha: string
:param force: bool
:rtype: None
diff --git a/github/GitRelease.py b/github/GitRelease.py
index 81406e01..d62e98ff 100644
--- a/github/GitRelease.py
+++ b/github/GitRelease.py
@@ -44,7 +44,7 @@ from . import Consts
class GitRelease(github.GithubObject.CompletableGithubObject):
"""
- This class represents GitReleases. The reference can be found here https://developer.github.com/v3/repos/releases
+ This class represents GitReleases. The reference can be found here https://docs.github.com/en/rest/reference/repos#releases
"""
def __repr__(self):
@@ -172,7 +172,7 @@ class GitRelease(github.GithubObject.CompletableGithubObject):
def delete_release(self):
"""
- :calls: `DELETE /repos/:owner/:repo/releases/:release_id `_
+ :calls: `DELETE /repos/{owner}/{repo}/releases/{release_id} `_
: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 `_
+ :calls: `PATCH /repos/{owner}/{repo}/releases/{release_id} `_
: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:///repos/:owner/:repo/releases/:release_id/assets `_
+ :calls: `POST https:///repos/{owner}/{repo}/releases/{release_id}/assets `_
: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:///repos/:owner/:repo/releases/:release_id/assets `_
+ :calls: `POST https:///repos/{owner}/{repo}/releases/{release_id}/assets `_
: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 `_
+ :calls: `GET /repos/{owner}/{repo}/releases/{release_id}/assets `_
:rtype: :class:`github.PaginatedList.PaginatedList`
"""
return github.PaginatedList.PaginatedList(
diff --git a/github/GitReleaseAsset.py b/github/GitReleaseAsset.py
index 7271b552..832e10b2 100644
--- a/github/GitReleaseAsset.py
+++ b/github/GitReleaseAsset.py
@@ -28,7 +28,7 @@ import github.GithubObject
class GitReleaseAsset(github.GithubObject.CompletableGithubObject):
"""
- This class represents GitReleaseAssets. The reference can be found here https://developer.github.com/v3/repos/releases/#get-a-single-release-asset
+ This class represents GitReleaseAssets. The reference can be found here https://docs.github.com/en/rest/reference/repos#releases
"""
def __repr__(self):
diff --git a/github/GitTag.py b/github/GitTag.py
index eb0bf65d..a3d0a160 100644
--- a/github/GitTag.py
+++ b/github/GitTag.py
@@ -35,7 +35,7 @@ import github.GitObject
class GitTag(github.GithubObject.CompletableGithubObject):
"""
- This class represents GitTags. The reference can be found here https://developer.github.com/v3/git/tags/
+ This class represents GitTags. The reference can be found here https://docs.github.com/en/rest/reference/git#tags
"""
def __repr__(self):
diff --git a/github/GitTree.py b/github/GitTree.py
index 6afc1303..60c25373 100644
--- a/github/GitTree.py
+++ b/github/GitTree.py
@@ -34,7 +34,7 @@ import github.GitTreeElement
class GitTree(github.GithubObject.CompletableGithubObject):
"""
- This class represents GitTrees. The reference can be found here https://developer.github.com/v3/git/trees/
+ This class represents GitTrees. The reference can be found here https://docs.github.com/en/rest/reference/git#trees
"""
def __repr__(self):
diff --git a/github/GitignoreTemplate.py b/github/GitignoreTemplate.py
index 147276a9..2f6cc237 100644
--- a/github/GitignoreTemplate.py
+++ b/github/GitignoreTemplate.py
@@ -32,7 +32,7 @@ import github.GithubObject
class GitignoreTemplate(github.GithubObject.NonCompletableGithubObject):
"""
- This class represents GitignoreTemplates. The reference can be found here https://developer.github.com/v3/gitignore/
+ This class represents GitignoreTemplates. The reference can be found here https://docs.github.com/en/rest/reference/gitignore
"""
def __repr__(self):
diff --git a/github/Hook.py b/github/Hook.py
index bbfff446..403bf954 100644
--- a/github/Hook.py
+++ b/github/Hook.py
@@ -35,7 +35,7 @@ import github.HookResponse
class Hook(github.GithubObject.CompletableGithubObject):
"""
- This class represents Hooks. The reference can be found here http://developer.github.com/v3/repos/hooks
+ This class represents Hooks. The reference can be found here http://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 `_
+ :calls: `DELETE /repos/{owner}/{repo}/hooks/{id} `_
: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 `_
+ :calls: `PATCH /repos/{owner}/{repo}/hooks/{id} `_
: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 `_
+ :calls: `POST /repos/{owner}/{repo}/hooks/{id}/tests `_
:rtype: None
"""
headers, data = self._requester.requestJsonAndCheck("POST", f"{self.url}/tests")
def ping(self):
"""
- :calls: `POST /repos/:owner/:repo/hooks/:id/pings `_
+ :calls: `POST /repos/{owner}/{repo}/hooks/{id}/pings `_
:rtype: None
"""
headers, data = self._requester.requestJsonAndCheck("POST", f"{self.url}/pings")
diff --git a/github/Installation.py b/github/Installation.py
index 5ec75503..618219e3 100644
--- a/github/Installation.py
+++ b/github/Installation.py
@@ -43,7 +43,7 @@ INTEGRATION_PREVIEW_HEADERS = {"Accept": Consts.mediaTypeIntegrationPreview}
class Installation(github.GithubObject.NonCompletableGithubObject):
"""
- This class represents Installations. The reference can be found here https://developer.github.com/v3/apps/installations/
+ This class represents Installations. The reference can be found here https://docs.github.com/en/rest/reference/apps#installations
"""
def __repr__(self):
@@ -79,7 +79,7 @@ class Installation(github.GithubObject.NonCompletableGithubObject):
def get_repos(self):
"""
- :calls: `GET /installation/repositories `_
+ :calls: `GET /installation/repositories `_
:rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.Repository.Repository`
"""
url_parameters = dict()
diff --git a/github/Invitation.py b/github/Invitation.py
index d246dcfb..971085a0 100644
--- a/github/Invitation.py
+++ b/github/Invitation.py
@@ -27,7 +27,7 @@ import github.GithubObject
class Invitation(github.GithubObject.CompletableGithubObject):
"""
- This class represents repository invitations. The reference can be found here https://developer.github.com/v3/repos/invitations/
+ This class represents repository invitations. The reference can be found here https://docs.github.com/en/rest/reference/repos#invitations
"""
def __repr__(self):
diff --git a/github/Issue.py b/github/Issue.py
index 2ac6afbc..93d31fcb 100644
--- a/github/Issue.py
+++ b/github/Issue.py
@@ -62,7 +62,7 @@ from . import Consts
class Issue(github.GithubObject.CompletableGithubObject):
"""
- This class represents Issues. The reference can be found here https://developer.github.com/v3/issues/
+ This class represents Issues. The reference can be found here https://docs.github.com/en/rest/reference/issues
"""
def __repr__(self):
@@ -272,7 +272,7 @@ class Issue(github.GithubObject.CompletableGithubObject):
def as_pull_request(self):
"""
- :calls: `GET /repos/:owner/:repo/pulls/:number `_
+ :calls: `GET /repos/{owner}/{repo}/pulls/{number} `_
:rtype: :class:`github.PullRequest.PullRequest`
"""
headers, data = self._requester.requestJsonAndCheck(
@@ -284,7 +284,7 @@ class Issue(github.GithubObject.CompletableGithubObject):
def add_to_assignees(self, *assignees):
"""
- :calls: `POST /repos/:owner/:repo/issues/:number/assignees `_
+ :calls: `POST /repos/{owner}/{repo}/issues/{number}/assignees `_
:param assignee: :class:`github.NamedUser.NamedUser` or string
:rtype: None
"""
@@ -307,7 +307,7 @@ class Issue(github.GithubObject.CompletableGithubObject):
def add_to_labels(self, *labels):
"""
- :calls: `POST /repos/:owner/:repo/issues/:number/labels `_
+ :calls: `POST /repos/{owner}/{repo}/issues/{number}/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 `_
+ :calls: `POST /repos/{owner}/{repo}/issues/{number}/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 `_
+ :calls: `DELETE /repos/{owner}/{repo}/issues/{number}/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 `_
+ :calls: `PATCH /repos/{owner}/{repo}/issues/{number}