diff --git a/docs/repos/createForAuthenticatedUser.md b/docs/repos/createForAuthenticatedUser.md index 1fdd151cc..17b5094a1 100644 --- a/docs/repos/createForAuthenticatedUser.md +++ b/docs/repos/createForAuthenticatedUser.md @@ -14,8 +14,8 @@ Creates a new repository for the authenticated user. When using [OAuth](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/), authorizations must include: -- `public_repo` scope or `repo` scope to create a public repository -- `repo` scope to create a private repository +- `public_repo` scope or `repo` scope to create a public repository. Note: For GitHub AE, use `repo` scope to create an internal repository. +- `repo` scope to create a private repository. ```js octokit.repos.createForAuthenticatedUser({ @@ -51,7 +51,7 @@ A URL with more information about the repository. privateno -Whether the repository is private or public. +Whether the repository is private. has_issuesno diff --git a/docs/repos/createInOrg.md b/docs/repos/createInOrg.md index 1e0ab3992..29fed7713 100644 --- a/docs/repos/createInOrg.md +++ b/docs/repos/createInOrg.md @@ -14,7 +14,7 @@ Creates a new repository in the specified organization. The authenticated user m When using [OAuth](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/), authorizations must include: -- `public_repo` scope or `repo` scope to create a public repository +- `public_repo` scope or `repo` scope to create a public repository. Note: For GitHub AE, use `repo` scope to create an internal repository. - `repo` scope to create a private repository ```js @@ -55,12 +55,12 @@ A URL with more information about the repository. privateno -Either `true` to create a private repository or `false` to create a public one. +Whether the repository is private. visibilityno -Can be `public` or `private`. If your organization is associated with an enterprise account using GitHub Enterprise Cloud or GitHub Enterprise Server 2.20+, `visibility` can also be `internal`. For more information, see "[Creating an internal repository](https://help.github.com/en/github/creating-cloning-and-archiving-repositories/about-repository-visibility#about-internal-repositories)" in the GitHub Help documentation. +Can be `public` or `private`. If your organization is associated with an enterprise account using GitHub Enterprise Cloud or GitHub Enterprise Server 2.20+, `visibility` can also be `internal`. Note: For GitHub Enterprise Server and GitHub AE, this endpoint will only list repositories available to all users on the enterprise. For more information, see "[Creating an internal repository](https://help.github.com/en/github/creating-cloning-and-archiving-repositories/about-repository-visibility#about-internal-repositories)" in the GitHub Help documentation. The `visibility` parameter overrides the `private` parameter when you use both parameters with the `nebula-preview` preview header. diff --git a/docs/repos/createUsingTemplate.md b/docs/repos/createUsingTemplate.md index 60ad44c2b..35a54e6a2 100644 --- a/docs/repos/createUsingTemplate.md +++ b/docs/repos/createUsingTemplate.md @@ -14,7 +14,7 @@ Creates a new repository using a repository template. Use the `template_owner` a When using [OAuth](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/), authorizations must include: -- `public_repo` scope or `repo` scope to create a public repository +- `public_repo` scope or `repo` scope to create a public repository. Note: For GitHub AE, use `repo` scope to create an internal repository. - `repo` scope to create a private repository ```js diff --git a/docs/repos/listForAuthenticatedUser.md b/docs/repos/listForAuthenticatedUser.md index 724c02273..ab9488ae8 100644 --- a/docs/repos/listForAuthenticatedUser.md +++ b/docs/repos/listForAuthenticatedUser.md @@ -29,7 +29,7 @@ octokit.repos.listForAuthenticatedUser(); visibilityno -Can be one of `all`, `public`, or `private`. +Can be one of `all`, `public`, or `private`. Note: For GitHub AE, can be one of `all`, `internal`, or `private`. affiliationno @@ -42,7 +42,7 @@ Comma-separated list of values. Can include: typeno -Can be one of `all`, `owner`, `public`, `private`, `member`. Default: `all` +Can be one of `all`, `owner`, `public`, `private`, `member`. Note: For GitHub AE, can be one of `all`, `owner`, `internal`, `private`, `member`. Default: `all` Will cause a `422` error if used in the same request as **visibility** or **affiliation**. Will cause a `422` error if used in the same request as **visibility** or **affiliation**. diff --git a/docs/repos/listForOrg.md b/docs/repos/listForOrg.md index fa1256014..61f256f62 100644 --- a/docs/repos/listForOrg.md +++ b/docs/repos/listForOrg.md @@ -32,7 +32,7 @@ octokit.repos.listForOrg({ typeno -Specifies the types of repositories you want returned. Can be one of `all`, `public`, `private`, `forks`, `sources`, `member`, `internal`. Default: `all`. If your organization is associated with an enterprise account using GitHub Enterprise Cloud or GitHub Enterprise Server 2.20+, `type` can also be `internal`. +Specifies the types of repositories you want returned. Can be one of `all`, `public`, `private`, `forks`, `sources`, `member`, `internal`. Note: For GitHub AE, can be one of `all`, `private`, `forks`, `sources`, `member`, `internal`. Default: `all`. If your organization is associated with an enterprise account using GitHub Enterprise Cloud or GitHub Enterprise Server 2.20+, `type` can also be `internal`. sortno diff --git a/docs/repos/listForUser.md b/docs/repos/listForUser.md index bccb7673b..934b94768 100644 --- a/docs/repos/listForUser.md +++ b/docs/repos/listForUser.md @@ -8,7 +8,7 @@ type: API method # List repositories for a user -Lists public repositories for the specified user. +Lists public repositories for the specified user. Note: For GitHub AE, this endpoint will list internal repositories for the specified user. ```js octokit.repos.listForUser({ diff --git a/docs/repos/listPublic.md b/docs/repos/listPublic.md index 362a86006..1bf37ef70 100644 --- a/docs/repos/listPublic.md +++ b/docs/repos/listPublic.md @@ -10,7 +10,10 @@ type: API method Lists all public repositories in the order that they were created. -Note: Pagination is powered exclusively by the `since` parameter. Use the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header) to get the URL for the next page of repositories. +Notes: + +- For GitHub Enterprise Server and GitHub AE, this endpoint will only list repositories available to all users on the enterprise. +- Pagination is powered exclusively by the `since` parameter. Use the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header) to get the URL for the next page of repositories. ```js octokit.repos.listPublic(); diff --git a/package.json b/package.json index 0edc38ed0..f73eb1731 100644 --- a/package.json +++ b/package.json @@ -14,7 +14,7 @@ "update-endpoints:docs": "node scripts/update-endpoints/docs", "update-endpoints:types": "node scripts/update-endpoints/types" }, - "repository": "https://github.com/octokit/plugin-rest-endpoint-methods.js", + "repository": "github:octokit/plugin-rest-endpoint-methods.js", "keywords": [ "github", "api", diff --git a/scripts/update-endpoints/generated/endpoints.json b/scripts/update-endpoints/generated/endpoints.json index a2a35dc32..b1600e16a 100644 --- a/scripts/update-endpoints/generated/endpoints.json +++ b/scripts/update-endpoints/generated/endpoints.json @@ -34197,7 +34197,7 @@ "url": "/user/repos", "isDeprecated": false, "deprecationDate": null, - "description": "Creates a new repository for the authenticated user.\n\n**OAuth scope requirements**\n\nWhen using [OAuth](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/), authorizations must include:\n\n* `public_repo` scope or `repo` scope to create a public repository\n* `repo` scope to create a private repository", + "description": "Creates a new repository for the authenticated user.\n\n**OAuth scope requirements**\n\nWhen using [OAuth](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/), authorizations must include:\n\n* `public_repo` scope or `repo` scope to create a public repository. Note: For GitHub AE, use `repo` scope to create an internal repository.\n* `repo` scope to create a private repository.", "documentationUrl": "https://docs.github.com/rest/reference/repos/#create-a-repository-for-the-authenticated-user", "previews": [], "headers": [], @@ -34243,7 +34243,7 @@ }, { "name": "private", - "description": "Whether the repository is private or public.", + "description": "Whether the repository is private.", "in": "BODY", "type": "boolean", "required": false, @@ -34527,7 +34527,7 @@ "url": "/orgs/{org}/repos", "isDeprecated": false, "deprecationDate": null, - "description": "Creates a new repository in the specified organization. The authenticated user must be a member of the organization.\n\n**OAuth scope requirements**\n\nWhen using [OAuth](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/), authorizations must include:\n\n* `public_repo` scope or `repo` scope to create a public repository\n* `repo` scope to create a private repository", + "description": "Creates a new repository in the specified organization. The authenticated user must be a member of the organization.\n\n**OAuth scope requirements**\n\nWhen using [OAuth](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/), authorizations must include:\n\n* `public_repo` scope or `repo` scope to create a public repository. Note: For GitHub AE, use `repo` scope to create an internal repository.\n* `repo` scope to create a private repository", "documentationUrl": "https://docs.github.com/rest/reference/repos/#create-an-organization-repository", "previews": [], "headers": [], @@ -34586,7 +34586,7 @@ }, { "name": "private", - "description": "Either `true` to create a private repository or `false` to create a public one.", + "description": "Whether the repository is private.", "in": "BODY", "type": "boolean", "required": false, @@ -34599,7 +34599,7 @@ }, { "name": "visibility", - "description": "Can be `public` or `private`. If your organization is associated with an enterprise account using GitHub Enterprise Cloud or GitHub Enterprise Server 2.20+, `visibility` can also be `internal`. For more information, see \"[Creating an internal repository](https://help.github.com/en/github/creating-cloning-and-archiving-repositories/about-repository-visibility#about-internal-repositories)\" in the GitHub Help documentation. \nThe `visibility` parameter overrides the `private` parameter when you use both parameters with the `nebula-preview` preview header.", + "description": "Can be `public` or `private`. If your organization is associated with an enterprise account using GitHub Enterprise Cloud or GitHub Enterprise Server 2.20+, `visibility` can also be `internal`. Note: For GitHub Enterprise Server and GitHub AE, this endpoint will only list repositories available to all users on the enterprise. For more information, see \"[Creating an internal repository](https://help.github.com/en/github/creating-cloning-and-archiving-repositories/about-repository-visibility#about-internal-repositories)\" in the GitHub Help documentation. \nThe `visibility` parameter overrides the `private` parameter when you use both parameters with the `nebula-preview` preview header.", "in": "BODY", "type": "string", "required": false, @@ -35417,7 +35417,7 @@ "url": "/repos/{template_owner}/{template_repo}/generate", "isDeprecated": false, "deprecationDate": null, - "description": "Creates a new repository using a repository template. Use the `template_owner` and `template_repo` route parameters to specify the repository to use as the template. The authenticated user must own or be a member of an organization that owns the repository. To check if a repository is available to use as a template, get the repository's information using the [Get a repository](https://docs.github.com/rest/reference/repos#get-a-repository) endpoint and check that the `is_template` key is `true`.\n\n**OAuth scope requirements**\n\nWhen using [OAuth](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/), authorizations must include:\n\n* `public_repo` scope or `repo` scope to create a public repository\n* `repo` scope to create a private repository", + "description": "Creates a new repository using a repository template. Use the `template_owner` and `template_repo` route parameters to specify the repository to use as the template. The authenticated user must own or be a member of an organization that owns the repository. To check if a repository is available to use as a template, get the repository's information using the [Get a repository](https://docs.github.com/rest/reference/repos#get-a-repository) endpoint and check that the `is_template` key is `true`.\n\n**OAuth scope requirements**\n\nWhen using [OAuth](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/), authorizations must include:\n\n* `public_repo` scope or `repo` scope to create a public repository. Note: For GitHub AE, use `repo` scope to create an internal repository.\n* `repo` scope to create a private repository", "documentationUrl": "https://docs.github.com/rest/reference/repos/#create-a-repository-using-a-template", "previews": [{ "name": "baptiste" }], "headers": [], @@ -41033,7 +41033,7 @@ "parameters": [ { "name": "visibility", - "description": "Can be one of `all`, `public`, or `private`.", + "description": "Can be one of `all`, `public`, or `private`. Note: For GitHub AE, can be one of `all`, `internal`, or `private`.", "in": "QUERY", "type": "string", "required": false, @@ -41059,7 +41059,7 @@ }, { "name": "type", - "description": "Can be one of `all`, `owner`, `public`, `private`, `member`. Default: `all` \n \nWill cause a `422` error if used in the same request as **visibility** or **affiliation**. Will cause a `422` error if used in the same request as **visibility** or **affiliation**.", + "description": "Can be one of `all`, `owner`, `public`, `private`, `member`. Note: For GitHub AE, can be one of `all`, `owner`, `internal`, `private`, `member`. Default: `all` \n \nWill cause a `422` error if used in the same request as **visibility** or **affiliation**. Will cause a `422` error if used in the same request as **visibility** or **affiliation**.", "in": "QUERY", "type": "string", "required": false, @@ -41198,7 +41198,7 @@ }, { "name": "type", - "description": "Specifies the types of repositories you want returned. Can be one of `all`, `public`, `private`, `forks`, `sources`, `member`, `internal`. Default: `all`. If your organization is associated with an enterprise account using GitHub Enterprise Cloud or GitHub Enterprise Server 2.20+, `type` can also be `internal`.", + "description": "Specifies the types of repositories you want returned. Can be one of `all`, `public`, `private`, `forks`, `sources`, `member`, `internal`. Note: For GitHub AE, can be one of `all`, `private`, `forks`, `sources`, `member`, `internal`. Default: `all`. If your organization is associated with an enterprise account using GitHub Enterprise Cloud or GitHub Enterprise Server 2.20+, `type` can also be `internal`.", "in": "QUERY", "type": "string", "required": false, @@ -41291,7 +41291,7 @@ "url": "/users/{username}/repos", "isDeprecated": false, "deprecationDate": null, - "description": "Lists public repositories for the specified user.", + "description": "Lists public repositories for the specified user. Note: For GitHub AE, this endpoint will list internal repositories for the specified user.", "documentationUrl": "https://docs.github.com/rest/reference/repos/#list-repositories-for-a-user", "previews": [], "headers": [], @@ -41758,7 +41758,7 @@ "url": "/repositories", "isDeprecated": false, "deprecationDate": null, - "description": "Lists all public repositories in the order that they were created.\n\nNote: Pagination is powered exclusively by the `since` parameter. Use the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header) to get the URL for the next page of repositories.", + "description": "Lists all public repositories in the order that they were created.\n\nNotes:\n- For GitHub Enterprise Server and GitHub AE, this endpoint will only list repositories available to all users on the enterprise.\n- Pagination is powered exclusively by the `since` parameter. Use the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header) to get the URL for the next page of repositories.", "documentationUrl": "https://docs.github.com/rest/reference/repos/#list-public-repositories", "previews": [], "headers": [], diff --git a/src/generated/method-types.ts b/src/generated/method-types.ts index 5f2a9b2ba..835e89a15 100644 --- a/src/generated/method-types.ts +++ b/src/generated/method-types.ts @@ -6021,8 +6021,8 @@ export type RestEndpointMethods = { * * When using [OAuth](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/), authorizations must include: * - * * `public_repo` scope or `repo` scope to create a public repository - * * `repo` scope to create a private repository + * * `public_repo` scope or `repo` scope to create a public repository. Note: For GitHub AE, use `repo` scope to create an internal repository. + * * `repo` scope to create a private repository. */ createForAuthenticatedUser: { ( @@ -6052,7 +6052,7 @@ export type RestEndpointMethods = { * * When using [OAuth](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/), authorizations must include: * - * * `public_repo` scope or `repo` scope to create a public repository + * * `public_repo` scope or `repo` scope to create a public repository. Note: For GitHub AE, use `repo` scope to create an internal repository. * * `repo` scope to create a private repository */ createInOrg: { @@ -6123,7 +6123,7 @@ export type RestEndpointMethods = { * * When using [OAuth](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/), authorizations must include: * - * * `public_repo` scope or `repo` scope to create a public repository + * * `public_repo` scope or `repo` scope to create a public repository. Note: For GitHub AE, use `repo` scope to create an internal repository. * * `repo` scope to create a private repository */ createUsingTemplate: { @@ -7224,7 +7224,7 @@ export type RestEndpointMethods = { endpoint: EndpointInterface<{ url: string }>; }; /** - * Lists public repositories for the specified user. + * Lists public repositories for the specified user. Note: For GitHub AE, this endpoint will list internal repositories for the specified user. */ listForUser: { ( @@ -7288,7 +7288,9 @@ export type RestEndpointMethods = { /** * Lists all public repositories in the order that they were created. * - * Note: Pagination is powered exclusively by the `since` parameter. Use the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header) to get the URL for the next page of repositories. + * Notes: + * - For GitHub Enterprise Server and GitHub AE, this endpoint will only list repositories available to all users on the enterprise. + * - Pagination is powered exclusively by the `since` parameter. Use the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header) to get the URL for the next page of repositories. */ listPublic: { (