From babcbcd04fd5605634855f621b8558afc5cbc515 Mon Sep 17 00:00:00 2001 From: Steve Kowalik Date: Fri, 26 Mar 2021 20:43:48 +1100 Subject: [PATCH] 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. --- README.md | 5 +- github/ApplicationOAuth.py | 4 +- github/AuthenticatedUser.py | 102 +++++------ github/Authorization.py | 6 +- github/Branch.py | 50 +++--- github/BranchProtection.py | 2 +- github/CheckRun.py | 4 +- github/CheckSuite.py | 4 +- github/Clones.py | 2 +- github/Commit.py | 18 +- github/CommitCombinedStatus.py | 2 +- github/CommitComment.py | 18 +- github/CommitStatus.py | 2 +- github/Consts.py | 4 +- github/ContentFile.py | 2 +- github/Deployment.py | 8 +- github/DeploymentStatus.py | 2 +- github/Download.py | 4 +- github/Event.py | 2 +- github/Gist.py | 20 +-- github/GistComment.py | 6 +- github/GitBlob.py | 2 +- github/GitCommit.py | 2 +- github/GitRef.py | 6 +- github/GitRelease.py | 12 +- github/GitReleaseAsset.py | 2 +- github/GitTag.py | 2 +- github/GitTree.py | 2 +- github/GitignoreTemplate.py | 2 +- github/Hook.py | 10 +- github/Installation.py | 4 +- github/Invitation.py | 2 +- github/Issue.py | 40 ++--- github/IssueComment.py | 18 +- github/IssueEvent.py | 2 +- github/Label.py | 6 +- github/License.py | 2 +- github/MainClass.py | 58 +++--- github/Membership.py | 2 +- github/Migration.py | 10 +- github/Milestone.py | 8 +- github/NamedUser.py | 36 ++-- github/Notification.py | 4 +- github/NotificationSubject.py | 2 +- github/Organization.py | 72 ++++---- github/PaginatedList.py | 2 +- github/Path.py | 2 +- github/Project.py | 10 +- github/ProjectCard.py | 10 +- github/ProjectColumn.py | 12 +- github/PullRequest.py | 66 +++---- github/PullRequestComment.py | 18 +- github/PullRequestMergeStatus.py | 2 +- github/PullRequestReview.py | 4 +- github/Rate.py | 2 +- github/RateLimit.py | 2 +- github/Reaction.py | 4 +- github/Referrer.py | 2 +- github/Repository.py | 252 +++++++++++++-------------- github/RepositoryKey.py | 4 +- github/Requester.py | 2 +- github/RequiredPullRequestReviews.py | 2 +- github/RequiredStatusChecks.py | 2 +- github/SourceImport.py | 2 +- github/Stargazer.py | 2 +- github/StatsCodeFrequency.py | 2 +- github/StatsCommitActivity.py | 2 +- github/StatsContributor.py | 2 +- github/StatsParticipation.py | 2 +- github/StatsPunchCard.py | 2 +- github/Tag.py | 2 +- github/Team.py | 44 ++--- github/TeamDiscussion.py | 2 +- github/TimelineEvent.py | 2 +- github/TimelineEventSource.py | 2 +- github/Topic.py | 2 +- github/UserKey.py | 4 +- github/View.py | 2 +- github/Workflow.py | 6 +- github/WorkflowRun.py | 8 +- 80 files changed, 529 insertions(+), 530 deletions(-) diff --git a/README.md b/README.md index 8cc74483..9e749abe 100644 --- a/README.md +++ b/README.md @@ -9,11 +9,10 @@ [![codecov](https://codecov.io/gh/PyGithub/PyGithub/branch/master/graph/badge.svg)](https://codecov.io/gh/PyGithub/PyGithub) [![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](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} `_ :param title: string :param body: string :param assignee: string or :class:`github.NamedUser.NamedUser` or None @@ -420,7 +420,7 @@ class Issue(github.GithubObject.CompletableGithubObject): def lock(self, lock_reason): """ - :calls: `PUT /repos/:owner/:repo/issues/:issue_number/lock `_ + :calls: `PUT /repos/{owner}/{repo}/issues/{issue_number}/lock `_ :param lock_reason: string :rtype: None """ @@ -436,7 +436,7 @@ class Issue(github.GithubObject.CompletableGithubObject): def unlock(self): """ - :calls: `DELETE /repos/:owner/:repo/issues/:issue_number/lock `_ + :calls: `DELETE /repos/{owner}/{repo}/issues/{issue_number}/lock `_ :rtype: None """ headers, data = self._requester.requestJsonAndCheck( @@ -445,7 +445,7 @@ class Issue(github.GithubObject.CompletableGithubObject): def get_comment(self, id): """ - :calls: `GET /repos/:owner/:repo/issues/comments/:id `_ + :calls: `GET /repos/{owner}/{repo}/issues/comments/{id} `_ :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 `_ + :calls: `GET /repos/{owner}/{repo}/issues/{number}/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 `_ + :calls: `GET /repos/{owner}/{repo}/issues/{issue_number}/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 `_ + :calls: `GET /repos/{owner}/{repo}/issues/{number}/labels `_ :rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.Label.Label` """ return github.PaginatedList.PaginatedList( @@ -500,7 +500,7 @@ class Issue(github.GithubObject.CompletableGithubObject): def remove_from_assignees(self, *assignees): """ - :calls: `DELETE /repos/:owner/:repo/issues/:number/assignees `_ + :calls: `DELETE /repos/{owner}/{repo}/issues/{number}/assignees `_ :param assignee: :class:`github.NamedUser.NamedUser` or string :rtype: None """ @@ -523,7 +523,7 @@ class Issue(github.GithubObject.CompletableGithubObject): def remove_from_labels(self, label): """ - :calls: `DELETE /repos/:owner/:repo/issues/:number/labels/:name `_ + :calls: `DELETE /repos/{owner}/{repo}/issues/{number}/labels/{name} `_ :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 `_ + :calls: `PUT /repos/{owner}/{repo}/issues/{number}/labels `_ :param labels: list of :class:`github.Label.Label` or strings :rtype: None """ @@ -555,7 +555,7 @@ class Issue(github.GithubObject.CompletableGithubObject): def get_reactions(self): """ - :calls: `GET /repos/:owner/:repo/issues/:number/reactions `_ + :calls: `GET /repos/{owner}/{repo}/issues/{number}/reactions `_ :return: :class: :class:`github.PaginatedList.PaginatedList` of :class:`github.Reaction.Reaction` """ return github.PaginatedList.PaginatedList( @@ -568,7 +568,7 @@ class Issue(github.GithubObject.CompletableGithubObject): def create_reaction(self, reaction_type): """ - :calls: `POST /repos/:owner/:repo/issues/:number/reactions `_ + :calls: `POST /repos/{owner}/{repo}/issues/{number}/reactions `_ :param reaction_type: string :rtype: :class:`github.Reaction.Reaction` """ @@ -586,7 +586,7 @@ class Issue(github.GithubObject.CompletableGithubObject): def delete_reaction(self, reaction_id): """ - :calls: `DELETE /repos/:owner/:repo/issues/:issue_number/reactions/:reaction_id `_ + :calls: `DELETE /repos/{owner}/{repo}/issues/{issue_number}/reactions/{reaction_id} `_ :param reaction_id: integer :rtype: bool """ @@ -600,7 +600,7 @@ class Issue(github.GithubObject.CompletableGithubObject): def get_timeline(self): """ - :calls: `GET /repos/:owner/:repo/issues/:number/timeline `_ + :calls: `GET /repos/{owner}/{repo}/issues/{number}/timeline `_ :return: :class: :class:`github.PaginatedList.PaginatedList` of :class:`github.TimelineEvent.TimelineEvent` """ return github.PaginatedList.PaginatedList( diff --git a/github/IssueComment.py b/github/IssueComment.py index f841087e..ebfd94e9 100644 --- a/github/IssueComment.py +++ b/github/IssueComment.py @@ -40,7 +40,7 @@ from . import Consts class IssueComment(github.GithubObject.CompletableGithubObject): """ - This class represents IssueComments. The reference can be found here https://developer.github.com/v3/issues/comments/ + This class represents IssueComments. The reference can be found here https://docs.github.com/en/rest/reference/issues#comments """ def __repr__(self): @@ -112,14 +112,14 @@ class IssueComment(github.GithubObject.CompletableGithubObject): def delete(self): """ - :calls: `DELETE /repos/:owner/:repo/issues/comments/:id `_ + :calls: `DELETE /repos/{owner}/{repo}/issues/comments/{id} `_ :rtype: None """ headers, data = self._requester.requestJsonAndCheck("DELETE", self.url) def edit(self, body): """ - :calls: `PATCH /repos/:owner/:repo/issues/comments/:id `_ + :calls: `PATCH /repos/{owner}/{repo}/issues/comments/{id} `_ :param body: string :rtype: None """ @@ -134,8 +134,8 @@ class IssueComment(github.GithubObject.CompletableGithubObject): def get_reactions(self): """ - :calls: `GET /repos/:owner/:repo/issues/comments/:id/reactions - `_ + :calls: `GET /repos/{owner}/{repo}/issues/comments/{id}/reactions + `_ :return: :class: :class:`github.PaginatedList.PaginatedList` of :class:`github.Reaction.Reaction` """ return github.PaginatedList.PaginatedList( @@ -148,8 +148,8 @@ class IssueComment(github.GithubObject.CompletableGithubObject): def create_reaction(self, reaction_type): """ - :calls: `POST /repos/:owner/:repo/issues/comments/:id/reactions - `_ + :calls: `POST /repos/{owner}/{repo}/issues/comments/{id}/reactions + `_ :param reaction_type: string :rtype: :class:`github.Reaction.Reaction` """ @@ -167,8 +167,8 @@ class IssueComment(github.GithubObject.CompletableGithubObject): def delete_reaction(self, reaction_id): """ - :calls: `DELETE /repos/:owner/:repo/issues/comments/:comment_id/reactions/:reaction_id - `_ + :calls: `DELETE /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions/{reaction_id} + `_ :param reaction_id: integer :rtype: bool """ diff --git a/github/IssueEvent.py b/github/IssueEvent.py index 35456e86..aea8f0e0 100644 --- a/github/IssueEvent.py +++ b/github/IssueEvent.py @@ -36,7 +36,7 @@ import github.NamedUser class IssueEvent(github.GithubObject.CompletableGithubObject): """ - This class represents IssueEvents. The reference can be found here https://developer.github.com/v3/issues/events/ + This class represents IssueEvents. The reference can be found here https://docs.github.com/en/rest/reference/issues#events """ def __repr__(self): diff --git a/github/Label.py b/github/Label.py index 881ce014..615ff7c4 100644 --- a/github/Label.py +++ b/github/Label.py @@ -38,7 +38,7 @@ from . import Consts class Label(github.GithubObject.CompletableGithubObject): """ - This class represents Labels. The reference can be found here http://developer.github.com/v3/issues/labels/ + This class represents Labels. The reference can be found here http://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 `_ + :calls: `DELETE /repos/{owner}/{repo}/labels/{name} `_ :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 `_ + :calls: `PATCH /repos/{owner}/{repo}/labels/{name} `_ :param name: string :param color: string :param description: string diff --git a/github/License.py b/github/License.py index c6040379..0b1df082 100644 --- a/github/License.py +++ b/github/License.py @@ -25,7 +25,7 @@ import github.GithubObject class License(github.GithubObject.CompletableGithubObject): """ - This class represents Licenses. The reference can be found here https://developer.github.com/v3/licenses/ + This class represents Licenses. The reference can be found here https://docs.github.com/en/rest/reference/licenses """ def __repr__(self): diff --git a/github/MainClass.py b/github/MainClass.py index 1a47db76..3ee3794d 100644 --- a/github/MainClass.py +++ b/github/MainClass.py @@ -197,7 +197,7 @@ class Github: """ Rate limit status for different resources (core/search/graphql). - :calls: `GET /rate_limit `_ + :calls: `GET /rate_limit `_ :rtype: :class:`github.RateLimit.RateLimit` """ headers, data = self.__requester.requestJsonAndCheck("GET", "/rate_limit") @@ -212,7 +212,7 @@ class Github: def get_license(self, key=github.GithubObject.NotSet): """ - :calls: `GET /license/:license `_ + :calls: `GET /license/{license} `_ :param key: string :rtype: :class:`github.License.License` """ @@ -223,7 +223,7 @@ class Github: def get_licenses(self): """ - :calls: `GET /licenses `_ + :calls: `GET /licenses `_ :rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.License.License` """ @@ -235,7 +235,7 @@ class Github: def get_events(self): """ - :calls: `GET /events `_ + :calls: `GET /events `_ :rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.Event.Event` """ @@ -245,7 +245,7 @@ class Github: def get_user(self, login=github.GithubObject.NotSet): """ - :calls: `GET /users/:user `_ or `GET /user `_ + :calls: `GET /users/{user} `_ or `GET /user `_ :param login: string :rtype: :class:`github.NamedUser.NamedUser` or :class:`github.AuthenticatedUser.AuthenticatedUser` """ @@ -264,7 +264,7 @@ class Github: def get_user_by_id(self, user_id): """ - :calls: `GET /user/:id `_ + :calls: `GET /user/{id} `_ :param user_id: int :rtype: :class:`github.NamedUser.NamedUser` """ @@ -276,7 +276,7 @@ class Github: def get_users(self, since=github.GithubObject.NotSet): """ - :calls: `GET /users `_ + :calls: `GET /users `_ :param since: integer :rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.NamedUser.NamedUser` """ @@ -290,7 +290,7 @@ class Github: def get_organization(self, login): """ - :calls: `GET /orgs/:org `_ + :calls: `GET /orgs/{org} `_ :param login: string :rtype: :class:`github.Organization.Organization` """ @@ -302,7 +302,7 @@ class Github: def get_organizations(self, since=github.GithubObject.NotSet): """ - :calls: `GET /organizations `_ + :calls: `GET /organizations `_ :param since: integer :rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.Organization.Organization` """ @@ -319,7 +319,7 @@ class Github: def get_repo(self, full_name_or_id, lazy=False): """ - :calls: `GET /repos/:owner/:repo `_ or `GET /repositories/:id `_ + :calls: `GET /repos/{owner}/{repo} `_ or `GET /repositories/{id} `_ :rtype: :class:`github.Repository.Repository` """ assert isinstance(full_name_or_id, (str, int)), full_name_or_id @@ -336,7 +336,7 @@ class Github: self, since=github.GithubObject.NotSet, visibility=github.GithubObject.NotSet ): """ - :calls: `GET /repositories `_ + :calls: `GET /repositories `_ :param since: integer :param visibility: string ('all','public') :rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.Repository.Repository` @@ -357,7 +357,7 @@ class Github: def get_project(self, id): """ - :calls: `GET /projects/:project_id `_ + :calls: `GET /projects/{project_id} `_ :rtype: :class:`github.Project.Project` :param id: integer """ @@ -370,7 +370,7 @@ class Github: def get_project_column(self, id): """ - :calls: `GET /projects/columns/:column_id `_ + :calls: `GET /projects/columns/{column_id} `_ :rtype: :class:`github.ProjectColumn.ProjectColumn` :param id: integer """ @@ -385,7 +385,7 @@ class Github: def get_gist(self, id): """ - :calls: `GET /gists/:id `_ + :calls: `GET /gists/{id} `_ :param id: string :rtype: :class:`github.Gist.Gist` """ @@ -395,7 +395,7 @@ class Github: def get_gists(self, since=github.GithubObject.NotSet): """ - :calls: `GET /gists/public `_ + :calls: `GET /gists/public `_ :param since: datetime.datetime format YYYY-MM-DDTHH:MM:SSZ :rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.Gist.Gist` """ @@ -417,7 +417,7 @@ class Github: **qualifiers, ): """ - :calls: `GET /search/repositories `_ + :calls: `GET /search/repositories `_ :param query: string :param sort: string ('stars', 'forks', 'updated') :param order: string ('asc', 'desc') @@ -462,7 +462,7 @@ class Github: **qualifiers, ): """ - :calls: `GET /search/users `_ + :calls: `GET /search/users `_ :param query: string :param sort: string ('followers', 'repositories', 'joined') :param order: string ('asc', 'desc') @@ -503,7 +503,7 @@ class Github: **qualifiers, ): """ - :calls: `GET /search/issues `_ + :calls: `GET /search/issues `_ :param query: string :param sort: string ('comments', 'created', 'updated') :param order: string ('asc', 'desc') @@ -542,7 +542,7 @@ class Github: **qualifiers, ): """ - :calls: `GET /search/code `_ + :calls: `GET /search/code `_ :param query: string :param sort: string ('indexed') :param order: string ('asc', 'desc') @@ -591,7 +591,7 @@ class Github: **qualifiers, ): """ - :calls: `GET /search/commits `_ + :calls: `GET /search/commits `_ :param query: string :param sort: string ('author-date', 'committer-date') :param order: string ('asc', 'desc') @@ -631,7 +631,7 @@ class Github: def search_topics(self, query, **qualifiers): """ - :calls: `GET /search/topics `_ + :calls: `GET /search/topics `_ :param query: string :param qualifiers: keyword dict query qualifiers :rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.Topic.Topic` @@ -659,7 +659,7 @@ class Github: def render_markdown(self, text, context=github.GithubObject.NotSet): """ - :calls: `POST /markdown `_ + :calls: `POST /markdown `_ :param text: string :param context: :class:`github.Repository.Repository` :rtype: string @@ -679,7 +679,7 @@ class Github: def get_hook(self, name): """ - :calls: `GET /hooks/:name `_ + :calls: `GET /hooks/{name} `_ :param name: string :rtype: :class:`github.HookDescription.HookDescription` """ @@ -693,7 +693,7 @@ class Github: def get_hooks(self): """ - :calls: `GET /hooks `_ + :calls: `GET /hooks `_ :rtype: list of :class:`github.HookDescription.HookDescription` """ headers, data = self.__requester.requestJsonAndCheck("GET", "/hooks") @@ -706,7 +706,7 @@ class Github: def get_gitignore_templates(self): """ - :calls: `GET /gitignore/templates `_ + :calls: `GET /gitignore/templates `_ :rtype: list of string """ headers, data = self.__requester.requestJsonAndCheck( @@ -716,7 +716,7 @@ class Github: def get_gitignore_template(self, name): """ - :calls: `GET /gitignore/templates/:name `_ + :calls: `GET /gitignore/templates/{name} `_ :rtype: :class:`github.GitignoreTemplate.GitignoreTemplate` """ assert isinstance(name, str), name @@ -729,7 +729,7 @@ class Github: def get_emojis(self): """ - :calls: `GET /emojis `_ + :calls: `GET /emojis `_ :rtype: dictionary of type => url for emoji` """ headers, attributes = self.__requester.requestJsonAndCheck("GET", "/emojis") @@ -778,7 +778,7 @@ class Github: def get_app(self, slug=github.GithubObject.NotSet): """ - :calls: `GET /apps/:slug `_ or `GET /app `_ + :calls: `GET /apps/{slug} `_ or `GET /app `_ :param slug: string :rtype: :class:`github.GithubApp.GithubApp` """ @@ -867,7 +867,7 @@ class GithubIntegration: def get_installation(self, owner, repo): """ - :calls: `GET /repos/:owner/:repo/installation `_ + :calls: `GET /repos/{owner}/{repo}/installation `_ :param owner: str :param repo: str :rtype: :class:`github.Installation.Installation` diff --git a/github/Membership.py b/github/Membership.py index 6eccb343..02f55651 100644 --- a/github/Membership.py +++ b/github/Membership.py @@ -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://developer.github.com/v3/orgs/ + This class represents Membership of an organization. The reference can be found here http://docs.github.com/en/rest/reference/orgs """ def __repr__(self): diff --git a/github/Migration.py b/github/Migration.py index fe512ded..007cd562 100644 --- a/github/Migration.py +++ b/github/Migration.py @@ -39,7 +39,7 @@ from . import Consts class Migration(github.GithubObject.CompletableGithubObject): """ - This class represents Migrations. The reference can be found here http://developer.github.com/v3/migrations/ + This class represents Migrations. The reference can be found here http://docs.github.com/en/rest/reference/migrations """ def __repr__(self): @@ -128,7 +128,7 @@ class Migration(github.GithubObject.CompletableGithubObject): def get_status(self): """ - :calls: `GET /user/migrations/:migration_id `_ + :calls: `GET /user/migrations/{migration_id} `_ :rtype: str """ headers, data = self._requester.requestJsonAndCheck( @@ -139,7 +139,7 @@ class Migration(github.GithubObject.CompletableGithubObject): def get_archive_url(self): """ - :calls: `GET /user/migrations/:migration_id/archive `_ + :calls: `GET /user/migrations/{migration_id}/archive `_ :rtype: str """ headers, data = self._requester.requestJsonAndCheck( @@ -151,7 +151,7 @@ class Migration(github.GithubObject.CompletableGithubObject): def delete(self): """ - :calls: `DELETE /user/migrations/:migration_id/archive `_ + :calls: `DELETE /user/migrations/{migration_id}/archive `_ """ headers, data = self._requester.requestJsonAndCheck( "DELETE", @@ -161,7 +161,7 @@ class Migration(github.GithubObject.CompletableGithubObject): def unlock_repo(self, repo_name): """ - :calls: `DELETE /user/migrations/:migration_id/repos/:repo_name/lock `_ + :calls: `DELETE /user/migrations/{migration_id}/repos/{repo_name}/lock `_ :param repo_name: str :rtype: None """ diff --git a/github/Milestone.py b/github/Milestone.py index 76089050..34fcc05a 100644 --- a/github/Milestone.py +++ b/github/Milestone.py @@ -38,7 +38,7 @@ import github.PaginatedList class Milestone(github.GithubObject.CompletableGithubObject): """ - This class represents Milestones. The reference can be found here http://developer.github.com/v3/issues/milestones/ + This class represents Milestones. The reference can be found here http://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 `_ + :calls: `DELETE /repos/{owner}/{repo}/milestones/{number} `_ :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 `_ + :calls: `PATCH /repos/{owner}/{repo}/milestones/{number} `_ :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 `_ + :calls: `GET /repos/{owner}/{repo}/milestones/{number}/labels `_ :rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.Label.Label` """ return github.PaginatedList.PaginatedList( diff --git a/github/NamedUser.py b/github/NamedUser.py index b2ff528d..233ab03c 100644 --- a/github/NamedUser.py +++ b/github/NamedUser.py @@ -52,7 +52,7 @@ from . import Consts class NamedUser(github.GithubObject.CompletableGithubObject): """ - This class represents NamedUsers. The reference can be found here https://developer.github.com/v3/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-single-user """ def __repr__(self): @@ -430,7 +430,7 @@ class NamedUser(github.GithubObject.CompletableGithubObject): def get_events(self): """ - :calls: `GET /users/:user/events `_ + :calls: `GET /users/{user}/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 `_ + :calls: `GET /users/{user}/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 `_ + :calls: `GET /users/{user}/following `_ :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 `_ + :calls: `GET /users/{user}/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 `_ + :calls: `GET /users/{user}/keys `_ :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 `_ + :calls: `GET /users/{user}/orgs `_ :rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.Organization.Organization` """ return github.PaginatedList.PaginatedList( @@ -491,7 +491,7 @@ class NamedUser(github.GithubObject.CompletableGithubObject): def get_projects(self, state="open"): """ - :calls: `GET /users/:user/projects `_ + :calls: `GET /users/{user}/projects `_ :param state: string :rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.Project.Project` """ @@ -507,7 +507,7 @@ class NamedUser(github.GithubObject.CompletableGithubObject): def get_public_events(self): """ - :calls: `GET /users/:user/events/public `_ + :calls: `GET /users/{user}/events/public `_ :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 `_ + :calls: `GET /users/{user}/received_events/public `_ :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 `_ + :calls: `GET /users/{user}/received_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 `_ + :calls: `GET /repos/{owner}/{repo} `_ :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 `_ + :calls: `GET /users/{user}/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 `_ + :calls: `GET /users/{user}/starred `_ :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 `_ + :calls: `GET /users/{user}/subscriptions `_ :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 `_ + :calls: `GET /users/{user}/watched `_ :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 `_ + :calls: `GET /users/{user}/following/{target_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 `_ + :calls: `GET /orgs/{org}/memberships/{username} `_ :param org: string or :class:`github.Organization.Organization` :rtype: :class:`github.Membership.Membership` """ diff --git a/github/Notification.py b/github/Notification.py index 7f427c8b..a12bc2b8 100644 --- a/github/Notification.py +++ b/github/Notification.py @@ -34,7 +34,7 @@ import github.Repository class Notification(github.GithubObject.CompletableGithubObject): """ - This class represents Notifications. The reference can be found here http://developer.github.com/v3/activity/notifications/ + This class represents Notifications. The reference can be found here http://docs.github.com/en/rest/reference/activity#notifications """ def __repr__(self): @@ -114,7 +114,7 @@ class Notification(github.GithubObject.CompletableGithubObject): def mark_as_read(self): """ - :calls: `PATCH /notifications/threads/:id `_ + :calls: `PATCH /notifications/threads/{id} `_ """ headers, data = self._requester.requestJsonAndCheck( "PATCH", diff --git a/github/NotificationSubject.py b/github/NotificationSubject.py index 9be34885..7de37068 100644 --- a/github/NotificationSubject.py +++ b/github/NotificationSubject.py @@ -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://developer.github.com/v3/activity/notifications/#list-your-notifications + This class represents Subjects of Notifications. The reference can be found here http://docs.github.com/en/rest/reference/activity/notifications#list-your-notifications """ def __repr__(self): diff --git a/github/Organization.py b/github/Organization.py index 3e68c130..02489454 100644 --- a/github/Organization.py +++ b/github/Organization.py @@ -55,7 +55,7 @@ from . import Consts class Organization(github.GithubObject.CompletableGithubObject): """ - This class represents Organizations. The reference can be found here http://developer.github.com/v3/orgs/ + This class represents Organizations. The reference can be found here http://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 `_ + :calls: `PUT /orgs/{org}/memberships/{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 `_ + :calls: `PUT /orgs/{org}/public_members/{user} `_ :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 `_ + :calls: `POST /repos/{owner}/{repo}/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 `_ + :calls: `POST /orgs/{owner}/hooks `_ :param name: string :param config: dict :param events: list of string @@ -439,7 +439,7 @@ class Organization(github.GithubObject.CompletableGithubObject): def create_project(self, name, body=github.GithubObject.NotSet): """ - :calls: `POST /orgs/:org/projects `_ + :calls: `POST /orgs/{org}/projects `_ :param name: string :param body: string :rtype: :class:`github.Project.Project` @@ -477,7 +477,7 @@ class Organization(github.GithubObject.CompletableGithubObject): delete_branch_on_merge=github.GithubObject.NotSet, ): """ - :calls: `POST /orgs/:org/repos `_ + :calls: `POST /orgs/{org}/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 `_ + :calls: `POST /orgs/{org}/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 `_ + :calls: `DELETE /orgs/{owner}/hooks/{id} `_ :param id: integer :rtype: None` """ @@ -652,7 +652,7 @@ class Organization(github.GithubObject.CompletableGithubObject): name=github.GithubObject.NotSet, ): """ - :calls: `PATCH /orgs/:org `_ + :calls: `PATCH /orgs/{org} `_ :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 `_ + :calls: `PATCH /orgs/{owner}/hooks/{id} `_ :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 `_ + :calls: `GET /orgs/{org}/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 `_ + :calls: `GET /orgs/{owner}/hooks/{id} `_ :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 `_ + :calls: `GET /orgs/{owner}/hooks `_ :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 `_ + :calls: `GET /orgs/{org}/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 `_ + :calls: `GET /orgs/{org}/members `_ :param filter_: string :param role: string :rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.NamedUser.NamedUser` @@ -841,7 +841,7 @@ class Organization(github.GithubObject.CompletableGithubObject): def get_projects(self, state=github.GithubObject.NotSet): """ - :calls: `GET /orgs/:org/projects `_ + :calls: `GET /orgs/{org}/projects `_ :rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.Project.Project` :param state: string """ @@ -860,7 +860,7 @@ class Organization(github.GithubObject.CompletableGithubObject): def get_public_members(self): """ - :calls: `GET /orgs/:org/public_members `_ + :calls: `GET /orgs/{org}/public_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 `_ + :calls: `GET /orgs/{org}/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 `_ + :calls: `DELETE /orgs/{org}/outside_collaborators/{username} `_ :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 `_ + :calls: `PUT /orgs/{org}/outside_collaborators/{username} `_ :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 `_ + :calls: `GET /repos/{owner}/{repo} `_ :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 `_ + :calls: `GET /orgs/{org}/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 `_ + :calls: `GET /teams/{id} `_ :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 `_ + :calls: `GET /orgs/{org}/teams/{team_slug} `_ :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 `_ + :calls: `GET /orgs/{org}/teams `_ :rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.Team.Team` """ return github.PaginatedList.PaginatedList( @@ -992,7 +992,7 @@ class Organization(github.GithubObject.CompletableGithubObject): def invitations(self): """ - :calls: `GET /orgs/:org/invitations `_ + :calls: `GET /orgs/{org}/invitations `_ :rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.NamedUser.NamedUser` """ return github.PaginatedList.PaginatedList( @@ -1011,7 +1011,7 @@ class Organization(github.GithubObject.CompletableGithubObject): teams=github.GithubObject.NotSet, ): """ - :calls: `POST /orgs/:org/invitations `_ + :calls: `POST /orgs/{org}/invitations `_ :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 `_ + :calls: `GET /orgs/{org}/members/{user} `_ :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 `_ + :calls: `GET /orgs/{org}/public_members/{user} `_ :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 `_ + :calls: `DELETE /orgs/{org}/memberships/{user} `_ :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 `_ + :calls: `DELETE /orgs/{org}/members/{user} `_ :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 `_ + :calls: `DELETE /orgs/{org}/public_members/{user} `_ :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 `_ + :calls: `POST /orgs/{org}/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 `_ + :calls: `GET /orgs/{org}/migrations `_ :rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.Migration.Migration` """ return github.PaginatedList.PaginatedList( @@ -1156,7 +1156,7 @@ class Organization(github.GithubObject.CompletableGithubObject): def get_installations(self): """ - :calls: `GET /orgs/:org/installations `_ + :calls: `GET /orgs/{org}/installations `_ :rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.Installation.Installation` """ diff --git a/github/PaginatedList.py b/github/PaginatedList.py index 8542e31d..b0c0eab8 100644 --- a/github/PaginatedList.py +++ b/github/PaginatedList.py @@ -90,7 +90,7 @@ class PaginatedListBase: class PaginatedList(PaginatedListBase): """ - This class abstracts the `pagination of the API `_. + This class abstracts the `pagination of the API `_. You can simply enumerate through instances of this class:: diff --git a/github/Path.py b/github/Path.py index 89b9564a..e1d26b96 100644 --- a/github/Path.py +++ b/github/Path.py @@ -30,7 +30,7 @@ import github.GithubObject class Path(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#traffic """ def __repr__(self): diff --git a/github/Project.py b/github/Project.py index 80466ea6..7f261837 100644 --- a/github/Project.py +++ b/github/Project.py @@ -28,7 +28,7 @@ from . import Consts class Project(github.GithubObject.CompletableGithubObject): """ - This class represents Projects. The reference can be found here http://developer.github.com/v3/projects + This class represents Projects. The reference can be found here http://docs.github.com/en/rest/reference/projects """ def __repr__(self): @@ -140,7 +140,7 @@ class Project(github.GithubObject.CompletableGithubObject): def delete(self): """ - :calls: `DELETE /projects/:project_id `_ + :calls: `DELETE /projects/{project_id} `_ :rtype: None """ headers, data = self._requester.requestJsonAndCheck( @@ -156,7 +156,7 @@ class Project(github.GithubObject.CompletableGithubObject): private=github.GithubObject.NotSet, ): """ - :calls: `PATCH /projects/:project_id `_ + :calls: `PATCH /projects/{project_id} `_ :param name: string :param body: string :param state: string @@ -194,7 +194,7 @@ class Project(github.GithubObject.CompletableGithubObject): def get_columns(self): """ - :calls: `GET /projects/:project_id/columns `_ + :calls: `GET /projects/{project_id}/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 `_ + calls: `POST /projects/{project_id}/columns `_ :param name: string """ assert isinstance(name, str), name diff --git a/github/ProjectCard.py b/github/ProjectCard.py index 7d73dce0..f63aae38 100644 --- a/github/ProjectCard.py +++ b/github/ProjectCard.py @@ -33,7 +33,7 @@ from . import Consts class ProjectCard(github.GithubObject.CompletableGithubObject): """ - This class represents Project Cards. The reference can be found here https://developer.github.com/v3/projects/cards + This class represents Project Cards. The reference can be found here https://docs.github.com/en/rest/reference/projects#cards """ def __repr__(self): @@ -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 `_ + :calls: `GET /repos/{owner}/{repo}/pulls/{number} `_ :param content_type: string, optional :rtype: :class:`github.PullRequest.PullRequest` or :class:`github.Issue.Issue` """ @@ -137,7 +137,7 @@ class ProjectCard(github.GithubObject.CompletableGithubObject): def move(self, position, column): """ - :calls: `POST /projects/columns/cards/:card_id/moves `_ + :calls: `POST /projects/columns/cards/{card_id}/moves `_ :param position: string :param column: :class:`github.ProjectColumn.ProjectColumn` or int :rtype: bool @@ -162,7 +162,7 @@ class ProjectCard(github.GithubObject.CompletableGithubObject): def delete(self): """ - :calls: `DELETE /projects/columns/cards/:card_id `_ + :calls: `DELETE /projects/columns/cards/{card_id} `_ :rtype: bool """ status, _, _ = self._requester.requestJson( @@ -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 `_ + :calls: `PATCH /projects/columns/cards/{card_id} `_ :param note: string :param archived: bool :rtype: None diff --git a/github/ProjectColumn.py b/github/ProjectColumn.py index 0700de56..5b0338db 100644 --- a/github/ProjectColumn.py +++ b/github/ProjectColumn.py @@ -29,7 +29,7 @@ from . import Consts class ProjectColumn(github.GithubObject.CompletableGithubObject): """ - This class represents Project Columns. The reference can be found here http://developer.github.com/v3/projects/columns + This class represents Project Columns. The reference can be found here http://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 `_ + :calls: `GET /projects/columns/{column_id}/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 `_ + :calls: `POST /projects/columns/{column_id}/cards `_ :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 `_ + :calls: `POST POST /projects/columns/{column_id}/moves `_ :param position: string :rtype: bool @@ -164,7 +164,7 @@ class ProjectColumn(github.GithubObject.CompletableGithubObject): def delete(self): """ - :calls: `DELETE /projects/columns/:column_id `_ + :calls: `DELETE /projects/columns/{column_id} `_ :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 `_ + :calls: `PATCH /projects/columns/{column_id} `_ :param name: string :rtype: None """ diff --git a/github/PullRequest.py b/github/PullRequest.py index 641f3663..80d0fd43 100644 --- a/github/PullRequest.py +++ b/github/PullRequest.py @@ -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 `_ + :calls: `GET /repos/{owner}/{repo}/issues/{number} `_ :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 `_ + :calls: `POST /repos/{owner}/{repo}/pulls/{number}/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 `_ + :calls: `POST /repos/{owner}/{repo}/pulls/{number}/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 `_ + :calls: `POST /repos/{owner}/{repo}/pulls/{pull_number}/comments/{comment_id}/replies `_ :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 `_ + :calls: `POST /repos/{owner}/{repo}/issues/{number}/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 `_ + :calls: `POST /repos/{owner}/{repo}/pulls/{number}/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 `_ + :calls: `POST /repos/{owner}/{repo}/pulls/{number}/requested_reviewers `_ :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 `_ + :calls: `DELETE /repos/{owner}/{repo}/pulls/{number}/requested_reviewers `_ :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 `_ + :calls: `PATCH /repos/{owner}/{repo}/pulls/{number} `_ :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 `_ + :calls: `GET /repos/{owner}/{repo}/pulls/comments/{number} `_ :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 `_ + :calls: `GET /repos/{owner}/{repo}/pulls/comments/{number} `_ :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 `_ + :calls: `GET /repos/{owner}/{repo}/pulls/{number}/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 `_ + :calls: `GET /repos/{owner}/{repo}/pulls/{number}/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 `_ + :calls: `GET /repos/{owner}/{repo}/pulls/{number}/review/{id}/comments `_ :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 `_ + :calls: `GET /repos/{owner}/{repo}/pulls/{number}/commits `_ :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 `_ + :calls: `GET /repos/{owner}/{repo}/pulls/{number}/files `_ :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 `_ + :calls: `GET /repos/{owner}/{repo}/issues/comments/{id} `_ :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 `_ + :calls: `GET /repos/{owner}/{repo}/issues/{number}/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 `_ + :calls: `GET /repos/{owner}/{repo}/issues/{issue_number}/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 `_ + :calls: `GET /repos/{owner}/{repo}/pulls/{number}/reviews/{id} `_ :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 `_ + :calls: `GET /repos/{owner}/{repo}/pulls/{number}/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 `_ + :calls: `GET /repos/{owner}/{repo}/pulls/{number}/requested_reviewers `_ :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 `_ + :calls: `GET /repos/{owner}/{repo}/issues/{number}/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 `_ + :calls: `POST /repos/{owner}/{repo}/issues/{number}/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 `_ + :calls: `DELETE /repos/{owner}/{repo}/issues/{number}/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 `_ + :calls: `DELETE /repos/{owner}/{repo}/issues/{number}/labels/{name} `_ :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 `_ + :calls: `PUT /repos/{owner}/{repo}/issues/{number}/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 `_ + :calls: `GET /repos/{owner}/{repo}/pulls/{number}/merge `_ :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 `_ + :calls: `PUT /repos/{owner}/{repo}/pulls/{number}/merge `_ :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 `_ + :calls: `POST /repos/{owner}/{repo}/issues/{number}/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 `_ + :calls: `DELETE /repos/{owner}/{repo}/issues/{number}/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 `_ + :calls `PUT /repos/{owner}/{repo}/pulls/{pull_number}/update-branch `_ :param expected_head_sha: string :rtype: bool """ diff --git a/github/PullRequestComment.py b/github/PullRequestComment.py index 55792158..e4022f53 100644 --- a/github/PullRequestComment.py +++ b/github/PullRequestComment.py @@ -41,7 +41,7 @@ from . import Consts class PullRequestComment(github.GithubObject.CompletableGithubObject): """ - This class represents PullRequestComments. The reference can be found here http://developer.github.com/v3/pulls/comments/ + This class represents PullRequestComments. The reference can be found here http://docs.github.com/en/rest/reference/pulls#comments """ def __repr__(self): @@ -169,14 +169,14 @@ class PullRequestComment(github.GithubObject.CompletableGithubObject): def delete(self): """ - :calls: `DELETE /repos/:owner/:repo/pulls/comments/:number `_ + :calls: `DELETE /repos/{owner}/{repo}/pulls/comments/{number} `_ :rtype: None """ headers, data = self._requester.requestJsonAndCheck("DELETE", self.url) def edit(self, body): """ - :calls: `PATCH /repos/:owner/:repo/pulls/comments/:number `_ + :calls: `PATCH /repos/{owner}/{repo}/pulls/comments/{number} `_ :param body: string :rtype: None """ @@ -191,8 +191,8 @@ class PullRequestComment(github.GithubObject.CompletableGithubObject): def get_reactions(self): """ - :calls: `GET /repos/:owner/:repo/pulls/comments/:number/reactions - `_ + :calls: `GET /repos/{owner}/{repo}/pulls/comments/{number}/reactions + `_ :return: :class: :class:`github.PaginatedList.PaginatedList` of :class:`github.Reaction.Reaction` """ return github.PaginatedList.PaginatedList( @@ -205,8 +205,8 @@ class PullRequestComment(github.GithubObject.CompletableGithubObject): def create_reaction(self, reaction_type): """ - :calls: `POST /repos/:owner/:repo/pulls/comments/:number/reactions - `_ + :calls: `POST /repos/{owner}/{repo}/pulls/comments/{number}/reactions + `_ :param reaction_type: string :rtype: :class:`github.Reaction.Reaction` """ @@ -224,8 +224,8 @@ class PullRequestComment(github.GithubObject.CompletableGithubObject): def delete_reaction(self, reaction_id): """ - :calls: `DELETE /repos/:owner/:repo/pulls/comments/:comment_id/reactions/:reaction_id - `_ + :calls: `DELETE /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions/{reaction_id} + `_ :param reaction_id: integer :rtype: bool """ diff --git a/github/PullRequestMergeStatus.py b/github/PullRequestMergeStatus.py index 3ec124e5..a11182a4 100644 --- a/github/PullRequestMergeStatus.py +++ b/github/PullRequestMergeStatus.py @@ -34,7 +34,7 @@ import github.GithubObject class PullRequestMergeStatus(github.GithubObject.NonCompletableGithubObject): """ - This class represents PullRequestMergeStatuses. The reference can be found here http://developer.github.com/v3/pulls/#get-if-a-pull-request-has-been-merged + 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 """ def __repr__(self): diff --git a/github/PullRequestReview.py b/github/PullRequestReview.py index 4aa02dc9..34eed25a 100644 --- a/github/PullRequestReview.py +++ b/github/PullRequestReview.py @@ -30,7 +30,7 @@ import github.NamedUser class PullRequestReview(github.GithubObject.NonCompletableGithubObject): """ - This class represents PullRequestReviews. The reference can be found here https://developer.github.com/v3/pulls/reviews/ + This class represents PullRequestReviews. The reference can be found here https://docs.github.com/en/rest/reference/pulls#reviews """ def __repr__(self): @@ -94,7 +94,7 @@ class PullRequestReview(github.GithubObject.NonCompletableGithubObject): def dismiss(self, message): """ - :calls: `PUT /repos/:owner/:repo/pulls/:number/reviews/:review_id/dismissals `_ + :calls: `PUT /repos/{owner}/{repo}/pulls/{number}/reviews/{review_id}/dismissals `_ :rtype: None """ assert isinstance(message, str), message diff --git a/github/Rate.py b/github/Rate.py index 70b46769..7b38b3d6 100644 --- a/github/Rate.py +++ b/github/Rate.py @@ -30,7 +30,7 @@ import github.GithubObject class Rate(github.GithubObject.NonCompletableGithubObject): """ - This class represents Rates. The reference can be found here http://developer.github.com/v3/rate_limit + This class represents Rates. The reference can be found here http://docs.github.com/en/rest/reference/rate_limit """ def __repr__(self): diff --git a/github/RateLimit.py b/github/RateLimit.py index b40c4780..79703e06 100644 --- a/github/RateLimit.py +++ b/github/RateLimit.py @@ -31,7 +31,7 @@ import github.Rate class RateLimit(github.GithubObject.NonCompletableGithubObject): """ - This class represents RateLimits. The reference can be found here http://developer.github.com/v3/rate_limit + This class represents RateLimits. The reference can be found here http://docs.github.com/en/rest/reference/rate_limit """ def __repr__(self): diff --git a/github/Reaction.py b/github/Reaction.py index f32b642e..306bda5a 100644 --- a/github/Reaction.py +++ b/github/Reaction.py @@ -30,7 +30,7 @@ from . import Consts class Reaction(github.GithubObject.CompletableGithubObject): """ - This class represents Reactions. The reference can be found here https://developer.github.com/v3/reactions/ + This class represents Reactions. The reference can be found here https://docs.github.com/en/rest/reference/reactions """ def __repr__(self): @@ -70,7 +70,7 @@ class Reaction(github.GithubObject.CompletableGithubObject): def delete(self): """ - :calls: `DELETE /reactions/:id `_ + :calls: `DELETE /reactions/{id} `_ :rtype: None """ self._requester.requestJsonAndCheck( diff --git a/github/Referrer.py b/github/Referrer.py index 7a0d03c6..993b5c73 100644 --- a/github/Referrer.py +++ b/github/Referrer.py @@ -30,7 +30,7 @@ import github.GithubObject class Referrer(github.GithubObject.NonCompletableGithubObject): """ This class represents a popylar Referrer 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#traffic """ def __repr__(self): diff --git a/github/Repository.py b/github/Repository.py index d1db84da..835c994e 100644 --- a/github/Repository.py +++ b/github/Repository.py @@ -147,7 +147,7 @@ from . import Consts class Repository(github.GithubObject.CompletableGithubObject): """ - This class represents Repositories. The reference can be found here http://developer.github.com/v3/repos/ + This class represents Repositories. The reference can be found here http://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 `_ + :calls: `PUT /repos/{owner}/{repo}/collaborators/{user} `_ :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 `_ + :calls: `GET /repos/{owner}/{repo}/collaborators/{username}/permission `_ :param collaborator: string or :class:`github.NamedUser.NamedUser` :rtype: string """ @@ -855,7 +855,7 @@ class Repository(github.GithubObject.CompletableGithubObject): def get_pending_invitations(self): """ - :calls: `GET /repos/:owner/:repo/invitations `_ + :calls: `GET /repos/{owner}/{repo}/invitations `_ :rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.Invitation.Invitation` """ return github.PaginatedList.PaginatedList( @@ -867,7 +867,7 @@ class Repository(github.GithubObject.CompletableGithubObject): def remove_invitation(self, invite_id): """ - :calls: `DELETE /repos/:owner/:repo/invitations/:invitation_id `_ + :calls: `DELETE /repos/{owner}/{repo}/invitations/{invitation_id} `_ :rtype: None """ assert isinstance(invite_id, int), invite_id @@ -878,7 +878,7 @@ class Repository(github.GithubObject.CompletableGithubObject): def compare(self, base, head): """ - :calls: `GET /repos/:owner/:repo/compare/:base...:head `_ + :calls: `GET /repos/{owner}/{repo}/compare/{base...:head} `_ :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 `_ + :calls: `POST /repos/{owner}/{repo}/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 `_ + :calls: `POST /repos/{owner}/{repo}/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 `_ + :calls: `POST /repos/{owner}/{repo}/git/refs `_ :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 `_ + :calls: `POST /repos/{owner}/{repo}/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 `_ + :calls: `POST /repos/{owner}/{repo}/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 `_ + :calls: `POST /repos/{owner}/{repo}/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 `_ + :calls: `POST /repos/{owner}/{repo}/hooks `_ :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 `_ + :calls: `POST /repos/{owner}/{repo}/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 `_ + :calls: `POST /repos/{owner}/{repo}/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 `_ + :calls: `POST /repos/{owner}/{repo}/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 `_ + :calls: `POST /repos/{owner}/{repo}/milestones `_ :param title: string :param state: string :param description: string @@ -1314,7 +1314,7 @@ class Repository(github.GithubObject.CompletableGithubObject): def create_project(self, name, body=github.GithubObject.NotSet): """ - :calls: `POST /repos/:owner/:repo/projects `_ + :calls: `POST /repos/{owner}/{repo}/projects `_ :param name: string :param body: string :rtype: :class:`github.Project.Project` @@ -1334,7 +1334,7 @@ class Repository(github.GithubObject.CompletableGithubObject): def create_pull(self, *args, **kwds): """ - :calls: `POST /repos/:owner/:repo/pulls `_ + :calls: `POST /repos/{owner}/{repo}/pulls `_ :param title: string :param body: string :param issue: :class:`github.Issue.Issue` @@ -1400,7 +1400,7 @@ class Repository(github.GithubObject.CompletableGithubObject): self, event_type, client_payload=github.GithubObject.NotSet ): """ - :calls: POST /repos/:owner/:repo/dispatches + :calls: POST /repos/{owner}/{repo}/dispatches :param event_type: string :param client_payload: dict :rtype: bool @@ -1419,7 +1419,7 @@ class Repository(github.GithubObject.CompletableGithubObject): def create_secret(self, secret_name, unencrypted_value): """ - :calls: `PUT /repos/:owner/:repo/actions/secrets/:secret_name `_ + :calls: `PUT /repos/{owner}/{repo}/actions/secrets/{secret_name} `_ :param secret_name: string :param unencrypted_value: string :rtype: bool @@ -1439,7 +1439,7 @@ class Repository(github.GithubObject.CompletableGithubObject): def delete_secret(self, secret_name): """ - :calls: `DELETE /repos/:owner/:repo/actions/secrets/:secret_name `_ + :calls: `DELETE /repos/{owner}/{repo}/actions/secrets/{secret_name} `_ :param secret_name: string :rtype: bool """ @@ -1457,7 +1457,7 @@ class Repository(github.GithubObject.CompletableGithubObject): vcs_password=github.GithubObject.NotSet, ): """ - :calls: `PUT /repos/:owner/:repo/import `_ + :calls: `PUT /repos/{owner}/{repo}/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 `_ + :calls: `DELETE /repos/{owner}/{repo} `_ :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 `_ + :calls: `PATCH /repos/{owner}/{repo} `_ :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://developer.github.com/v3/repos/#edit) + :param archived: bool. Unarchiving repositories is currently not supported through API (https://docs.github.com/en/rest/reference/repos#edit) :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 `_ + :calls: `GET /repos/{owner}/{repo}/{archive_format}/{ref} `_ :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 `_ + :calls: `GET /repos/{owner}/{repo}/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 `_ + :calls: `GET /repos/{owner}/{repo}/branches/{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 `_ + :calls: `GET /repos/{owner}/{repo}/branches `_ :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 `_ + :calls: `GET /repos/{owner}/{repo}/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 `_ + :calls: `GET /repos/{owner}/{repo}/comments/{id} `_ :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 `_ + :calls: `GET /repos/{owner}/{repo}/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 `_ + :calls: `GET /repos/{owner}/{repo}/commits/{sha} `_ :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 `_ + :calls: `GET /repos/{owner}/{repo}/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 `_ + :calls: `GET /repos/{owner}/{repo}/contents/{path} `_ :param path: string :param ref: string :rtype: :class:`github.ContentFile.ContentFile` or a list of them @@ -1819,7 +1819,7 @@ class Repository(github.GithubObject.CompletableGithubObject): environment=github.GithubObject.NotSet, ): """ - :calls: `GET /repos/:owner/:repo/deployments `_ + :calls: `GET /repos/{owner}/{repo}/deployments `_ :param: sha: string :param: ref: string :param: task: string @@ -1851,7 +1851,7 @@ class Repository(github.GithubObject.CompletableGithubObject): def get_deployment(self, id_): """ - :calls: `GET /repos/:owner/:repo/deployments/:deployment_id `_ + :calls: `GET /repos/{owner}/{repo}/deployments/{deployment_id} `_ :param: id_: int :rtype: :class:`github.Deployment.Deployment` """ @@ -1878,7 +1878,7 @@ class Repository(github.GithubObject.CompletableGithubObject): production_environment=github.GithubObject.NotSet, ): """ - :calls: `POST /repos/:owner/:repo/deployments `_ + :calls: `POST /repos/{owner}/{repo}/deployments `_ :param: ref: string :param: task: string :param: auto_merge: bool @@ -1945,7 +1945,7 @@ class Repository(github.GithubObject.CompletableGithubObject): def get_top_referrers(self): """ - :calls: `GET /repos/:owner/:repo/traffic/popular/referrers `_ + :calls: `GET /repos/{owner}/{repo}/traffic/popular/referrers `_ :rtype: :class:`list` of :class:`github.Referrer.Referrer` """ headers, data = self._requester.requestJsonAndCheck( @@ -1959,7 +1959,7 @@ class Repository(github.GithubObject.CompletableGithubObject): def get_top_paths(self): """ - :calls: `GET /repos/:owner/:repo/traffic/popular/paths `_ + :calls: `GET /repos/{owner}/{repo}/traffic/popular/paths `_ :rtype: :class:`list` of :class:`github.Path.Path` """ headers, data = self._requester.requestJsonAndCheck( @@ -1973,7 +1973,7 @@ class Repository(github.GithubObject.CompletableGithubObject): def get_views_traffic(self, per=github.GithubObject.NotSet): """ - :calls: `GET /repos/:owner/:repo/traffic/views `_ + :calls: `GET /repos/{owner}/{repo}/traffic/views `_ :param per: string, must be one of day or week, day by default :rtype: None or list of :class:`github.View.View` """ @@ -1999,7 +1999,7 @@ class Repository(github.GithubObject.CompletableGithubObject): def get_clones_traffic(self, per=github.GithubObject.NotSet): """ - :calls: `GET /repos/:owner/:repo/traffic/clones `_ + :calls: `GET /repos/{owner}/{repo}/traffic/clones `_ :param per: string, must be one of day or week, day by default :rtype: None or list of :class:`github.Clones.Clones` """ @@ -2025,7 +2025,7 @@ class Repository(github.GithubObject.CompletableGithubObject): def get_projects(self, state=github.GithubObject.NotSet): """ - :calls: `GET /repos/:owner/:repo/projects `_ + :calls: `GET /repos/{owner}/{repo}/projects `_ :rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.Project.Project` :param state: string """ @@ -2053,7 +2053,7 @@ class Repository(github.GithubObject.CompletableGithubObject): ): """Create a file in this repository. - :calls: `PUT /repos/:owner/:repo/contents/:path `_ + :calls: `PUT /repos/{owner}/{repo}/contents/{path} `_ :param path: string, (required), path of the file in the repository :param message: string, (required), commit message :param content: string, (required), the actual data in the file @@ -2114,7 +2114,7 @@ class Repository(github.GithubObject.CompletableGithubObject): ): """This method updates a file in a repository - :calls: `PUT /repos/:owner/:repo/contents/:path `_ + :calls: `PUT /repos/{owner}/{repo}/contents/{path} `_ :param path: string, Required. The content path. :param message: string, Required. The commit message. :param content: string, Required. The updated file content, either base64 encoded, or ready to be encoded. @@ -2177,7 +2177,7 @@ class Repository(github.GithubObject.CompletableGithubObject): ): """This method deletes a file in a repository - :calls: `DELETE /repos/:owner/:repo/contents/:path `_ + :calls: `DELETE /repos/{owner}/{repo}/contents/{path} `_ :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 `_ + :calls: `GET /repos/{owner}/{repo}/contents/{path} `_ :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 `_ + :calls: `GET /repos/{owner}/{repo}/contributors `_ :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 `_ + :calls: `GET /repos/{owner}/{repo}/downloads/{id} `_ :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 `_ + :calls: `GET /repos/{owner}/{repo}/downloads `_ :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 `_ + :calls: `GET /repos/{owner}/{repo}/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 `_ + :calls: `GET /repos/{owner}/{repo}/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 `_ + :calls: `POST /repos/{owner}/{repo}/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 `_ + :calls: `GET /repos/{owner}/{repo}/git/blobs/{sha} `_ :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 `_ + :calls: `GET /repos/{owner}/{repo}/git/commits/{sha} `_ :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 `_ + :calls: `GET /repos/{owner}/{repo}/git/refs/{ref} `_ :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 `_ + :calls: `GET /repos/{owner}/{repo}/git/refs `_ :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 ` + :calls: `GET /repos/{owner}/{repo}/git/matching-refs/{ref} ` :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 `_ + :calls: `GET /repos/{owner}/{repo}/git/tags/{sha} `_ :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 `_ + :calls: `GET /repos/{owner}/{repo}/git/trees/{sha} `_ :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 `_ + :calls: `GET /repos/{owner}/{repo}/hooks/{id} `_ :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 `_ + :calls: `GET /repos/{owner}/{repo}/hooks `_ :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 `_ + :calls: `GET /repos/{owner}/{repo}/issues/{number} `_ :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 `_ + :calls: `GET /repos/{owner}/{repo}/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 `_ + :calls: `GET /repos/{owner}/{repo}/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 `_ + :calls: `GET /repos/{owner}/{repo}/issues/events/{id} `_ :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 `_ + :calls: `GET /repos/{owner}/{repo}/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 `_ + :calls: `GET /repos/{owner}/{repo}/keys/{id} `_ :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 `_ + :calls: `GET /repos/{owner}/{repo}/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 `_ + :calls: `GET /repos/{owner}/{repo}/labels/{name} `_ :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 `_ + :calls: `GET /repos/{owner}/{repo}/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 `_ + :calls: `GET /repos/{owner}/{repo}/languages `_ :rtype: dict of string to integer """ headers, data = self._requester.requestJsonAndCheck( @@ -2655,7 +2655,7 @@ class Repository(github.GithubObject.CompletableGithubObject): def get_license(self): """ - :calls: `GET /repos/:owner/:repo/license `_ + :calls: `GET /repos/{owner}/{repo}/license `_ :rtype: :class:`github.ContentFile.ContentFile` """ @@ -2668,7 +2668,7 @@ class Repository(github.GithubObject.CompletableGithubObject): def get_milestone(self, number): """ - :calls: `GET /repos/:owner/:repo/milestones/:number `_ + :calls: `GET /repos/{owner}/{repo}/milestones/{number} `_ :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 `_ + :calls: `GET /repos/{owner}/{repo}/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 `_ + :calls: `GET /networks/{owner}/{repo}/events `_ :rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.Event.Event` """ return github.PaginatedList.PaginatedList( @@ -2726,7 +2726,7 @@ class Repository(github.GithubObject.CompletableGithubObject): def get_public_key(self): """ - :calls: `GET /repos/:owner/:repo/actions/secrets/public-key `_ + :calls: `GET /repos/{owner}/{repo}/actions/secrets/public-key `_ :rtype: :class:`github.PublicKey.PublicKey` """ headers, data = self._requester.requestJsonAndCheck( @@ -2738,7 +2738,7 @@ class Repository(github.GithubObject.CompletableGithubObject): def get_pull(self, number): """ - :calls: `GET /repos/:owner/:repo/pulls/:number `_ + :calls: `GET /repos/{owner}/{repo}/pulls/{number} `_ :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 `_ + :calls: `GET /repos/{owner}/{repo}/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 `_ + :calls: `GET /repos/{owner}/{repo}/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 `_ + :calls: `GET /repos/{owner}/{repo}/pulls/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 `_ + :calls: `GET /repos/{owner}/{repo}/readme `_ :param ref: string :rtype: :class:`github.ContentFile.ContentFile` """ @@ -2860,7 +2860,7 @@ class Repository(github.GithubObject.CompletableGithubObject): def get_self_hosted_runner(self, runner_id): """ - :calls: `GET /repos/:owner/:repo/actions/runners/:id `_ :param runner_id: int :rtype: :class:`github.SelfHostedActionsRunner.SelfHostedActionsRunner` """ @@ -2874,7 +2874,7 @@ class Repository(github.GithubObject.CompletableGithubObject): def get_self_hosted_runners(self): """ - :calls: `GET /repos/:owner/:repo/actions/runners `_ :rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.SelfHostedActionsRunner.SelfHostedActionsRunner` """ return github.PaginatedList.PaginatedList( @@ -2887,7 +2887,7 @@ class Repository(github.GithubObject.CompletableGithubObject): def get_source_import(self): """ - :calls: `GET /repos/:owner/:repo/import `_ + :calls: `GET /repos/{owner}/{repo}/import `_ :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 `_ + :calls: `GET /repos/{owner}/{repo}/stargazers `_ :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 `_ + :calls: `GET /repos/{owner}/{repo}/stargazers `_ :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 `_ + :calls: `GET /repos/{owner}/{repo}/stats/contributors `_ :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 `_ + :calls: `GET /repos/{owner}/{repo}/stats/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 `_ + :calls: `GET /repos/{owner}/{repo}/stats/code_frequency `_ :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 `_ + :calls: `GET /repos/{owner}/{repo}/stats/participation `_ :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 `_ + :calls: `GET /repos/{owner}/{repo}/stats/punch_card `_ :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 `_ + :calls: `GET /repos/{owner}/{repo}/subscribers `_ :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 `_ + :calls: `GET /repos/{owner}/{repo}/tags `_ :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 `_ + :calls: `GET /repos/{owner}/{repo}/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 `_ + :calls: `GET /repos/{owner}/{repo}/releases/{id} `_ :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 `_ + :calls: `GET /repos/{owner}/{repo}/releases/latest `_ :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 `_ + :calls: `GET /repos/{owner}/{repo}/teams `_ :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 `_ + :calls: `GET /repos/{owner}/{repo}/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 `_ + :calls: `GET /repos/{owner}/{repo}/watchers `_ :rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.NamedUser.NamedUser` """ return github.PaginatedList.PaginatedList( @@ -3101,7 +3101,7 @@ class Repository(github.GithubObject.CompletableGithubObject): def get_workflows(self): """ - :calls: `GET /repos/:owner/:repo/actions/workflows `_ + :calls: `GET /repos/{owner}/{repo}/actions/workflows `_ :rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.Workflow.Workflow` """ return github.PaginatedList.PaginatedList( @@ -3114,7 +3114,7 @@ class Repository(github.GithubObject.CompletableGithubObject): def get_workflow(self, id_or_name): """ - :calls: `GET /repos/:owner/:repo/actions/workflows/:workflow_id `_ + :calls: `GET /repos/{owner}/{repo}/actions/workflows/{workflow_id} `_ :param id_or_name: int or string :rtype: :class:`github.Workflow.Workflow` @@ -3133,7 +3133,7 @@ class Repository(github.GithubObject.CompletableGithubObject): status=github.GithubObject.NotSet, ): """ - :calls: `GET /repos/:owner/:repo/actions/runs `_ + :calls: `GET /repos/{owner}/{repo}/actions/runs `_ :param actor: :class:`github.NamedUser.NamedUser` or string :param branch: :class:`github.Branch.Branch` or string :param event: string @@ -3180,7 +3180,7 @@ class Repository(github.GithubObject.CompletableGithubObject): def get_workflow_run(self, id_): """ - :calls: `GET /repos/:owner/:repo/actions/runs/:run_id `_ + :calls: `GET /repos/{owner}/{repo}/actions/runs/{run_id} `_ :param id_: int :rtype: :class:`github.WorkflowRun.WorkflowRun` @@ -3195,7 +3195,7 @@ class Repository(github.GithubObject.CompletableGithubObject): def has_in_assignees(self, assignee): """ - :calls: `GET /repos/:owner/:repo/assignees/:assignee `_ + :calls: `GET /repos/{owner}/{repo}/assignees/{assignee} `_ :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 `_ + :calls: `GET /repos/{owner}/{repo}/collaborators/{user} `_ :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 `_ + :calls: `GET /legacy/issues/search/{owner}/{repository}/{state}/{keyword} `_ :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 `_ + :calls: `GET /repos/{owner}/{repo}/notifications `_ :param all: bool :param participating: bool :param since: datetime.datetime @@ -3316,7 +3316,7 @@ class Repository(github.GithubObject.CompletableGithubObject): def mark_notifications_as_read(self, last_read_at=datetime.datetime.utcnow()): """ - :calls: `PUT /repos/:owner/:repo/notifications `_ + :calls: `PUT /repos/{owner}/{repo}/notifications `_ :param last_read_at: datetime """ assert isinstance(last_read_at, 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 `_ + :calls: `POST /repos/{owner}/{repo}/merges `_ :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 `_ + :calls: `PUT /repos/{owner}/{repo}/topics `_ :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 `_ + :calls: `GET /repos/{owner}/{repo}/vulnerability-alerts `_ :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 `_ + :calls: `PUT /repos/{owner}/{repo}/vulnerability-alerts `_ :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 `_ + :calls: `DELETE /repos/{owner}/{repo}/vulnerability-alerts `_ :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 `_ + :calls: `PUT /repos/{owner}/{repo}/automated-security-fixes `_ :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 `_ + :calls: `DELETE /repos/{owner}/{repo}/automated-security-fixes `_ :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 `_ + :calls: `DELETE /repos/{owner}/{repo}/collaborators/{user} `_ :param collaborator: string or :class:`github.NamedUser.NamedUser` :rtype: None """ @@ -3446,7 +3446,7 @@ class Repository(github.GithubObject.CompletableGithubObject): def remove_self_hosted_runner(self, runner): """ - :calls: `DELETE /repos/:owner/:repo/actions/runners/:runner_id `_ + :calls: `DELETE /repos/{owner}/{repo}/actions/runners/{runner_id} `_ :param runner: int or :class:`github.SelfHostedActionsRunner.SelfHostedActionsRunner` :rtype: bool """ @@ -3464,7 +3464,7 @@ class Repository(github.GithubObject.CompletableGithubObject): def subscribe_to_hub(self, event, callback, secret=github.GithubObject.NotSet): """ - :calls: `POST /hub `_ + :calls: `POST /hub `_ :param event: string :param callback: string :param secret: string @@ -3474,7 +3474,7 @@ class Repository(github.GithubObject.CompletableGithubObject): def unsubscribe_from_hub(self, event, callback): """ - :calls: `POST /hub `_ + :calls: `POST /hub `_ :param event: string :param callback: string :param secret: string @@ -3484,7 +3484,7 @@ class Repository(github.GithubObject.CompletableGithubObject): def create_check_suite(self, head_sha): """ - :calls: `POST /repos/:owner/:repo/check-suites `_ + :calls: `POST /repos/{owner}/{repo}/check-suites `_ :param head_sha: string :rtype: :class:`github.CheckSuite.CheckSuite` """ @@ -3500,7 +3500,7 @@ class Repository(github.GithubObject.CompletableGithubObject): def get_check_suite(self, check_suite_id): """ - :calls: `GET /repos/:owner/:repo/check-suites/:check_suite_id `_ + :calls: `GET /repos/{owner}/{repo}/check-suites/{check_suite_id} `_ :param check_suite_id: int :rtype: :class:`github.CheckSuite.CheckSuite` """ @@ -3517,7 +3517,7 @@ class Repository(github.GithubObject.CompletableGithubObject): def update_check_suites_preferences(self, auto_trigger_checks): """ - :calls: `PATCH /repos/:owner/:repo/check-suites/preferences `_ + :calls: `PATCH /repos/{owner}/{repo}/check-suites/preferences `_ :param auto_trigger_checks: list of dict :rtype: :class:`github.RepositoryPreferences.RepositoryPreferences` """ @@ -3580,7 +3580,7 @@ class Repository(github.GithubObject.CompletableGithubObject): actions=github.GithubObject.NotSet, ): """ - :calls: `POST /repos/:owner/:repo/check-runs `_ + :calls: `POST /repos/{owner}/{repo}/check-runs `_ :param name: string :param head_sha: string :param details_url: string @@ -3648,7 +3648,7 @@ class Repository(github.GithubObject.CompletableGithubObject): def get_check_run(self, check_run_id): """ - :calls: `GET /repos/:owner/:repo/check-runs/:check_run_id `_ + :calls: `GET /repos/{owner}/{repo}/check-runs/{check_run_id} `_ :param check_run_id: int :rtype: :class:`github.CheckRun.CheckRun` """ diff --git a/github/RepositoryKey.py b/github/RepositoryKey.py index 4e7f9e6b..17a7c3d3 100644 --- a/github/RepositoryKey.py +++ b/github/RepositoryKey.py @@ -38,7 +38,7 @@ import github.GithubObject class RepositoryKey(github.GithubObject.CompletableGithubObject): """ - This class represents RepositoryKeys. The reference can be found here http://developer.github.com/v3/repos/#deploy-keys + This class represents RepositoryKeys. The reference can be found here http://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 `_ + :calls: `DELETE /repos/{owner}/{repo}/keys/{id} `_ :rtype: None """ headers, data = self._requester.requestJsonAndCheck("DELETE", self.url) diff --git a/github/Requester.py b/github/Requester.py index bc21da5d..480186a9 100644 --- a/github/Requester.py +++ b/github/Requester.py @@ -344,7 +344,7 @@ class Requester: assert user_agent is not None, ( "github now requires a user-agent. " - "See http://developer.github.com/v3/#user-agent-required" + "See http://docs.github.com/en/rest/reference/#user-agent-required" ) self.__userAgent = user_agent self.__verify = verify diff --git a/github/RequiredPullRequestReviews.py b/github/RequiredPullRequestReviews.py index 70ef469a..6f8fe64e 100644 --- a/github/RequiredPullRequestReviews.py +++ b/github/RequiredPullRequestReviews.py @@ -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://developer.github.com/v3/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/branches#get-pull-request-review-enforcement-of-protected-branch """ def __repr__(self): diff --git a/github/RequiredStatusChecks.py b/github/RequiredStatusChecks.py index 5dc0a460..fa0b9eac 100644 --- a/github/RequiredStatusChecks.py +++ b/github/RequiredStatusChecks.py @@ -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://developer.github.com/v3/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/branches#get-required-status-checks-of-protected-branch """ def __repr__(self): diff --git a/github/SourceImport.py b/github/SourceImport.py index 88c32af2..bd15def2 100644 --- a/github/SourceImport.py +++ b/github/SourceImport.py @@ -26,7 +26,7 @@ from github import Consts class SourceImport(github.GithubObject.CompletableGithubObject): """ - This class represents SourceImports. The reference can be found here https://developer.github.com/v3/migration/source_imports/ + This class represents SourceImports. The reference can be found here https://docs.github.com/en/rest/reference/migration#source_imports """ def __repr__(self): diff --git a/github/Stargazer.py b/github/Stargazer.py index fa50b803..7a49a197 100644 --- a/github/Stargazer.py +++ b/github/Stargazer.py @@ -29,7 +29,7 @@ import github class Stargazer(github.GithubObject.NonCompletableGithubObject): """ - This class represents Stargazers. The reference can be found here https://developer.github.com/v3/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#alternative-response-with-star-creation-timestamps """ def __repr__(self): diff --git a/github/StatsCodeFrequency.py b/github/StatsCodeFrequency.py index eb950b3c..1c27c6a2 100755 --- a/github/StatsCodeFrequency.py +++ b/github/StatsCodeFrequency.py @@ -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://developer.github.com/v3/repos/statistics/#get-the-number-of-additions-and-deletions-per-week + 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 """ @property diff --git a/github/StatsCommitActivity.py b/github/StatsCommitActivity.py index 712232a5..33c56378 100755 --- a/github/StatsCommitActivity.py +++ b/github/StatsCommitActivity.py @@ -29,7 +29,7 @@ import github.GithubObject class StatsCommitActivity(github.GithubObject.NonCompletableGithubObject): """ - This class represents StatsCommitActivities. The reference can be found here http://developer.github.com/v3/repos/statistics/#get-the-last-year-of-commit-activity-data + 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 """ @property diff --git a/github/StatsContributor.py b/github/StatsContributor.py index e8d16028..29f09456 100755 --- a/github/StatsContributor.py +++ b/github/StatsContributor.py @@ -30,7 +30,7 @@ import github.NamedUser class StatsContributor(github.GithubObject.NonCompletableGithubObject): """ - This class represents StatsContributors. The reference can be found here http://developer.github.com/v3/repos/statistics/#get-contributors-list-with-additions-deletions-and-commit-counts + 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 """ class Week(github.GithubObject.NonCompletableGithubObject): diff --git a/github/StatsParticipation.py b/github/StatsParticipation.py index fc41c0f5..cf471739 100755 --- a/github/StatsParticipation.py +++ b/github/StatsParticipation.py @@ -29,7 +29,7 @@ import github.GithubObject class StatsParticipation(github.GithubObject.NonCompletableGithubObject): """ - This class represents StatsParticipations. The reference can be found here http://developer.github.com/v3/repos/statistics/#get-the-weekly-commit-count-for-the-repo-owner-and-everyone-else + 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 """ @property diff --git a/github/StatsPunchCard.py b/github/StatsPunchCard.py index 5aa30163..c3741949 100755 --- a/github/StatsPunchCard.py +++ b/github/StatsPunchCard.py @@ -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://developer.github.com/v3/repos/statistics/#get-the-number-of-commits-per-hour-in-each-day + 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 """ def get(self, day, hour): diff --git a/github/Tag.py b/github/Tag.py index 591bab2b..a32e30e0 100644 --- a/github/Tag.py +++ b/github/Tag.py @@ -35,7 +35,7 @@ import github.GithubObject class Tag(github.GithubObject.NonCompletableGithubObject): """ - This class represents Tags. The reference can be found here https://developer.github.com/v3/repos/#list-tags + This class represents Tags. The reference can be found here https://docs.github.com/en/rest/reference/repos#list-tags """ def __repr__(self): diff --git a/github/Team.py b/github/Team.py index 03c1ef9a..d69073fb 100644 --- a/github/Team.py +++ b/github/Team.py @@ -54,7 +54,7 @@ from . import Consts class Team(github.GithubObject.CompletableGithubObject): """ - This class represents Teams. The reference can be found here http://developer.github.com/v3/orgs/teams/ + This class represents Teams. The reference can be found here http://docs.github.com/en/rest/reference/teams """ def __repr__(self): @@ -167,9 +167,9 @@ class Team(github.GithubObject.CompletableGithubObject): def add_to_members(self, member): """ This API call is deprecated. Use `add_membership` instead. - https://developer.github.com/v3/teams/members/#deprecation-notice-1 + https://docs.github.com/en/rest/reference/teams#add-or-update-team-membership-for-a-user-legacy - :calls: `PUT /teams/:id/members/:user `_ + :calls: `PUT /teams/{id}/members/{user} `_ :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 `_ + :calls: `PUT /teams/{id}/memberships/{user} `_ :param member: :class:`github.Nameduser.NamedUser` :param role: string :rtype: None @@ -202,7 +202,7 @@ class Team(github.GithubObject.CompletableGithubObject): def get_team_membership(self, member): """ - :calls: `GET /orgs/:org/memberships/team/:team_id/:username `_ + :calls: `GET /orgs/{org}/memberships/team/{team_id}/{username} `_ :param member: string or :class:`github.NamedUser.NamedUser` :rtype: :class:`github.Membership.Membership` """ @@ -220,7 +220,7 @@ class Team(github.GithubObject.CompletableGithubObject): def add_to_repos(self, repo): """ - :calls: `PUT /teams/:id/repos/:org/:repo `_ + :calls: `PUT /teams/{id}/repos/{org}/{repo} `_ :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 `_ + :calls: `GET /teams/{id}/repos/{org}/{repo} `_ :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 `_ + :calls: `PUT /teams/{id}/repos/{org}/{repo} `_ :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 `_ + :calls: `PUT /orgs/{org}/teams/{team_slug}/repos/{owner}/{repo} `_ :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 `_ + :calls: `DELETE /teams/{id} `_ :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 `_ + :calls: `PATCH /teams/{id} `_ :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 `_ + :calls: `GET /teams/{id}/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 `_ + :calls: `GET /teams/{id}/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 `_ + :calls: `GET /teams/{id}/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 `_ + :calls: `GET /teams/{id}/repos `_ :rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.Repository.Repository` """ return github.PaginatedList.PaginatedList( @@ -397,7 +397,7 @@ class Team(github.GithubObject.CompletableGithubObject): def invitations(self): """ - :calls: `GET /teams/:id/invitations `_ + :calls: `GET /teams/{id}/invitations `_ :rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.NamedUser.NamedUser` """ 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 `_ + :calls: `GET /teams/{id}/members/{user} `_ :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 `_ + :calls: `GET /teams/{id}/repos/{owner}/{repo} `_ :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 ` + :calls: `DELETE /teams/{team_id}/memberships/{username} ` :param member: :return: """ @@ -446,9 +446,9 @@ class Team(github.GithubObject.CompletableGithubObject): def remove_from_members(self, member): """ This API call is deprecated. Use `remove_membership` instead: - https://developer.github.com/v3/teams/members/#deprecation-notice-2 + https://docs.github.com/en/rest/reference/teams#add-or-update-team-membership-for-a-user-legacy - :calls: `DELETE /teams/:id/members/:user `_ + :calls: `DELETE /teams/{id}/members/{user} `_ :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 `_ + :calls: `DELETE /teams/{id}/repos/{owner}/{repo} `_ :param repo: :class:`github.Repository.Repository` :rtype: None """ diff --git a/github/TeamDiscussion.py b/github/TeamDiscussion.py index 62f8c4f4..3501351e 100644 --- a/github/TeamDiscussion.py +++ b/github/TeamDiscussion.py @@ -27,7 +27,7 @@ import github.NamedUser class TeamDiscussion(github.GithubObject.CompletableGithubObject): """ - This class represents TeamDiscussions. The reference can be found here https://developer.github.com/v3/teams/discussions/ + This class represents TeamDiscussions. The reference can be found here https://docs.github.com/en/rest/reference/teams#discussions """ def __repr__(self): diff --git a/github/TimelineEvent.py b/github/TimelineEvent.py index 2607da98..f2687b99 100644 --- a/github/TimelineEvent.py +++ b/github/TimelineEvent.py @@ -27,7 +27,7 @@ import github.TimelineEventSource class TimelineEvent(github.GithubObject.NonCompletableGithubObject): """ - This class represents IssueTimelineEvents. The reference can be found here https://developer.github.com/v3/issues/timeline/ + This class represents IssueTimelineEvents. The reference can be found here https://docs.github.com/en/rest/reference/issues#timeline """ def __repr__(self): diff --git a/github/TimelineEventSource.py b/github/TimelineEventSource.py index cecaa09d..c64fd88f 100644 --- a/github/TimelineEventSource.py +++ b/github/TimelineEventSource.py @@ -26,7 +26,7 @@ import github.Issue class TimelineEventSource(github.GithubObject.NonCompletableGithubObject): """ - This class represents IssueTimelineEventSource. The reference can be found here https://developer.github.com/v3/issues/timeline/ + This class represents IssueTimelineEventSource. The reference can be found here https://docs.github.com/en/rest/reference/issues#timeline """ def __repr__(self): diff --git a/github/Topic.py b/github/Topic.py index d58837ab..eb3c428f 100644 --- a/github/Topic.py +++ b/github/Topic.py @@ -25,7 +25,7 @@ import github.GithubObject class Topic(github.GithubObject.NonCompletableGithubObject): """ - This class represents topics as used by https://github.com/topics. The object reference can be found here https://developer.github.com/v3/search/#search-topics + This class represents topics as used by https://github.com/topics. The object reference can be found here https://docs.github.com/en/rest/reference/search#search-topics """ def __repr__(self): diff --git a/github/UserKey.py b/github/UserKey.py index 3ac1dde5..a6a34537 100644 --- a/github/UserKey.py +++ b/github/UserKey.py @@ -34,7 +34,7 @@ import github.GithubObject class UserKey(github.GithubObject.CompletableGithubObject): """ - This class represents UserKeys. The reference can be found here http://developer.github.com/v3/users/keys/ + This class represents UserKeys. The reference can be found here http://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 `_ + :calls: `DELETE /user/keys/{id} `_ :rtype: None """ headers, data = self._requester.requestJsonAndCheck("DELETE", self.url) diff --git a/github/View.py b/github/View.py index 5f643bcc..e3f3e495 100644 --- a/github/View.py +++ b/github/View.py @@ -30,7 +30,7 @@ import github.GithubObject class View(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#traffic """ def __repr__(self): diff --git a/github/Workflow.py b/github/Workflow.py index 5fe1b465..8029df5d 100644 --- a/github/Workflow.py +++ b/github/Workflow.py @@ -26,7 +26,7 @@ import github.WorkflowRun class Workflow(github.GithubObject.CompletableGithubObject): """ - This class represents Workflows. The reference can be found here https://developer.github.com/v3/actions/workflows/ + This class represents Workflows. The reference can be found here https://docs.github.com/en/rest/reference/actions#workflows """ def __repr__(self): @@ -106,7 +106,7 @@ class Workflow(github.GithubObject.CompletableGithubObject): def create_dispatch(self, ref, inputs=github.GithubObject.NotSet): """ - :calls: `POST /repos/:owner/:repo/actions/workflows/:workflow_id/dispatches`_ + :calls: `POST /repos/{owner}/{repo}/actions/workflows/{workflow_id}/dispatches `_ :param ref: :class:`github.Branch.Branch` or :class:`github.Tag.Tag` or :class:`github.Commit.Commit` or string :param inputs: dict :rtype: bool @@ -139,7 +139,7 @@ class Workflow(github.GithubObject.CompletableGithubObject): status=github.GithubObject.NotSet, ): """ - :calls: `GET /repos/:owner/:repo/actions/workflows/:workflow_id/runs `_ + :calls: `GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}/runs `_ :param actor: :class:`github.NamedUser.NamedUser` or string :param branch: :class:`github.Branch.Branch` or string :param event: string diff --git a/github/WorkflowRun.py b/github/WorkflowRun.py index 95c9636b..b9748940 100644 --- a/github/WorkflowRun.py +++ b/github/WorkflowRun.py @@ -28,7 +28,7 @@ import github.PullRequest class WorkflowRun(github.GithubObject.CompletableGithubObject): """ - This class represents Workflow Runs. The reference can be found here https://developer.github.com/v3/actions/workflow-runs/ + This class represents Workflow Runs. The reference can be found here https://docs.github.com/en/rest/reference/actions#workflow-runs """ def __repr__(self): @@ -220,7 +220,7 @@ class WorkflowRun(github.GithubObject.CompletableGithubObject): def cancel(self): """ - :calls: `POST /repos/:owner/:repo/actions/runs/:run_id/cancel `_ + :calls: `POST /repos/{owner}/{repo}/actions/runs/{run_id}/cancel `_ :rtype: bool """ status, _, _ = self._requester.requestJson("POST", self.cancel_url) @@ -228,7 +228,7 @@ class WorkflowRun(github.GithubObject.CompletableGithubObject): def rerun(self): """ - :calls: `POST /repos/:owner/:repo/actions/runs/:run_id/rerun `_ + :calls: `POST /repos/{owner}/{repo}/actions/runs/{run_id}/rerun `_ :rtype: bool """ status, _, _ = self._requester.requestJson("POST", self.rerun_url) @@ -236,7 +236,7 @@ class WorkflowRun(github.GithubObject.CompletableGithubObject): def timing(self): """ - :calls: `GET /repos/:owner/:repo/actions/runs/:run_id/timing `_ + :calls: `GET /repos/{owner}/{repo}/actions/runs/{run_id}/timing `_ :rtype: namedtuple with billable and run_duration_ms members """ headers, data = self._requester.requestJsonAndCheck("GET", f"{self.url}/timing")