From 42e85ff4f52cbb18764afb6038bdb73d9b89cc4c Mon Sep 17 00:00:00 2001 From: github-openapi-bot Date: Tue, 26 Apr 2022 22:48:09 -0700 Subject: [PATCH 1/3] Update OpenAPI Descriptions --- .../dereferenced/api.github.com.deref.json | 335 +++++++++++++++++- .../static/dereferenced/ghes-3.1.deref.json | 4 +- .../static/dereferenced/ghes-3.2.deref.json | 4 +- .../static/dereferenced/ghes-3.3.deref.json | 4 +- .../static/dereferenced/ghes-3.4.deref.json | 4 +- .../static/dereferenced/github.ae.deref.json | 4 +- 6 files changed, 337 insertions(+), 18 deletions(-) diff --git a/lib/rest/static/dereferenced/api.github.com.deref.json b/lib/rest/static/dereferenced/api.github.com.deref.json index 68cd4b7fff..1108ff024b 100644 --- a/lib/rest/static/dereferenced/api.github.com.deref.json +++ b/lib/rest/static/dereferenced/api.github.com.deref.json @@ -20043,6 +20043,143 @@ } } }, + "/enterprises/{enterprise}/actions/permissions/workflow": { + "get": { + "summary": "Get default workflow permissions for an enterprise", + "description": "Gets the default workflow permissions granted to the `GITHUB_TOKEN` when running workflows in an enterprise,\nas well as whether GitHub Actions can submit approving pull request reviews. For more information, see\n\"[Enforcing a policy for workflow permissions in your enterprise](https://docs.github.com/enterprise-cloud@latest/admin/policies/enforcing-policies-for-your-enterprise/enforcing-policies-for-github-actions-in-your-enterprise#enforcing-a-policy-for-workflow-permissions-in-your-enterprise).\"\n\nYou must authenticate using an access token with the `admin:enterprise` scope to use this endpoint.\nGitHub Apps must have the `enterprise_administration:write` permission to use this endpoint.", + "tags": [ + "actions" + ], + "operationId": "actions/get-github-actions-default-workflow-permissions-enterprise", + "externalDocs": { + "description": "API method documentation", + "url": "https://docs.github.com/rest/reference/actions#get-default-workflow-permissions-for-an-enterprise" + }, + "parameters": [ + { + "name": "enterprise", + "description": "The slug version of the enterprise name. You can also substitute this value with the enterprise id.", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Success response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "default_workflow_permissions": { + "type": "string", + "description": "The default workflow permissions granted to the GITHUB_TOKEN when running workflows.", + "enum": [ + "read", + "write" + ] + }, + "can_approve_pull_request_reviews": { + "type": "boolean", + "description": "Whether GitHub Actions can approve pull requests. Enabling this can be a security risk." + } + }, + "required": [ + "default_workflow_permissions", + "can_approve_pull_request_reviews" + ] + }, + "examples": { + "default": { + "summary": "Give read-only permission, and allow approving PRs.", + "value": { + "default_workflow_permissions": "read", + "can_approve_pull_request_reviews": true + } + } + } + } + } + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": true, + "category": "actions", + "subcategory": "permissions" + } + }, + "put": { + "summary": "Set default workflow permissions for an enterprise", + "description": "Sets the default workflow permissions granted to the `GITHUB_TOKEN` when running workflows in an enterprise, and sets\nwhether GitHub Actions can submit approving pull request reviews. For more information, see\n\"[Enforcing a policy for workflow permissions in your enterprise](https://docs.github.com/enterprise-cloud@latest/admin/policies/enforcing-policies-for-your-enterprise/enforcing-policies-for-github-actions-in-your-enterprise#enforcing-a-policy-for-workflow-permissions-in-your-enterprise).\"\n\nYou must authenticate using an access token with the `admin:enterprise` scope to use this endpoint.\nGitHub Apps must have the `enterprise_administration:write` permission to use this endpoint.", + "tags": [ + "actions" + ], + "operationId": "actions/set-github-actions-default-workflow-permissions-enterprise", + "externalDocs": { + "description": "API method documentation", + "url": "https://docs.github.com/rest/reference/actions#set-default-workflow-permissions-for-an-enterprise" + }, + "parameters": [ + { + "name": "enterprise", + "description": "The slug version of the enterprise name. You can also substitute this value with the enterprise id.", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "default_workflow_permissions": { + "type": "string", + "description": "The default workflow permissions granted to the GITHUB_TOKEN when running workflows.", + "enum": [ + "read", + "write" + ] + }, + "can_approve_pull_request_reviews": { + "type": "boolean", + "description": "Whether GitHub Actions can approve pull requests. Enabling this can be a security risk." + } + } + }, + "examples": { + "default": { + "summary": "Give read-only permission, and allow approving PRs.", + "value": { + "default_workflow_permissions": "read", + "can_approve_pull_request_reviews": true + } + } + } + } + } + }, + "responses": { + "204": { + "description": "Success response" + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": true, + "category": "actions", + "subcategory": "permissions" + } + } + }, "/enterprises/{enterprise}/actions/runner-groups": { "get": { "summary": "List self-hosted runner groups for an enterprise", @@ -67340,7 +67477,7 @@ "/orgs/{org}/actions/permissions/workflow": { "get": { "summary": "Get default workflow permissions for an organization", - "description": "Gets the default workflow permissions granted to the `GITHUB_TOKEN` when running workflows in an organization,\nas well if GitHub Actions can submit approving pull request reviews.\n\nYou must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API.", + "description": "Gets the default workflow permissions granted to the `GITHUB_TOKEN` when running workflows in an organization,\nas well as whether GitHub Actions can submit approving pull request reviews. For more information, see\n\"[Setting the permissions of the GITHUB_TOKEN for your organization](https://docs.github.com/organizations/managing-organization-settings/disabling-or-limiting-github-actions-for-your-organization#setting-the-permissions-of-the-github_token-for-your-organization).\"\n\nYou must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API.", "tags": [ "actions" ], @@ -67377,7 +67514,7 @@ }, "can_approve_pull_request_reviews": { "type": "boolean", - "description": "Whether GitHub Actions can submit approving pull request reviews." + "description": "Whether GitHub Actions can approve pull requests. Enabling this can be a security risk." } }, "required": [ @@ -67387,6 +67524,7 @@ }, "examples": { "default": { + "summary": "Give read-only permission, and allow approving PRs.", "value": { "default_workflow_permissions": "read", "can_approve_pull_request_reviews": true @@ -67406,7 +67544,7 @@ }, "put": { "summary": "Set default workflow permissions for an organization", - "description": "Sets the default workflow permissions granted to the `GITHUB_TOKEN` when running workflows in an organization, and sets if GitHub Actions\ncan submit approving pull request reviews.\n\nYou must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API.", + "description": "Sets the default workflow permissions granted to the `GITHUB_TOKEN` when running workflows in an organization, and sets if GitHub Actions\ncan submit approving pull request reviews. For more information, see\n\"[Setting the permissions of the GITHUB_TOKEN for your organization](https://docs.github.com/organizations/managing-organization-settings/disabling-or-limiting-github-actions-for-your-organization#setting-the-permissions-of-the-github_token-for-your-organization).\"\n\nYou must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API.", "tags": [ "actions" ], @@ -67427,7 +67565,10 @@ ], "responses": { "204": { - "description": "Response" + "description": "Success response" + }, + "409": { + "description": "Conflict response when changing a setting is prevented by the owning enterprise" } }, "requestBody": { @@ -67447,12 +67588,13 @@ }, "can_approve_pull_request_reviews": { "type": "boolean", - "description": "Whether GitHub Actions can submit approving pull request reviews." + "description": "Whether GitHub Actions can approve pull requests. Enabling this can be a security risk." } } }, "examples": { "default": { + "summary": "Give read-only permission, and allow approving PRs.", "value": { "default_workflow_permissions": "read", "can_approve_pull_request_reviews": true @@ -79284,6 +79426,29 @@ "type": "string" } }, + { + "name": "tool_name", + "description": "The name of a code scanning tool. Only results by this tool will be listed. You can specify the tool by using either `tool_name` or `tool_guid`, but not both.", + "in": "query", + "required": false, + "schema": { + "type": "string", + "description": "The name of the tool used to generate the code scanning analysis." + } + }, + { + "name": "tool_guid", + "description": "The GUID of a code scanning tool. Only results by this tool will be listed. Note that some code scanning tools may not include a GUID in their analysis data. You can specify the tool by using either `tool_guid` or `tool_name`, but not both.", + "in": "query", + "required": false, + "schema": { + "type": [ + "string", + "null" + ], + "description": "The GUID of the tool used to generate the code scanning analysis, if provided in the uploaded SARIF data." + } + }, { "name": "before", "description": "A cursor, as given in the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for events before this cursor.", @@ -79336,7 +79501,7 @@ }, { "name": "state", - "description": "Set to `open`, `closed, `fixed`, or `dismissed` to list code scanning alerts in a specific state.", + "description": "Set to `open`, `closed`, `fixed`, or `dismissed` to list code scanning alerts in a specific state.", "in": "query", "required": false, "schema": { @@ -161528,6 +161693,160 @@ } } }, + "/repos/{owner}/{repo}/actions/permissions/workflow": { + "get": { + "summary": "Get default workflow permissions for a repository", + "description": "Gets the default workflow permissions granted to the `GITHUB_TOKEN` when running workflows in a repository,\nas well as if GitHub Actions can submit approving pull request reviews.\nFor more information, see \"[Setting the permissions of the GITHUB_TOKEN for your repository](https://docs.github.com/repositories/managing-your-repositorys-settings-and-features/enabling-features-for-your-repository/managing-github-actions-settings-for-a-repository#setting-the-permissions-of-the-github_token-for-your-repository).\"\n\nYou must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the repository `administration` permission to use this API.", + "tags": [ + "actions" + ], + "operationId": "actions/get-github-actions-default-workflow-permissions-repository", + "externalDocs": { + "description": "API method documentation", + "url": "https://docs.github.com/rest/reference/actions#get-default-workflow-permissions-for-a-repository" + }, + "parameters": [ + { + "name": "owner", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "default_workflow_permissions": { + "type": "string", + "description": "The default workflow permissions granted to the GITHUB_TOKEN when running workflows.", + "enum": [ + "read", + "write" + ] + }, + "can_approve_pull_request_reviews": { + "type": "boolean", + "description": "Whether GitHub Actions can approve pull requests. Enabling this can be a security risk." + } + }, + "required": [ + "default_workflow_permissions", + "can_approve_pull_request_reviews" + ] + }, + "examples": { + "default": { + "summary": "Give read-only permission, and allow approving PRs.", + "value": { + "default_workflow_permissions": "read", + "can_approve_pull_request_reviews": true + } + } + } + } + } + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": true, + "category": "actions", + "subcategory": "permissions" + } + }, + "put": { + "summary": "Set default workflow permissions for a repository", + "description": "Sets the default workflow permissions granted to the `GITHUB_TOKEN` when running workflows in a repository, and sets if GitHub Actions\ncan submit approving pull request reviews.\nFor more information, see \"[Setting the permissions of the GITHUB_TOKEN for your repository](https://docs.github.com/repositories/managing-your-repositorys-settings-and-features/enabling-features-for-your-repository/managing-github-actions-settings-for-a-repository#setting-the-permissions-of-the-github_token-for-your-repository).\"\n\nYou must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the repository `administration` permission to use this API.", + "tags": [ + "actions" + ], + "operationId": "actions/set-github-actions-default-workflow-permissions-repository", + "externalDocs": { + "description": "API method documentation", + "url": "https://docs.github.com/rest/reference/actions#set-default-workflow-permissions-for-a-repository" + }, + "parameters": [ + { + "name": "owner", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "Success response" + }, + "409": { + "description": "Conflict response when changing a setting is prevented by the owning organization or enterprise" + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "default_workflow_permissions": { + "type": "string", + "description": "The default workflow permissions granted to the GITHUB_TOKEN when running workflows.", + "enum": [ + "read", + "write" + ] + }, + "can_approve_pull_request_reviews": { + "type": "boolean", + "description": "Whether GitHub Actions can approve pull requests. Enabling this can be a security risk." + } + } + }, + "examples": { + "default": { + "summary": "Give read-only permission, and allow approving PRs.", + "value": { + "default_workflow_permissions": "read", + "can_approve_pull_request_reviews": true + } + } + } + } + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": true, + "category": "actions", + "subcategory": "permissions" + } + } + }, "/repos/{owner}/{repo}/actions/runners": { "get": { "summary": "List self-hosted runners for a repository", @@ -243237,7 +243556,7 @@ }, "put": { "summary": "Add a repository collaborator", - "description": "This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See \"[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)\" and \"[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)\" for details.\n\nAdding an outside collaborator may be restricted by enterprise administrators. For more information, see \"[Enforcing repository management policies in your enterprise](https://docs.github.com/enterprise-cloud@latest/admin/policies/enforcing-policies-for-your-enterprise/enforcing-repository-management-policies-in-your-enterprise#enforcing-a-policy-for-inviting-outside-collaborators-to-repositories).\"\n\nFor more information on permission levels, see \"[Repository permission levels for an organization](https://docs.github.com/github/setting-up-and-managing-organizations-and-teams/repository-permission-levels-for-an-organization#permission-levels-for-repositories-owned-by-an-organization)\". There are restrictions on which permissions can be granted to organization members when an organization base role is in place. In this case, the permission being given must be equal to or higher than the org base permission. Otherwise, the request will fail with:\n\n```\nCannot assign {member} permission of {role name}\n```\n\nNote that, if you choose not to pass any parameters, you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see \"[HTTP verbs](https://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs).\"\n\nThe invitee will receive a notification that they have been invited to the repository, which they must accept or decline. They may do this via the notifications page, the email they receive, or by using the [repository invitations API endpoints](https://docs.github.com/rest/reference/repos#invitations).\n\n**Rate limits**\n\nYou are limited to sending 50 invitations to a repository per 24 hour period. Note there is no limit if you are inviting organization members to an organization repository.", + "description": "This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See \"[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)\" and \"[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)\" for details.\n\nAdding an outside collaborator may be restricted by enterprise administrators. For more information, see \"[Enforcing repository management policies in your enterprise](https://docs.github.com/enterprise-cloud@latest/admin/policies/enforcing-policies-for-your-enterprise/enforcing-repository-management-policies-in-your-enterprise#enforcing-a-policy-for-inviting-outside-collaborators-to-repositories).\"\n\nFor more information on permission levels, see \"[Repository permission levels for an organization](https://docs.github.com/github/setting-up-and-managing-organizations-and-teams/repository-permission-levels-for-an-organization#permission-levels-for-repositories-owned-by-an-organization)\". There are restrictions on which permissions can be granted to organization members when an organization base role is in place. In this case, the permission being given must be equal to or higher than the org base permission. Otherwise, the request will fail with:\n\n```\nCannot assign {member} permission of {role name}\n```\n\nNote that, if you choose not to pass any parameters, you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see \"[HTTP verbs](https://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs).\"\n\nThe invitee will receive a notification that they have been invited to the repository, which they must accept or decline. They may do this via the notifications page, the email they receive, or by using the [repository invitations API endpoints](https://docs.github.com/rest/reference/repos#invitations).\n\n**Updating an existing collaborator's permission level**\n\nThe endpoint can also be used to change the permissions of an existing collaborator without first removing and re-adding the collaborator. To change the permissions, use the same endpoint and pass a different `permission` parameter. The response will be a `204`, with no other indication that the permission level changed.\n\n**Rate limits**\n\nYou are limited to sending 50 invitations to a repository per 24 hour period. Note there is no limit if you are inviting organization members to an organization repository.", "tags": [ "repos" ], @@ -275735,7 +276054,7 @@ "properties": { "event_type": { "type": "string", - "description": "A custom webhook event name.", + "description": "A custom webhook event name. Must be 100 characters or fewer.", "minLength": 1, "maxLength": 100 }, diff --git a/lib/rest/static/dereferenced/ghes-3.1.deref.json b/lib/rest/static/dereferenced/ghes-3.1.deref.json index f2d20bf06f..2792c14ed4 100644 --- a/lib/rest/static/dereferenced/ghes-3.1.deref.json +++ b/lib/rest/static/dereferenced/ghes-3.1.deref.json @@ -189362,7 +189362,7 @@ }, "put": { "summary": "Add a repository collaborator", - "description": "This endpoint triggers [notifications](https://docs.github.com/enterprise-server@3.1/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See \"[Secondary rate limits](https://docs.github.com/enterprise-server@3.1/rest/overview/resources-in-the-rest-api#secondary-rate-limits)\" and \"[Dealing with secondary rate limits](https://docs.github.com/enterprise-server@3.1/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)\" for details.\n\nFor more information on permission levels, see \"[Repository permission levels for an organization](https://docs.github.com/enterprise-server@3.1/github/setting-up-and-managing-organizations-and-teams/repository-permission-levels-for-an-organization#permission-levels-for-repositories-owned-by-an-organization)\". There are restrictions on which permissions can be granted to organization members when an organization base role is in place. In this case, the permission being given must be equal to or higher than the org base permission. Otherwise, the request will fail with:\n\n```\nCannot assign {member} permission of {role name}\n```\n\nNote that, if you choose not to pass any parameters, you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see \"[HTTP verbs](https://docs.github.com/enterprise-server@3.1/rest/overview/resources-in-the-rest-api#http-verbs).\"\n\nThe invitee will receive a notification that they have been invited to the repository, which they must accept or decline. They may do this via the notifications page, the email they receive, or by using the [repository invitations API endpoints](https://docs.github.com/enterprise-server@3.1/rest/reference/repos#invitations).\n\n**Rate limits**\n\nYou are limited to sending 50 invitations to a repository per 24 hour period. Note there is no limit if you are inviting organization members to an organization repository.", + "description": "This endpoint triggers [notifications](https://docs.github.com/enterprise-server@3.1/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See \"[Secondary rate limits](https://docs.github.com/enterprise-server@3.1/rest/overview/resources-in-the-rest-api#secondary-rate-limits)\" and \"[Dealing with secondary rate limits](https://docs.github.com/enterprise-server@3.1/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)\" for details.\n\nFor more information on permission levels, see \"[Repository permission levels for an organization](https://docs.github.com/enterprise-server@3.1/github/setting-up-and-managing-organizations-and-teams/repository-permission-levels-for-an-organization#permission-levels-for-repositories-owned-by-an-organization)\". There are restrictions on which permissions can be granted to organization members when an organization base role is in place. In this case, the permission being given must be equal to or higher than the org base permission. Otherwise, the request will fail with:\n\n```\nCannot assign {member} permission of {role name}\n```\n\nNote that, if you choose not to pass any parameters, you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see \"[HTTP verbs](https://docs.github.com/enterprise-server@3.1/rest/overview/resources-in-the-rest-api#http-verbs).\"\n\nThe invitee will receive a notification that they have been invited to the repository, which they must accept or decline. They may do this via the notifications page, the email they receive, or by using the [repository invitations API endpoints](https://docs.github.com/enterprise-server@3.1/rest/reference/repos#invitations).\n\n**Updating an existing collaborator's permission level**\n\nThe endpoint can also be used to change the permissions of an existing collaborator without first removing and re-adding the collaborator. To change the permissions, use the same endpoint and pass a different `permission` parameter. The response will be a `204`, with no other indication that the permission level changed.\n\n**Rate limits**\n\nYou are limited to sending 50 invitations to a repository per 24 hour period. Note there is no limit if you are inviting organization members to an organization repository.", "tags": [ "repos" ], @@ -221063,7 +221063,7 @@ "properties": { "event_type": { "type": "string", - "description": "A custom webhook event name.", + "description": "A custom webhook event name. Must be 100 characters or fewer.", "minLength": 1, "maxLength": 100 }, diff --git a/lib/rest/static/dereferenced/ghes-3.2.deref.json b/lib/rest/static/dereferenced/ghes-3.2.deref.json index 1cc6738894..cd37572ec1 100644 --- a/lib/rest/static/dereferenced/ghes-3.2.deref.json +++ b/lib/rest/static/dereferenced/ghes-3.2.deref.json @@ -193773,7 +193773,7 @@ }, "put": { "summary": "Add a repository collaborator", - "description": "This endpoint triggers [notifications](https://docs.github.com/enterprise-server@3.2/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See \"[Secondary rate limits](https://docs.github.com/enterprise-server@3.2/rest/overview/resources-in-the-rest-api#secondary-rate-limits)\" and \"[Dealing with secondary rate limits](https://docs.github.com/enterprise-server@3.2/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)\" for details.\n\nFor more information on permission levels, see \"[Repository permission levels for an organization](https://docs.github.com/enterprise-server@3.2/github/setting-up-and-managing-organizations-and-teams/repository-permission-levels-for-an-organization#permission-levels-for-repositories-owned-by-an-organization)\". There are restrictions on which permissions can be granted to organization members when an organization base role is in place. In this case, the permission being given must be equal to or higher than the org base permission. Otherwise, the request will fail with:\n\n```\nCannot assign {member} permission of {role name}\n```\n\nNote that, if you choose not to pass any parameters, you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see \"[HTTP verbs](https://docs.github.com/enterprise-server@3.2/rest/overview/resources-in-the-rest-api#http-verbs).\"\n\nThe invitee will receive a notification that they have been invited to the repository, which they must accept or decline. They may do this via the notifications page, the email they receive, or by using the [repository invitations API endpoints](https://docs.github.com/enterprise-server@3.2/rest/reference/repos#invitations).\n\n**Rate limits**\n\nYou are limited to sending 50 invitations to a repository per 24 hour period. Note there is no limit if you are inviting organization members to an organization repository.", + "description": "This endpoint triggers [notifications](https://docs.github.com/enterprise-server@3.2/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See \"[Secondary rate limits](https://docs.github.com/enterprise-server@3.2/rest/overview/resources-in-the-rest-api#secondary-rate-limits)\" and \"[Dealing with secondary rate limits](https://docs.github.com/enterprise-server@3.2/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)\" for details.\n\nFor more information on permission levels, see \"[Repository permission levels for an organization](https://docs.github.com/enterprise-server@3.2/github/setting-up-and-managing-organizations-and-teams/repository-permission-levels-for-an-organization#permission-levels-for-repositories-owned-by-an-organization)\". There are restrictions on which permissions can be granted to organization members when an organization base role is in place. In this case, the permission being given must be equal to or higher than the org base permission. Otherwise, the request will fail with:\n\n```\nCannot assign {member} permission of {role name}\n```\n\nNote that, if you choose not to pass any parameters, you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see \"[HTTP verbs](https://docs.github.com/enterprise-server@3.2/rest/overview/resources-in-the-rest-api#http-verbs).\"\n\nThe invitee will receive a notification that they have been invited to the repository, which they must accept or decline. They may do this via the notifications page, the email they receive, or by using the [repository invitations API endpoints](https://docs.github.com/enterprise-server@3.2/rest/reference/repos#invitations).\n\n**Updating an existing collaborator's permission level**\n\nThe endpoint can also be used to change the permissions of an existing collaborator without first removing and re-adding the collaborator. To change the permissions, use the same endpoint and pass a different `permission` parameter. The response will be a `204`, with no other indication that the permission level changed.\n\n**Rate limits**\n\nYou are limited to sending 50 invitations to a repository per 24 hour period. Note there is no limit if you are inviting organization members to an organization repository.", "tags": [ "repos" ], @@ -225549,7 +225549,7 @@ "properties": { "event_type": { "type": "string", - "description": "A custom webhook event name.", + "description": "A custom webhook event name. Must be 100 characters or fewer.", "minLength": 1, "maxLength": 100 }, diff --git a/lib/rest/static/dereferenced/ghes-3.3.deref.json b/lib/rest/static/dereferenced/ghes-3.3.deref.json index 59164a6fe3..9746afea64 100644 --- a/lib/rest/static/dereferenced/ghes-3.3.deref.json +++ b/lib/rest/static/dereferenced/ghes-3.3.deref.json @@ -197327,7 +197327,7 @@ }, "put": { "summary": "Add a repository collaborator", - "description": "This endpoint triggers [notifications](https://docs.github.com/enterprise-server@3.3/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See \"[Secondary rate limits](https://docs.github.com/enterprise-server@3.3/rest/overview/resources-in-the-rest-api#secondary-rate-limits)\" and \"[Dealing with secondary rate limits](https://docs.github.com/enterprise-server@3.3/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)\" for details.\n\nFor more information on permission levels, see \"[Repository permission levels for an organization](https://docs.github.com/enterprise-server@3.3/github/setting-up-and-managing-organizations-and-teams/repository-permission-levels-for-an-organization#permission-levels-for-repositories-owned-by-an-organization)\". There are restrictions on which permissions can be granted to organization members when an organization base role is in place. In this case, the permission being given must be equal to or higher than the org base permission. Otherwise, the request will fail with:\n\n```\nCannot assign {member} permission of {role name}\n```\n\nNote that, if you choose not to pass any parameters, you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see \"[HTTP verbs](https://docs.github.com/enterprise-server@3.3/rest/overview/resources-in-the-rest-api#http-verbs).\"\n\nThe invitee will receive a notification that they have been invited to the repository, which they must accept or decline. They may do this via the notifications page, the email they receive, or by using the [repository invitations API endpoints](https://docs.github.com/enterprise-server@3.3/rest/reference/repos#invitations).\n\n**Rate limits**\n\nYou are limited to sending 50 invitations to a repository per 24 hour period. Note there is no limit if you are inviting organization members to an organization repository.", + "description": "This endpoint triggers [notifications](https://docs.github.com/enterprise-server@3.3/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See \"[Secondary rate limits](https://docs.github.com/enterprise-server@3.3/rest/overview/resources-in-the-rest-api#secondary-rate-limits)\" and \"[Dealing with secondary rate limits](https://docs.github.com/enterprise-server@3.3/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)\" for details.\n\nFor more information on permission levels, see \"[Repository permission levels for an organization](https://docs.github.com/enterprise-server@3.3/github/setting-up-and-managing-organizations-and-teams/repository-permission-levels-for-an-organization#permission-levels-for-repositories-owned-by-an-organization)\". There are restrictions on which permissions can be granted to organization members when an organization base role is in place. In this case, the permission being given must be equal to or higher than the org base permission. Otherwise, the request will fail with:\n\n```\nCannot assign {member} permission of {role name}\n```\n\nNote that, if you choose not to pass any parameters, you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see \"[HTTP verbs](https://docs.github.com/enterprise-server@3.3/rest/overview/resources-in-the-rest-api#http-verbs).\"\n\nThe invitee will receive a notification that they have been invited to the repository, which they must accept or decline. They may do this via the notifications page, the email they receive, or by using the [repository invitations API endpoints](https://docs.github.com/enterprise-server@3.3/rest/reference/repos#invitations).\n\n**Updating an existing collaborator's permission level**\n\nThe endpoint can also be used to change the permissions of an existing collaborator without first removing and re-adding the collaborator. To change the permissions, use the same endpoint and pass a different `permission` parameter. The response will be a `204`, with no other indication that the permission level changed.\n\n**Rate limits**\n\nYou are limited to sending 50 invitations to a repository per 24 hour period. Note there is no limit if you are inviting organization members to an organization repository.", "tags": [ "repos" ], @@ -228984,7 +228984,7 @@ "properties": { "event_type": { "type": "string", - "description": "A custom webhook event name.", + "description": "A custom webhook event name. Must be 100 characters or fewer.", "minLength": 1, "maxLength": 100 }, diff --git a/lib/rest/static/dereferenced/ghes-3.4.deref.json b/lib/rest/static/dereferenced/ghes-3.4.deref.json index 7c3b0126c7..c0b71094f8 100644 --- a/lib/rest/static/dereferenced/ghes-3.4.deref.json +++ b/lib/rest/static/dereferenced/ghes-3.4.deref.json @@ -213145,7 +213145,7 @@ }, "put": { "summary": "Add a repository collaborator", - "description": "This endpoint triggers [notifications](https://docs.github.com/enterprise-server@3.4/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See \"[Secondary rate limits](https://docs.github.com/enterprise-server@3.4/rest/overview/resources-in-the-rest-api#secondary-rate-limits)\" and \"[Dealing with secondary rate limits](https://docs.github.com/enterprise-server@3.4/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)\" for details.\n\nFor more information on permission levels, see \"[Repository permission levels for an organization](https://docs.github.com/enterprise-server@3.4/github/setting-up-and-managing-organizations-and-teams/repository-permission-levels-for-an-organization#permission-levels-for-repositories-owned-by-an-organization)\". There are restrictions on which permissions can be granted to organization members when an organization base role is in place. In this case, the permission being given must be equal to or higher than the org base permission. Otherwise, the request will fail with:\n\n```\nCannot assign {member} permission of {role name}\n```\n\nNote that, if you choose not to pass any parameters, you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see \"[HTTP verbs](https://docs.github.com/enterprise-server@3.4/rest/overview/resources-in-the-rest-api#http-verbs).\"\n\nThe invitee will receive a notification that they have been invited to the repository, which they must accept or decline. They may do this via the notifications page, the email they receive, or by using the [repository invitations API endpoints](https://docs.github.com/enterprise-server@3.4/rest/reference/repos#invitations).\n\n**Rate limits**\n\nYou are limited to sending 50 invitations to a repository per 24 hour period. Note there is no limit if you are inviting organization members to an organization repository.", + "description": "This endpoint triggers [notifications](https://docs.github.com/enterprise-server@3.4/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See \"[Secondary rate limits](https://docs.github.com/enterprise-server@3.4/rest/overview/resources-in-the-rest-api#secondary-rate-limits)\" and \"[Dealing with secondary rate limits](https://docs.github.com/enterprise-server@3.4/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)\" for details.\n\nFor more information on permission levels, see \"[Repository permission levels for an organization](https://docs.github.com/enterprise-server@3.4/github/setting-up-and-managing-organizations-and-teams/repository-permission-levels-for-an-organization#permission-levels-for-repositories-owned-by-an-organization)\". There are restrictions on which permissions can be granted to organization members when an organization base role is in place. In this case, the permission being given must be equal to or higher than the org base permission. Otherwise, the request will fail with:\n\n```\nCannot assign {member} permission of {role name}\n```\n\nNote that, if you choose not to pass any parameters, you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see \"[HTTP verbs](https://docs.github.com/enterprise-server@3.4/rest/overview/resources-in-the-rest-api#http-verbs).\"\n\nThe invitee will receive a notification that they have been invited to the repository, which they must accept or decline. They may do this via the notifications page, the email they receive, or by using the [repository invitations API endpoints](https://docs.github.com/enterprise-server@3.4/rest/reference/repos#invitations).\n\n**Updating an existing collaborator's permission level**\n\nThe endpoint can also be used to change the permissions of an existing collaborator without first removing and re-adding the collaborator. To change the permissions, use the same endpoint and pass a different `permission` parameter. The response will be a `204`, with no other indication that the permission level changed.\n\n**Rate limits**\n\nYou are limited to sending 50 invitations to a repository per 24 hour period. Note there is no limit if you are inviting organization members to an organization repository.", "tags": [ "repos" ], @@ -244921,7 +244921,7 @@ "properties": { "event_type": { "type": "string", - "description": "A custom webhook event name.", + "description": "A custom webhook event name. Must be 100 characters or fewer.", "minLength": 1, "maxLength": 100 }, diff --git a/lib/rest/static/dereferenced/github.ae.deref.json b/lib/rest/static/dereferenced/github.ae.deref.json index b5f9dd6eea..fe26b81b83 100644 --- a/lib/rest/static/dereferenced/github.ae.deref.json +++ b/lib/rest/static/dereferenced/github.ae.deref.json @@ -177935,7 +177935,7 @@ }, "put": { "summary": "Add a repository collaborator", - "description": "This endpoint triggers [notifications](https://docs.github.com/github-ae@latest/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See \"[Secondary rate limits](https://docs.github.com/github-ae@latest/rest/overview/resources-in-the-rest-api#secondary-rate-limits)\" and \"[Dealing with secondary rate limits](https://docs.github.com/github-ae@latest/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)\" for details.\n\nAdding an outside collaborator may be restricted by enterprise administrators. For more information, see \"[Enforcing repository management policies in your enterprise](https://docs.github.com/github-ae@latest/admin/policies/enforcing-policies-for-your-enterprise/enforcing-repository-management-policies-in-your-enterprise#enforcing-a-policy-for-inviting-outside-collaborators-to-repositories).\"\n\nFor more information on permission levels, see \"[Repository permission levels for an organization](https://docs.github.com/github-ae@latest/github/setting-up-and-managing-organizations-and-teams/repository-permission-levels-for-an-organization#permission-levels-for-repositories-owned-by-an-organization)\". There are restrictions on which permissions can be granted to organization members when an organization base role is in place. In this case, the permission being given must be equal to or higher than the org base permission. Otherwise, the request will fail with:\n\n```\nCannot assign {member} permission of {role name}\n```\n\nNote that, if you choose not to pass any parameters, you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see \"[HTTP verbs](https://docs.github.com/github-ae@latest/rest/overview/resources-in-the-rest-api#http-verbs).\"\n\nThe invitee will receive a notification that they have been invited to the repository, which they must accept or decline. They may do this via the notifications page, the email they receive, or by using the [repository invitations API endpoints](https://docs.github.com/github-ae@latest/rest/reference/repos#invitations).\n\n**Rate limits**\n\nYou are limited to sending 50 invitations to a repository per 24 hour period. Note there is no limit if you are inviting organization members to an organization repository.", + "description": "This endpoint triggers [notifications](https://docs.github.com/github-ae@latest/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See \"[Secondary rate limits](https://docs.github.com/github-ae@latest/rest/overview/resources-in-the-rest-api#secondary-rate-limits)\" and \"[Dealing with secondary rate limits](https://docs.github.com/github-ae@latest/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)\" for details.\n\nAdding an outside collaborator may be restricted by enterprise administrators. For more information, see \"[Enforcing repository management policies in your enterprise](https://docs.github.com/github-ae@latest/admin/policies/enforcing-policies-for-your-enterprise/enforcing-repository-management-policies-in-your-enterprise#enforcing-a-policy-for-inviting-outside-collaborators-to-repositories).\"\n\nFor more information on permission levels, see \"[Repository permission levels for an organization](https://docs.github.com/github-ae@latest/github/setting-up-and-managing-organizations-and-teams/repository-permission-levels-for-an-organization#permission-levels-for-repositories-owned-by-an-organization)\". There are restrictions on which permissions can be granted to organization members when an organization base role is in place. In this case, the permission being given must be equal to or higher than the org base permission. Otherwise, the request will fail with:\n\n```\nCannot assign {member} permission of {role name}\n```\n\nNote that, if you choose not to pass any parameters, you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see \"[HTTP verbs](https://docs.github.com/github-ae@latest/rest/overview/resources-in-the-rest-api#http-verbs).\"\n\nThe invitee will receive a notification that they have been invited to the repository, which they must accept or decline. They may do this via the notifications page, the email they receive, or by using the [repository invitations API endpoints](https://docs.github.com/github-ae@latest/rest/reference/repos#invitations).\n\n**Updating an existing collaborator's permission level**\n\nThe endpoint can also be used to change the permissions of an existing collaborator without first removing and re-adding the collaborator. To change the permissions, use the same endpoint and pass a different `permission` parameter. The response will be a `204`, with no other indication that the permission level changed.\n\n**Rate limits**\n\nYou are limited to sending 50 invitations to a repository per 24 hour period. Note there is no limit if you are inviting organization members to an organization repository.", "tags": [ "repos" ], @@ -209336,7 +209336,7 @@ "properties": { "event_type": { "type": "string", - "description": "A custom webhook event name.", + "description": "A custom webhook event name. Must be 100 characters or fewer.", "minLength": 1, "maxLength": 100 }, From 00a8f966e26636305a2b69c06d4e1e02bf86fae8 Mon Sep 17 00:00:00 2001 From: github-openapi-bot Date: Wed, 27 Apr 2022 05:53:53 +0000 Subject: [PATCH 2/3] Add decorated OpenAPI schema files --- .../client-side-rest-api-redirects.json | 4 + lib/rest/static/apps/enabled-for-apps.json | 16 + lib/rest/static/decorated/api.github.com.json | 321 +++++++++++++++++- lib/rest/static/decorated/ghes-3.1.json | 6 +- lib/rest/static/decorated/ghes-3.2.json | 6 +- lib/rest/static/decorated/ghes-3.3.json | 6 +- lib/rest/static/decorated/ghes-3.4.json | 6 +- lib/rest/static/decorated/github.ae.json | 6 +- 8 files changed, 344 insertions(+), 27 deletions(-) diff --git a/lib/redirects/static/client-side-rest-api-redirects.json b/lib/redirects/static/client-side-rest-api-redirects.json index 0c0b3af998..00801beec2 100644 --- a/lib/redirects/static/client-side-rest-api-redirects.json +++ b/lib/redirects/static/client-side-rest-api-redirects.json @@ -188,6 +188,8 @@ "/rest/actions#disable-a-selected-organization-for-github-actions-in-an-enterprise": "/rest/actions/permissions#disable-a-selected-organization-for-github-actions-in-an-enterprise", "/rest/actions#get-allowed-actions-for-an-enterprise": "/rest/actions/permissions#get-allowed-actions-for-an-enterprise", "/rest/actions#set-allowed-actions-for-an-enterprise": "/rest/actions/permissions#set-allowed-actions-for-an-enterprise", + "/rest/actions#get-default-workflow-permissions-for-an-enterprise": "/rest/actions/permissions#get-default-workflow-permissions-for-an-enterprise", + "/rest/actions#set-default-workflow-permissions-for-an-enterprise": "/rest/actions/permissions#set-default-workflow-permissions-for-an-enterprise", "/rest/actions#list-self-hosted-runner-groups-for-an-enterprise": "/rest/actions/self-hosted-runner-groups#list-self-hosted-runner-groups-for-an-enterprise", "/rest/actions#self-hosted-runner-groups": "/rest/actions/self-hosted-runner-groups", "/rest/actions#create-self-hosted-runner-group-for-an-enterprise": "/rest/actions/self-hosted-runner-groups#create-self-hosted-runner-group-for-an-enterprise", @@ -469,6 +471,8 @@ "/rest/actions#set-workflow-access-to-a-repository": "/rest/actions/permissions#set-workflow-access-to-a-repository", "/rest/actions#get-allowed-actions-for-a-repository": "/rest/actions/permissions#get-allowed-actions-for-a-repository", "/rest/actions#set-allowed-actions-for-a-repository": "/rest/actions/permissions#set-allowed-actions-for-a-repository", + "/rest/actions#get-default-workflow-permissions-for-a-repository": "/rest/actions/permissions#get-default-workflow-permissions-for-a-repository", + "/rest/actions#set-default-workflow-permissions-for-a-repository": "/rest/actions/permissions#set-default-workflow-permissions-for-a-repository", "/rest/actions#list-self-hosted-runners-for-a-repository": "/rest/actions/self-hosted-runners#list-self-hosted-runners-for-a-repository", "/rest/actions#list-runner-applications-for-a-repository": "/rest/actions/self-hosted-runners#list-runner-applications-for-a-repository", "/rest/actions#create-a-registration-token-for-a-repository": "/rest/actions/self-hosted-runners#create-a-registration-token-for-a-repository", diff --git a/lib/rest/static/apps/enabled-for-apps.json b/lib/rest/static/apps/enabled-for-apps.json index b1b173fd1b..b74d6f92da 100644 --- a/lib/rest/static/apps/enabled-for-apps.json +++ b/lib/rest/static/apps/enabled-for-apps.json @@ -5,6 +5,14 @@ "verb": "get", "requestPath": "/enterprises/{enterprise}/actions/cache/usage" }, + { + "verb": "get", + "requestPath": "/enterprises/{enterprise}/actions/permissions/workflow" + }, + { + "verb": "put", + "requestPath": "/enterprises/{enterprise}/actions/permissions/workflow" + }, { "verb": "get", "requestPath": "/orgs/{org}/actions/cache/usage" @@ -241,6 +249,14 @@ "verb": "put", "requestPath": "/repos/{owner}/{repo}/actions/permissions/selected-actions" }, + { + "verb": "get", + "requestPath": "/repos/{owner}/{repo}/actions/permissions/workflow" + }, + { + "verb": "put", + "requestPath": "/repos/{owner}/{repo}/actions/permissions/workflow" + }, { "verb": "get", "requestPath": "/repos/{owner}/{repo}/actions/runners" diff --git a/lib/rest/static/decorated/api.github.com.json b/lib/rest/static/decorated/api.github.com.json index b1cc559bc8..a723048a1b 100644 --- a/lib/rest/static/decorated/api.github.com.json +++ b/lib/rest/static/decorated/api.github.com.json @@ -1207,6 +1207,129 @@ } ] }, + { + "serverUrl": "https://api.github.com", + "verb": "get", + "requestPath": "/enterprises/{enterprise}/actions/permissions/workflow", + "title": "Get default workflow permissions for an enterprise", + "category": "actions", + "subcategory": "permissions", + "parameters": [ + { + "name": "enterprise", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "descriptionHTML": "

The slug version of the enterprise name. You can also substitute this value with the enterprise id.

" + } + ], + "bodyParameters": [], + "enabledForGitHubApps": true, + "codeExamples": [ + { + "key": "default", + "request": { + "description": "Example", + "acceptHeader": "application/vnd.github.v3+json", + "parameters": { + "enterprise": "ENTERPRISE" + } + }, + "response": { + "statusCode": "200", + "contentType": "application/json", + "description": "

Give read-only permission, and allow approving PRs.

", + "example": { + "default_workflow_permissions": "read", + "can_approve_pull_request_reviews": true + } + } + } + ], + "previews": [], + "descriptionHTML": "

Gets the default workflow permissions granted to the GITHUB_TOKEN when running workflows in an enterprise,\nas well as whether GitHub Actions can submit approving pull request reviews. For more information, see\n\"Enforcing a policy for workflow permissions in your enterprise.\"

\n

You must authenticate using an access token with the admin:enterprise scope to use this endpoint.\nGitHub Apps must have the enterprise_administration:write permission to use this endpoint.

", + "statusCodes": [ + { + "httpStatusCode": "200", + "description": "

Success response

" + } + ] + }, + { + "serverUrl": "https://api.github.com", + "verb": "put", + "requestPath": "/enterprises/{enterprise}/actions/permissions/workflow", + "title": "Set default workflow permissions for an enterprise", + "category": "actions", + "subcategory": "permissions", + "parameters": [ + { + "name": "enterprise", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "descriptionHTML": "

The slug version of the enterprise name. You can also substitute this value with the enterprise id.

" + } + ], + "bodyParameters": [ + { + "type": "string", + "description": "

The default workflow permissions granted to the GITHUB_TOKEN when running workflows.

", + "enum": [ + "read", + "write" + ], + "name": "default_workflow_permissions", + "in": "body", + "rawType": "string", + "rawDescription": "The default workflow permissions granted to the GITHUB_TOKEN when running workflows.", + "childParamsGroups": [] + }, + { + "type": "boolean", + "description": "

Whether GitHub Actions can approve pull requests. Enabling this can be a security risk.

", + "name": "can_approve_pull_request_reviews", + "in": "body", + "rawType": "boolean", + "rawDescription": "Whether GitHub Actions can approve pull requests. Enabling this can be a security risk.", + "childParamsGroups": [] + } + ], + "enabledForGitHubApps": true, + "codeExamples": [ + { + "key": "default", + "request": { + "contentType": "application/json", + "description": "Give read-only permission, and allow approving PRs.", + "acceptHeader": "application/vnd.github.v3+json", + "bodyParameters": { + "default_workflow_permissions": "read", + "can_approve_pull_request_reviews": true + }, + "parameters": { + "enterprise": "ENTERPRISE" + } + }, + "response": { + "statusCode": "204", + "description": "

Success response

" + } + } + ], + "previews": [], + "descriptionHTML": "

Sets the default workflow permissions granted to the GITHUB_TOKEN when running workflows in an enterprise, and sets\nwhether GitHub Actions can submit approving pull request reviews. For more information, see\n\"Enforcing a policy for workflow permissions in your enterprise.\"

\n

You must authenticate using an access token with the admin:enterprise scope to use this endpoint.\nGitHub Apps must have the enterprise_administration:write permission to use this endpoint.

", + "statusCodes": [ + { + "httpStatusCode": "204", + "description": "

Success response

" + } + ] + }, { "serverUrl": "https://api.github.com", "verb": "get", @@ -1877,7 +2000,7 @@ "response": { "statusCode": "200", "contentType": "application/json", - "description": "

Response

", + "description": "

Give read-only permission, and allow approving PRs.

", "example": { "default_workflow_permissions": "read", "can_approve_pull_request_reviews": true @@ -1886,7 +2009,7 @@ } ], "previews": [], - "descriptionHTML": "

Gets the default workflow permissions granted to the GITHUB_TOKEN when running workflows in an organization,\nas well if GitHub Actions can submit approving pull request reviews.

\n

You must authenticate using an access token with the admin:org scope to use this endpoint. GitHub Apps must have the administration organization permission to use this API.

", + "descriptionHTML": "

Gets the default workflow permissions granted to the GITHUB_TOKEN when running workflows in an organization,\nas well as whether GitHub Actions can submit approving pull request reviews. For more information, see\n\"Setting the permissions of the GITHUB_TOKEN for your organization.\"

\n

You must authenticate using an access token with the admin:org scope to use this endpoint. GitHub Apps must have the administration organization permission to use this API.

", "statusCodes": [ { "httpStatusCode": "200", @@ -1928,11 +2051,11 @@ }, { "type": "boolean", - "description": "

Whether GitHub Actions can submit approving pull request reviews.

", + "description": "

Whether GitHub Actions can approve pull requests. Enabling this can be a security risk.

", "name": "can_approve_pull_request_reviews", "in": "body", "rawType": "boolean", - "rawDescription": "Whether GitHub Actions can submit approving pull request reviews.", + "rawDescription": "Whether GitHub Actions can approve pull requests. Enabling this can be a security risk.", "childParamsGroups": [] } ], @@ -1942,7 +2065,7 @@ "key": "default", "request": { "contentType": "application/json", - "description": "Example", + "description": "Give read-only permission, and allow approving PRs.", "acceptHeader": "application/vnd.github.v3+json", "bodyParameters": { "default_workflow_permissions": "read", @@ -1954,16 +2077,20 @@ }, "response": { "statusCode": "204", - "description": "

Response

" + "description": "

Success response

" } } ], "previews": [], - "descriptionHTML": "

Sets the default workflow permissions granted to the GITHUB_TOKEN when running workflows in an organization, and sets if GitHub Actions\ncan submit approving pull request reviews.

\n

You must authenticate using an access token with the admin:org scope to use this endpoint. GitHub Apps must have the administration organization permission to use this API.

", + "descriptionHTML": "

Sets the default workflow permissions granted to the GITHUB_TOKEN when running workflows in an organization, and sets if GitHub Actions\ncan submit approving pull request reviews. For more information, see\n\"Setting the permissions of the GITHUB_TOKEN for your organization.\"

\n

You must authenticate using an access token with the admin:org scope to use this endpoint. GitHub Apps must have the administration organization permission to use this API.

", "statusCodes": [ { "httpStatusCode": "204", - "description": "

No Content

" + "description": "

Success response

" + }, + { + "httpStatusCode": "409", + "description": "

Conflict response when changing a setting is prevented by the owning enterprise

" } ] }, @@ -2403,6 +2530,153 @@ "description": "

No Content

" } ] + }, + { + "serverUrl": "https://api.github.com", + "verb": "get", + "requestPath": "/repos/{owner}/{repo}/actions/permissions/workflow", + "title": "Get default workflow permissions for a repository", + "category": "actions", + "subcategory": "permissions", + "parameters": [ + { + "name": "owner", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "descriptionHTML": "" + }, + { + "name": "repo", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "descriptionHTML": "" + } + ], + "bodyParameters": [], + "enabledForGitHubApps": true, + "codeExamples": [ + { + "key": "default", + "request": { + "description": "Example", + "acceptHeader": "application/vnd.github.v3+json", + "parameters": { + "owner": "OWNER", + "repo": "REPO" + } + }, + "response": { + "statusCode": "200", + "contentType": "application/json", + "description": "

Give read-only permission, and allow approving PRs.

", + "example": { + "default_workflow_permissions": "read", + "can_approve_pull_request_reviews": true + } + } + } + ], + "previews": [], + "descriptionHTML": "

Gets the default workflow permissions granted to the GITHUB_TOKEN when running workflows in a repository,\nas well as if GitHub Actions can submit approving pull request reviews.\nFor more information, see \"Setting the permissions of the GITHUB_TOKEN for your repository.\"

\n

You must authenticate using an access token with the repo scope to use this endpoint. GitHub Apps must have the repository administration permission to use this API.

", + "statusCodes": [ + { + "httpStatusCode": "200", + "description": "

OK

" + } + ] + }, + { + "serverUrl": "https://api.github.com", + "verb": "put", + "requestPath": "/repos/{owner}/{repo}/actions/permissions/workflow", + "title": "Set default workflow permissions for a repository", + "category": "actions", + "subcategory": "permissions", + "parameters": [ + { + "name": "owner", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "descriptionHTML": "" + }, + { + "name": "repo", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "descriptionHTML": "" + } + ], + "bodyParameters": [ + { + "type": "string", + "description": "

The default workflow permissions granted to the GITHUB_TOKEN when running workflows.

", + "enum": [ + "read", + "write" + ], + "name": "default_workflow_permissions", + "in": "body", + "rawType": "string", + "rawDescription": "The default workflow permissions granted to the GITHUB_TOKEN when running workflows.", + "childParamsGroups": [] + }, + { + "type": "boolean", + "description": "

Whether GitHub Actions can approve pull requests. Enabling this can be a security risk.

", + "name": "can_approve_pull_request_reviews", + "in": "body", + "rawType": "boolean", + "rawDescription": "Whether GitHub Actions can approve pull requests. Enabling this can be a security risk.", + "childParamsGroups": [] + } + ], + "enabledForGitHubApps": true, + "codeExamples": [ + { + "key": "default", + "request": { + "contentType": "application/json", + "description": "Give read-only permission, and allow approving PRs.", + "acceptHeader": "application/vnd.github.v3+json", + "bodyParameters": { + "default_workflow_permissions": "read", + "can_approve_pull_request_reviews": true + }, + "parameters": { + "owner": "OWNER", + "repo": "REPO" + } + }, + "response": { + "statusCode": "204", + "description": "

Success response

" + } + } + ], + "previews": [], + "descriptionHTML": "

Sets the default workflow permissions granted to the GITHUB_TOKEN when running workflows in a repository, and sets if GitHub Actions\ncan submit approving pull request reviews.\nFor more information, see \"Setting the permissions of the GITHUB_TOKEN for your repository.\"

\n

You must authenticate using an access token with the repo scope to use this endpoint. GitHub Apps must have the repository administration permission to use this API.

", + "statusCodes": [ + { + "httpStatusCode": "204", + "description": "

Success response

" + }, + { + "httpStatusCode": "409", + "description": "

Conflict response when changing a setting is prevented by the owning organization or enterprise

" + } + ] } ], "secrets": [ @@ -32139,6 +32413,29 @@ }, "descriptionHTML": "" }, + { + "name": "tool_name", + "in": "query", + "required": false, + "schema": { + "type": "string", + "description": "The name of the tool used to generate the code scanning analysis." + }, + "descriptionHTML": "

The name of a code scanning tool. Only results by this tool will be listed. You can specify the tool by using either tool_name or tool_guid, but not both.

" + }, + { + "name": "tool_guid", + "in": "query", + "required": false, + "schema": { + "type": [ + "string", + "null" + ], + "description": "The GUID of the tool used to generate the code scanning analysis, if provided in the uploaded SARIF data." + }, + "descriptionHTML": "

The GUID of a code scanning tool. Only results by this tool will be listed. Note that some code scanning tools may not include a GUID in their analysis data. You can specify the tool by using either tool_guid or tool_name, but not both.

" + }, { "name": "before", "in": "query", @@ -32203,7 +32500,7 @@ "fixed" ] }, - "descriptionHTML": "

Set to open, closed, fixed, or dismissed` to list code scanning alerts in a specific state.

" + "descriptionHTML": "

Set to open, closed, fixed, or dismissed to list code scanning alerts in a specific state.

" }, { "name": "sort", @@ -39547,7 +39844,7 @@ "description": "

Validation failed

" } ], - "descriptionHTML": "

This endpoint triggers notifications. Creating content too quickly using this endpoint may result in secondary rate limiting. See \"Secondary rate limits\" and \"Dealing with secondary rate limits\" for details.

\n

Adding an outside collaborator may be restricted by enterprise administrators. For more information, see \"Enforcing repository management policies in your enterprise.\"

\n

For more information on permission levels, see \"Repository permission levels for an organization\". There are restrictions on which permissions can be granted to organization members when an organization base role is in place. In this case, the permission being given must be equal to or higher than the org base permission. Otherwise, the request will fail with:

\n
Cannot assign {member} permission of {role name}\n
\n

Note that, if you choose not to pass any parameters, you'll need to set Content-Length to zero when calling out to this endpoint. For more information, see \"HTTP verbs.\"

\n

The invitee will receive a notification that they have been invited to the repository, which they must accept or decline. They may do this via the notifications page, the email they receive, or by using the repository invitations API endpoints.

\n

Rate limits

\n

You are limited to sending 50 invitations to a repository per 24 hour period. Note there is no limit if you are inviting organization members to an organization repository.

" + "descriptionHTML": "

This endpoint triggers notifications. Creating content too quickly using this endpoint may result in secondary rate limiting. See \"Secondary rate limits\" and \"Dealing with secondary rate limits\" for details.

\n

Adding an outside collaborator may be restricted by enterprise administrators. For more information, see \"Enforcing repository management policies in your enterprise.\"

\n

For more information on permission levels, see \"Repository permission levels for an organization\". There are restrictions on which permissions can be granted to organization members when an organization base role is in place. In this case, the permission being given must be equal to or higher than the org base permission. Otherwise, the request will fail with:

\n
Cannot assign {member} permission of {role name}\n
\n

Note that, if you choose not to pass any parameters, you'll need to set Content-Length to zero when calling out to this endpoint. For more information, see \"HTTP verbs.\"

\n

The invitee will receive a notification that they have been invited to the repository, which they must accept or decline. They may do this via the notifications page, the email they receive, or by using the repository invitations API endpoints.

\n

Updating an existing collaborator's permission level

\n

The endpoint can also be used to change the permissions of an existing collaborator without first removing and re-adding the collaborator. To change the permissions, use the same endpoint and pass a different permission parameter. The response will be a 204, with no other indication that the permission level changed.

\n

Rate limits

\n

You are limited to sending 50 invitations to a repository per 24 hour period. Note there is no limit if you are inviting organization members to an organization repository.

" }, { "serverUrl": "https://api.github.com", @@ -90352,13 +90649,13 @@ "bodyParameters": [ { "type": "string", - "description": "

Required. A custom webhook event name.

", + "description": "

Required. A custom webhook event name. Must be 100 characters or fewer.

", "minLength": 1, "maxLength": 100, "name": "event_type", "in": "body", "rawType": "string", - "rawDescription": "A custom webhook event name.", + "rawDescription": "A custom webhook event name. Must be 100 characters or fewer.", "childParamsGroups": [] }, { diff --git a/lib/rest/static/decorated/ghes-3.1.json b/lib/rest/static/decorated/ghes-3.1.json index 28feafbe5f..58f447a516 100644 --- a/lib/rest/static/decorated/ghes-3.1.json +++ b/lib/rest/static/decorated/ghes-3.1.json @@ -28343,7 +28343,7 @@ "description": "

Validation failed

" } ], - "descriptionHTML": "

This endpoint triggers notifications. Creating content too quickly using this endpoint may result in secondary rate limiting. See \"Secondary rate limits\" and \"Dealing with secondary rate limits\" for details.

\n

For more information on permission levels, see \"Repository permission levels for an organization\". There are restrictions on which permissions can be granted to organization members when an organization base role is in place. In this case, the permission being given must be equal to or higher than the org base permission. Otherwise, the request will fail with:

\n
Cannot assign {member} permission of {role name}\n
\n

Note that, if you choose not to pass any parameters, you'll need to set Content-Length to zero when calling out to this endpoint. For more information, see \"HTTP verbs.\"

\n

The invitee will receive a notification that they have been invited to the repository, which they must accept or decline. They may do this via the notifications page, the email they receive, or by using the repository invitations API endpoints.

\n

Rate limits

\n

You are limited to sending 50 invitations to a repository per 24 hour period. Note there is no limit if you are inviting organization members to an organization repository.

" + "descriptionHTML": "

This endpoint triggers notifications. Creating content too quickly using this endpoint may result in secondary rate limiting. See \"Secondary rate limits\" and \"Dealing with secondary rate limits\" for details.

\n

For more information on permission levels, see \"Repository permission levels for an organization\". There are restrictions on which permissions can be granted to organization members when an organization base role is in place. In this case, the permission being given must be equal to or higher than the org base permission. Otherwise, the request will fail with:

\n
Cannot assign {member} permission of {role name}\n
\n

Note that, if you choose not to pass any parameters, you'll need to set Content-Length to zero when calling out to this endpoint. For more information, see \"HTTP verbs.\"

\n

The invitee will receive a notification that they have been invited to the repository, which they must accept or decline. They may do this via the notifications page, the email they receive, or by using the repository invitations API endpoints.

\n

Updating an existing collaborator's permission level

\n

The endpoint can also be used to change the permissions of an existing collaborator without first removing and re-adding the collaborator. To change the permissions, use the same endpoint and pass a different permission parameter. The response will be a 204, with no other indication that the permission level changed.

\n

Rate limits

\n

You are limited to sending 50 invitations to a repository per 24 hour period. Note there is no limit if you are inviting organization members to an organization repository.

" }, { "serverUrl": "http(s)://HOSTNAME/api/v3", @@ -71075,13 +71075,13 @@ "bodyParameters": [ { "type": "string", - "description": "

Required. A custom webhook event name.

", + "description": "

Required. A custom webhook event name. Must be 100 characters or fewer.

", "minLength": 1, "maxLength": 100, "name": "event_type", "in": "body", "rawType": "string", - "rawDescription": "A custom webhook event name.", + "rawDescription": "A custom webhook event name. Must be 100 characters or fewer.", "childParamsGroups": [] }, { diff --git a/lib/rest/static/decorated/ghes-3.2.json b/lib/rest/static/decorated/ghes-3.2.json index 4fabf529a7..3cee399d77 100644 --- a/lib/rest/static/decorated/ghes-3.2.json +++ b/lib/rest/static/decorated/ghes-3.2.json @@ -29411,7 +29411,7 @@ "description": "

Validation failed

" } ], - "descriptionHTML": "

This endpoint triggers notifications. Creating content too quickly using this endpoint may result in secondary rate limiting. See \"Secondary rate limits\" and \"Dealing with secondary rate limits\" for details.

\n

For more information on permission levels, see \"Repository permission levels for an organization\". There are restrictions on which permissions can be granted to organization members when an organization base role is in place. In this case, the permission being given must be equal to or higher than the org base permission. Otherwise, the request will fail with:

\n
Cannot assign {member} permission of {role name}\n
\n

Note that, if you choose not to pass any parameters, you'll need to set Content-Length to zero when calling out to this endpoint. For more information, see \"HTTP verbs.\"

\n

The invitee will receive a notification that they have been invited to the repository, which they must accept or decline. They may do this via the notifications page, the email they receive, or by using the repository invitations API endpoints.

\n

Rate limits

\n

You are limited to sending 50 invitations to a repository per 24 hour period. Note there is no limit if you are inviting organization members to an organization repository.

" + "descriptionHTML": "

This endpoint triggers notifications. Creating content too quickly using this endpoint may result in secondary rate limiting. See \"Secondary rate limits\" and \"Dealing with secondary rate limits\" for details.

\n

For more information on permission levels, see \"Repository permission levels for an organization\". There are restrictions on which permissions can be granted to organization members when an organization base role is in place. In this case, the permission being given must be equal to or higher than the org base permission. Otherwise, the request will fail with:

\n
Cannot assign {member} permission of {role name}\n
\n

Note that, if you choose not to pass any parameters, you'll need to set Content-Length to zero when calling out to this endpoint. For more information, see \"HTTP verbs.\"

\n

The invitee will receive a notification that they have been invited to the repository, which they must accept or decline. They may do this via the notifications page, the email they receive, or by using the repository invitations API endpoints.

\n

Updating an existing collaborator's permission level

\n

The endpoint can also be used to change the permissions of an existing collaborator without first removing and re-adding the collaborator. To change the permissions, use the same endpoint and pass a different permission parameter. The response will be a 204, with no other indication that the permission level changed.

\n

Rate limits

\n

You are limited to sending 50 invitations to a repository per 24 hour period. Note there is no limit if you are inviting organization members to an organization repository.

" }, { "serverUrl": "http(s)://HOSTNAME/api/v3", @@ -73867,13 +73867,13 @@ "bodyParameters": [ { "type": "string", - "description": "

Required. A custom webhook event name.

", + "description": "

Required. A custom webhook event name. Must be 100 characters or fewer.

", "minLength": 1, "maxLength": 100, "name": "event_type", "in": "body", "rawType": "string", - "rawDescription": "A custom webhook event name.", + "rawDescription": "A custom webhook event name. Must be 100 characters or fewer.", "childParamsGroups": [] }, { diff --git a/lib/rest/static/decorated/ghes-3.3.json b/lib/rest/static/decorated/ghes-3.3.json index dddda7f4a8..c8b90b10f1 100644 --- a/lib/rest/static/decorated/ghes-3.3.json +++ b/lib/rest/static/decorated/ghes-3.3.json @@ -29566,7 +29566,7 @@ "description": "

Validation failed

" } ], - "descriptionHTML": "

This endpoint triggers notifications. Creating content too quickly using this endpoint may result in secondary rate limiting. See \"Secondary rate limits\" and \"Dealing with secondary rate limits\" for details.

\n

For more information on permission levels, see \"Repository permission levels for an organization\". There are restrictions on which permissions can be granted to organization members when an organization base role is in place. In this case, the permission being given must be equal to or higher than the org base permission. Otherwise, the request will fail with:

\n
Cannot assign {member} permission of {role name}\n
\n

Note that, if you choose not to pass any parameters, you'll need to set Content-Length to zero when calling out to this endpoint. For more information, see \"HTTP verbs.\"

\n

The invitee will receive a notification that they have been invited to the repository, which they must accept or decline. They may do this via the notifications page, the email they receive, or by using the repository invitations API endpoints.

\n

Rate limits

\n

You are limited to sending 50 invitations to a repository per 24 hour period. Note there is no limit if you are inviting organization members to an organization repository.

" + "descriptionHTML": "

This endpoint triggers notifications. Creating content too quickly using this endpoint may result in secondary rate limiting. See \"Secondary rate limits\" and \"Dealing with secondary rate limits\" for details.

\n

For more information on permission levels, see \"Repository permission levels for an organization\". There are restrictions on which permissions can be granted to organization members when an organization base role is in place. In this case, the permission being given must be equal to or higher than the org base permission. Otherwise, the request will fail with:

\n
Cannot assign {member} permission of {role name}\n
\n

Note that, if you choose not to pass any parameters, you'll need to set Content-Length to zero when calling out to this endpoint. For more information, see \"HTTP verbs.\"

\n

The invitee will receive a notification that they have been invited to the repository, which they must accept or decline. They may do this via the notifications page, the email they receive, or by using the repository invitations API endpoints.

\n

Updating an existing collaborator's permission level

\n

The endpoint can also be used to change the permissions of an existing collaborator without first removing and re-adding the collaborator. To change the permissions, use the same endpoint and pass a different permission parameter. The response will be a 204, with no other indication that the permission level changed.

\n

Rate limits

\n

You are limited to sending 50 invitations to a repository per 24 hour period. Note there is no limit if you are inviting organization members to an organization repository.

" }, { "serverUrl": "http(s)://HOSTNAME/api/v3", @@ -73808,13 +73808,13 @@ "bodyParameters": [ { "type": "string", - "description": "

Required. A custom webhook event name.

", + "description": "

Required. A custom webhook event name. Must be 100 characters or fewer.

", "minLength": 1, "maxLength": 100, "name": "event_type", "in": "body", "rawType": "string", - "rawDescription": "A custom webhook event name.", + "rawDescription": "A custom webhook event name. Must be 100 characters or fewer.", "childParamsGroups": [] }, { diff --git a/lib/rest/static/decorated/ghes-3.4.json b/lib/rest/static/decorated/ghes-3.4.json index 09d7e87c99..a83fa82791 100644 --- a/lib/rest/static/decorated/ghes-3.4.json +++ b/lib/rest/static/decorated/ghes-3.4.json @@ -31002,7 +31002,7 @@ "description": "

Validation failed

" } ], - "descriptionHTML": "

This endpoint triggers notifications. Creating content too quickly using this endpoint may result in secondary rate limiting. See \"Secondary rate limits\" and \"Dealing with secondary rate limits\" for details.

\n

For more information on permission levels, see \"Repository permission levels for an organization\". There are restrictions on which permissions can be granted to organization members when an organization base role is in place. In this case, the permission being given must be equal to or higher than the org base permission. Otherwise, the request will fail with:

\n
Cannot assign {member} permission of {role name}\n
\n

Note that, if you choose not to pass any parameters, you'll need to set Content-Length to zero when calling out to this endpoint. For more information, see \"HTTP verbs.\"

\n

The invitee will receive a notification that they have been invited to the repository, which they must accept or decline. They may do this via the notifications page, the email they receive, or by using the repository invitations API endpoints.

\n

Rate limits

\n

You are limited to sending 50 invitations to a repository per 24 hour period. Note there is no limit if you are inviting organization members to an organization repository.

" + "descriptionHTML": "

This endpoint triggers notifications. Creating content too quickly using this endpoint may result in secondary rate limiting. See \"Secondary rate limits\" and \"Dealing with secondary rate limits\" for details.

\n

For more information on permission levels, see \"Repository permission levels for an organization\". There are restrictions on which permissions can be granted to organization members when an organization base role is in place. In this case, the permission being given must be equal to or higher than the org base permission. Otherwise, the request will fail with:

\n
Cannot assign {member} permission of {role name}\n
\n

Note that, if you choose not to pass any parameters, you'll need to set Content-Length to zero when calling out to this endpoint. For more information, see \"HTTP verbs.\"

\n

The invitee will receive a notification that they have been invited to the repository, which they must accept or decline. They may do this via the notifications page, the email they receive, or by using the repository invitations API endpoints.

\n

Updating an existing collaborator's permission level

\n

The endpoint can also be used to change the permissions of an existing collaborator without first removing and re-adding the collaborator. To change the permissions, use the same endpoint and pass a different permission parameter. The response will be a 204, with no other indication that the permission level changed.

\n

Rate limits

\n

You are limited to sending 50 invitations to a repository per 24 hour period. Note there is no limit if you are inviting organization members to an organization repository.

" }, { "serverUrl": "http(s)://HOSTNAME/api/v3", @@ -78125,13 +78125,13 @@ "bodyParameters": [ { "type": "string", - "description": "

Required. A custom webhook event name.

", + "description": "

Required. A custom webhook event name. Must be 100 characters or fewer.

", "minLength": 1, "maxLength": 100, "name": "event_type", "in": "body", "rawType": "string", - "rawDescription": "A custom webhook event name.", + "rawDescription": "A custom webhook event name. Must be 100 characters or fewer.", "childParamsGroups": [] }, { diff --git a/lib/rest/static/decorated/github.ae.json b/lib/rest/static/decorated/github.ae.json index 06015fa141..fd2013d94c 100644 --- a/lib/rest/static/decorated/github.ae.json +++ b/lib/rest/static/decorated/github.ae.json @@ -26866,7 +26866,7 @@ "description": "

Validation failed

" } ], - "descriptionHTML": "

This endpoint triggers notifications. Creating content too quickly using this endpoint may result in secondary rate limiting. See \"Secondary rate limits\" and \"Dealing with secondary rate limits\" for details.

\n

Adding an outside collaborator may be restricted by enterprise administrators. For more information, see \"Enforcing repository management policies in your enterprise.\"

\n

For more information on permission levels, see \"Repository permission levels for an organization\". There are restrictions on which permissions can be granted to organization members when an organization base role is in place. In this case, the permission being given must be equal to or higher than the org base permission. Otherwise, the request will fail with:

\n
Cannot assign {member} permission of {role name}\n
\n

Note that, if you choose not to pass any parameters, you'll need to set Content-Length to zero when calling out to this endpoint. For more information, see \"HTTP verbs.\"

\n

The invitee will receive a notification that they have been invited to the repository, which they must accept or decline. They may do this via the notifications page, the email they receive, or by using the repository invitations API endpoints.

\n

Rate limits

\n

You are limited to sending 50 invitations to a repository per 24 hour period. Note there is no limit if you are inviting organization members to an organization repository.

" + "descriptionHTML": "

This endpoint triggers notifications. Creating content too quickly using this endpoint may result in secondary rate limiting. See \"Secondary rate limits\" and \"Dealing with secondary rate limits\" for details.

\n

Adding an outside collaborator may be restricted by enterprise administrators. For more information, see \"Enforcing repository management policies in your enterprise.\"

\n

For more information on permission levels, see \"Repository permission levels for an organization\". There are restrictions on which permissions can be granted to organization members when an organization base role is in place. In this case, the permission being given must be equal to or higher than the org base permission. Otherwise, the request will fail with:

\n
Cannot assign {member} permission of {role name}\n
\n

Note that, if you choose not to pass any parameters, you'll need to set Content-Length to zero when calling out to this endpoint. For more information, see \"HTTP verbs.\"

\n

The invitee will receive a notification that they have been invited to the repository, which they must accept or decline. They may do this via the notifications page, the email they receive, or by using the repository invitations API endpoints.

\n

Updating an existing collaborator's permission level

\n

The endpoint can also be used to change the permissions of an existing collaborator without first removing and re-adding the collaborator. To change the permissions, use the same endpoint and pass a different permission parameter. The response will be a 204, with no other indication that the permission level changed.

\n

Rate limits

\n

You are limited to sending 50 invitations to a repository per 24 hour period. Note there is no limit if you are inviting organization members to an organization repository.

" }, { "serverUrl": "https://HOSTNAME/api/v3", @@ -68699,13 +68699,13 @@ "bodyParameters": [ { "type": "string", - "description": "

Required. A custom webhook event name.

", + "description": "

Required. A custom webhook event name. Must be 100 characters or fewer.

", "minLength": 1, "maxLength": 100, "name": "event_type", "in": "body", "rawType": "string", - "rawDescription": "A custom webhook event name.", + "rawDescription": "A custom webhook event name. Must be 100 characters or fewer.", "childParamsGroups": [] }, { From 17b34e16cd9af7a9d5f4683fe0fc56b834185890 Mon Sep 17 00:00:00 2001 From: Martin Lopes Date: Wed, 27 Apr 2022 17:11:58 +1000 Subject: [PATCH 3/3] Revert "actions-inherit-secrets-reusable-workflows --- .../using-workflows/reusing-workflows.md | 8 +---- .../workflow-syntax-for-github-actions.md | 36 ------------------- ...ons-inherit-secrets-reusable-workflows.yml | 7 ---- .../pass-inputs-to-reusable-workflows.md | 16 --------- 4 files changed, 1 insertion(+), 66 deletions(-) delete mode 100644 data/features/actions-inherit-secrets-reusable-workflows.yml diff --git a/content/actions/using-workflows/reusing-workflows.md b/content/actions/using-workflows/reusing-workflows.md index 0ab6eaf05e..c3a090642a 100644 --- a/content/actions/using-workflows/reusing-workflows.md +++ b/content/actions/using-workflows/reusing-workflows.md @@ -103,13 +103,8 @@ You can define inputs and secrets, which can be passed from the caller workflow required: true ``` {% endraw %} - {% if actions-inherit-secrets-reusable-workflows %} - For details of the syntax for defining inputs and secrets, see [`on.workflow_call.inputs`](/actions/reference/workflow-syntax-for-github-actions#onworkflow_callinputs), [`on.workflow_call.secrets`](/actions/reference/workflow-syntax-for-github-actions#onworkflow_callsecrets) and [`on.workflow_call.secrets.inherit`](/actions/using-workflows/workflow-syntax-for-github-actions#onworkflow_callsecretsinherit). - 1. In the reusable workflow, reference the input or secret that you defined in the `on` key in the previous step. If the secrets are inherited using `secrets: inherit`, you can reference them even if they are not defined in the `on` key. - {%else%} For details of the syntax for defining inputs and secrets, see [`on.workflow_call.inputs`](/actions/reference/workflow-syntax-for-github-actions#onworkflow_callinputs) and [`on.workflow_call.secrets`](/actions/reference/workflow-syntax-for-github-actions#onworkflow_callsecrets). - 1. In the reusable workflow, reference the input or secret that you defined in the `on` key in the previous step. - {%endif%} +1. In the reusable workflow, reference the input or secret that you defined in the `on` key in the previous step. {% raw %} ```yaml @@ -194,7 +189,6 @@ When you call a reusable workflow, you can only use the following keywords in th * [`jobs..with.`](/actions/reference/workflow-syntax-for-github-actions#jobsjob_idwithinput_id) * [`jobs..secrets`](/actions/reference/workflow-syntax-for-github-actions#jobsjob_idsecrets) * [`jobs..secrets.`](/actions/reference/workflow-syntax-for-github-actions#jobsjob_idsecretssecret_id) - {% if actions-inherit-secrets-reusable-workflows %}* [`jobs..secrets.inherit`](/actions/using-workflows/workflow-syntax-for-github-actions#onworkflow_callsecretsinherit){% endif %} * [`jobs..needs`](/actions/reference/workflow-syntax-for-github-actions#jobsjob_idneeds) * [`jobs..if`](/actions/reference/workflow-syntax-for-github-actions#jobsjob_idif) * [`jobs..permissions`](/actions/reference/workflow-syntax-for-github-actions#jobsjob_idpermissions) diff --git a/content/actions/using-workflows/workflow-syntax-for-github-actions.md b/content/actions/using-workflows/workflow-syntax-for-github-actions.md index 57c81c47b2..c95bbcf209 100644 --- a/content/actions/using-workflows/workflow-syntax-for-github-actions.md +++ b/content/actions/using-workflows/workflow-syntax-for-github-actions.md @@ -157,42 +157,6 @@ jobs: ``` {% endraw %} -{% if actions-inherit-secrets-reusable-workflows %} - -#### `on.workflow_call.secrets.inherit` - -Use the `inherit` keyword to pass all the calling workflow's secrets to the called workflow. This includes all secrets the calling workflow has access to, namely organization, repository, and environment secrets. The `inherit` keyword can be used to pass secrets across repositories within the same organization, or across organizations within the same enterprise. - -#### Example - -{% raw %} - -```yaml -on: - workflow_dispatch: - -jobs: - pass-secrets-to-workflow: - uses: ./.github/workflows/called-workflow.yml - secrets: inherit -``` - -```yaml -on: - workflow_call: - -jobs: - pass-secret-to-action: - runs-on: ubuntu-latest - steps: - - name: Use a repo or org secret from the calling workflow. - uses: echo ${{ secrets.CALLING_WORKFLOW_SECRET }} -``` - -{% endraw %} - -{%endif%} - #### `on.workflow_call.secrets.` A string identifier to associate with the secret. diff --git a/data/features/actions-inherit-secrets-reusable-workflows.yml b/data/features/actions-inherit-secrets-reusable-workflows.yml deleted file mode 100644 index 2b7e38e99c..0000000000 --- a/data/features/actions-inherit-secrets-reusable-workflows.yml +++ /dev/null @@ -1,7 +0,0 @@ -# Reference: #6920 -# Documentation for inheriting secrets from the calling workflow -versions: - fpt: '*' - ghec: '*' - ghes: '>= 3.6' - ghae: diff --git a/data/reusables/actions/pass-inputs-to-reusable-workflows.md b/data/reusables/actions/pass-inputs-to-reusable-workflows.md index 32d11ea33b..ce6074f0c9 100644 --- a/data/reusables/actions/pass-inputs-to-reusable-workflows.md +++ b/data/reusables/actions/pass-inputs-to-reusable-workflows.md @@ -11,19 +11,3 @@ jobs: envPAT: ${{ secrets.envPAT }} ``` {% endraw %} - -{% if actions-inherit-secrets-reusable-workflows %} -Workflows that call reusable workflows in the same organization or enterprise can use the `inherit` keyword to implicitly pass the secrets. - -{% raw %} -```yaml -jobs: - call-workflow-passing-data: - uses: octo-org/example-repo/.github/workflows/reusable-workflow.yml@main - with: - username: mona - secrets: inherit -``` -{% endraw %} - -{%endif%} \ No newline at end of file