From 2b971b4717ac490d477a227aee231cfbcced8aa9 Mon Sep 17 00:00:00 2001 From: Octokit Bot Date: Fri, 5 Apr 2024 14:33:08 -0500 Subject: [PATCH] feat: Updates @octokit/types 13.1.0, updates docs (#727) * WIP octokit/openapi updated * WIP octokit/openapi updated --- docs/actions/listWorkflowRunsForRepo.md | 2 - docs/orgs/createWebhook.md | 7 +- docs/orgs/deleteWebhook.md | 5 - docs/orgs/get.md | 11 +++ docs/orgs/getWebhook.md | 8 +- docs/orgs/getWebhookConfigForOrg.md | 5 +- docs/orgs/getWebhookDelivery.md | 5 - docs/orgs/listWebhookDeliveries.md | 5 - docs/orgs/listWebhooks.md | 5 - docs/orgs/pingWebhook.md | 8 +- docs/orgs/redeliverWebhookDelivery.md | 5 - docs/orgs/update.md | 13 ++- docs/orgs/updateWebhook.md | 11 +-- docs/orgs/updateWebhookConfigForOrg.md | 5 +- package-lock.json | 8 +- package.json | 2 +- .../update-endpoints/generated/endpoints.json | 53 +++++----- src/generated/method-types.ts | 97 ++++++------------- 18 files changed, 89 insertions(+), 166 deletions(-) diff --git a/docs/actions/listWorkflowRunsForRepo.md b/docs/actions/listWorkflowRunsForRepo.md index 02ff060a6..339168ad2 100644 --- a/docs/actions/listWorkflowRunsForRepo.md +++ b/docs/actions/listWorkflowRunsForRepo.md @@ -14,8 +14,6 @@ Anyone with read access to the repository can use this endpoint. OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with a private repository. -This API will return up to 1,000 results for each search when using the following parameters: `actor`, `branch`, `check_suite_id`, `created`, `event`, `head_sha`, `status`. - ```js octokit.rest.actions.listWorkflowRunsForRepo({ owner, diff --git a/docs/orgs/createWebhook.md b/docs/orgs/createWebhook.md index 85a49e202..1816bc682 100644 --- a/docs/orgs/createWebhook.md +++ b/docs/orgs/createWebhook.md @@ -8,12 +8,7 @@ type: API method # Create an organization webhook -Create a hook that posts payloads in JSON format. - -You must be an organization owner to use this endpoint. - -OAuth app tokens and personal access tokens (classic) need `admin:org_hook` scope. OAuth apps cannot list, view, or -edit webhooks that they did not create and users cannot list, view, or edit webhooks that were created by OAuth apps. +Here's how you can create a hook that posts payloads in JSON format: ```js octokit.rest.orgs.createWebhook({ diff --git a/docs/orgs/deleteWebhook.md b/docs/orgs/deleteWebhook.md index 264614830..c56aed367 100644 --- a/docs/orgs/deleteWebhook.md +++ b/docs/orgs/deleteWebhook.md @@ -8,11 +8,6 @@ type: API method # Delete an organization webhook -You must be an organization owner to use this endpoint. - -OAuth app tokens and personal access tokens (classic) need `admin:org_hook` scope. OAuth apps cannot list, view, or edit -webhooks that they did not create and users cannot list, view, or edit webhooks that were created by OAuth apps. - ```js octokit.rest.orgs.deleteWebhook({ org, diff --git a/docs/orgs/get.md b/docs/orgs/get.md index ac5fa66d7..ab9422ce8 100644 --- a/docs/orgs/get.md +++ b/docs/orgs/get.md @@ -14,6 +14,17 @@ When the value of `two_factor_requirement_enabled` is `true`, the organization r To see the full details about an organization, the authenticated user must be an organization owner. +The values returned by this endpoint are set by the "Update an organization" endpoint. If your organization set a default security configuration (beta), the following values retrieved from the "Update an organization" endpoint have been overwritten by that configuration: + +- advanced_security_enabled_for_new_repositories +- dependabot_alerts_enabled_for_new_repositories +- dependabot_security_updates_enabled_for_new_repositories +- dependency_graph_enabled_for_new_repositories +- secret_scanning_enabled_for_new_repositories +- secret_scanning_push_protection_enabled_for_new_repositories + +For more information on security configurations, see "[Enabling security features at scale](https://docs.github.com/code-security/securing-your-organization/introduction-to-securing-your-organization-at-scale/about-enabling-security-features-at-scale)." + OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to see the full details about an organization. To see information about an organization's GitHub plan, GitHub Apps need the `Organization plan` permission. diff --git a/docs/orgs/getWebhook.md b/docs/orgs/getWebhook.md index da818607c..0336facf5 100644 --- a/docs/orgs/getWebhook.md +++ b/docs/orgs/getWebhook.md @@ -8,13 +8,7 @@ type: API method # Get an organization webhook -Returns a webhook configured in an organization. To get only the webhook -`config` properties, see "[Get a webhook configuration for an organization](/rest/orgs/webhooks#get-a-webhook-configuration-for-an-organization). - -You must be an organization owner to use this endpoint. - -OAuth app tokens and personal access tokens (classic) need `admin:org_hook` scope. OAuth apps cannot list, view, or edit -webhooks that they did not create and users cannot list, view, or edit webhooks that were created by OAuth apps. +Returns a webhook configured in an organization. To get only the webhook `config` properties, see "[Get a webhook configuration for an organization](/rest/orgs/webhooks#get-a-webhook-configuration-for-an-organization)." ```js octokit.rest.orgs.getWebhook({ diff --git a/docs/orgs/getWebhookConfigForOrg.md b/docs/orgs/getWebhookConfigForOrg.md index fda7301ad..9054df5eb 100644 --- a/docs/orgs/getWebhookConfigForOrg.md +++ b/docs/orgs/getWebhookConfigForOrg.md @@ -10,10 +10,7 @@ type: API method Returns the webhook configuration for an organization. To get more information about the webhook, including the `active` state and `events`, use "[Get an organization webhook ](/rest/orgs/webhooks#get-an-organization-webhook)." -You must be an organization owner to use this endpoint. - -OAuth app tokens and personal access tokens (classic) need `admin:org_hook` scope. OAuth apps cannot list, view, or edit -webhooks that they did not create and users cannot list, view, or edit webhooks that were created by OAuth apps. +OAuth app tokens and personal access tokens (classic) need the `admin:org_hook` scope to use this endpoint. ```js octokit.rest.orgs.getWebhookConfigForOrg({ diff --git a/docs/orgs/getWebhookDelivery.md b/docs/orgs/getWebhookDelivery.md index 95e030578..f121ee110 100644 --- a/docs/orgs/getWebhookDelivery.md +++ b/docs/orgs/getWebhookDelivery.md @@ -10,11 +10,6 @@ type: API method Returns a delivery for a webhook configured in an organization. -You must be an organization owner to use this endpoint. - -OAuth app tokens and personal access tokens (classic) need `admin:org_hook` scope. OAuth apps cannot list, view, or edit -webhooks that they did not create and users cannot list, view, or edit webhooks that were created by OAuth apps. - ```js octokit.rest.orgs.getWebhookDelivery({ org, diff --git a/docs/orgs/listWebhookDeliveries.md b/docs/orgs/listWebhookDeliveries.md index 6a51af539..cab01272f 100644 --- a/docs/orgs/listWebhookDeliveries.md +++ b/docs/orgs/listWebhookDeliveries.md @@ -10,11 +10,6 @@ type: API method Returns a list of webhook deliveries for a webhook configured in an organization. -You must be an organization owner to use this endpoint. - -OAuth app tokens and personal access tokens (classic) need `admin:org_hook` scope. OAuth apps cannot list, view, or edit -webhooks that they did not create and users cannot list, view, or edit webhooks that were created by OAuth apps. - ```js octokit.rest.orgs.listWebhookDeliveries({ org, diff --git a/docs/orgs/listWebhooks.md b/docs/orgs/listWebhooks.md index 99dadd898..d4558c113 100644 --- a/docs/orgs/listWebhooks.md +++ b/docs/orgs/listWebhooks.md @@ -8,11 +8,6 @@ type: API method # List organization webhooks -You must be an organization owner to use this endpoint. - -OAuth app tokens and personal access tokens (classic) need `admin:org_hook` scope. OAuth apps cannot list, view, or edit -webhooks that they did not create and users cannot list, view, or edit webhooks that were created by OAuth apps. - ```js octokit.rest.orgs.listWebhooks({ org, diff --git a/docs/orgs/pingWebhook.md b/docs/orgs/pingWebhook.md index 0741c4529..e8b2bfd7c 100644 --- a/docs/orgs/pingWebhook.md +++ b/docs/orgs/pingWebhook.md @@ -8,13 +8,7 @@ type: API method # Ping an organization webhook -This will trigger a [ping event](https://docs.github.com/webhooks/#ping-event) -to be sent to the hook. - -You must be an organization owner to use this endpoint. - -OAuth app tokens and personal access tokens (classic) need `admin:org_hook` scope. OAuth apps cannot list, view, or edit -webhooks that they did not create and users cannot list, view, or edit webhooks that were created by OAuth apps. +This will trigger a [ping event](https://docs.github.com/webhooks/#ping-event) to be sent to the hook. ```js octokit.rest.orgs.pingWebhook({ diff --git a/docs/orgs/redeliverWebhookDelivery.md b/docs/orgs/redeliverWebhookDelivery.md index 21b92919e..e3e0daac6 100644 --- a/docs/orgs/redeliverWebhookDelivery.md +++ b/docs/orgs/redeliverWebhookDelivery.md @@ -10,11 +10,6 @@ type: API method Redeliver a delivery for a webhook configured in an organization. -You must be an organization owner to use this endpoint. - -OAuth app tokens and personal access tokens (classic) need `admin:org_hook` scope. OAuth apps cannot list, view, or edit -webhooks that they did not create and users cannot list, view, or edit webhooks that were created by OAuth apps. - ```js octokit.rest.orgs.redeliverWebhookDelivery({ org, diff --git a/docs/orgs/update.md b/docs/orgs/update.md index ee4bc4766..9fce42c67 100644 --- a/docs/orgs/update.md +++ b/docs/orgs/update.md @@ -12,6 +12,17 @@ type: API method Updates the organization's profile and member privileges. +With security configurations (beta), your organization can choose a default security configuration which will automatically apply a set of security enablement settings to new repositories in your organization based on their visibility. For targeted repositories, the following attributes will be overridden by the default security configuration: + +- advanced_security_enabled_for_new_repositories +- dependabot_alerts_enabled_for_new_repositories +- dependabot_security_updates_enabled_for_new_repositories +- dependency_graph_enabled_for_new_repositories +- secret_scanning_enabled_for_new_repositories +- secret_scanning_push_protection_enabled_for_new_repositories + +For more information on setting a default security configuration, see "[Enabling security features at scale](https://docs.github.com/code-security/securing-your-organization/introduction-to-securing-your-organization-at-scale/about-enabling-security-features-at-scale)." + The authenticated user must be an organization owner to use this endpoint. OAuth app tokens and personal access tokens (classic) need the `admin:org` or `repo` scope to use this endpoint. @@ -70,7 +81,7 @@ The shorthand name of the company. descriptionno -The description of the company. +The description of the company. The maximum size is 160 characters. has_organization_projectsno diff --git a/docs/orgs/updateWebhook.md b/docs/orgs/updateWebhook.md index f1916765e..bde099155 100644 --- a/docs/orgs/updateWebhook.md +++ b/docs/orgs/updateWebhook.md @@ -8,16 +8,7 @@ type: API method # Update an organization webhook -Updates a webhook configured in an organization. When you update a webhook, -the `secret` will be overwritten. If you previously had a `secret` set, you must -provide the same `secret` or set a new `secret` or the secret will be removed. If -you are only updating individual webhook `config` properties, use "[Update a webhook -configuration for an organization](/rest/orgs/webhooks#update-a-webhook-configuration-for-an-organization)". - -You must be an organization owner to use this endpoint. - -OAuth app tokens and personal access tokens (classic) need `admin:org_hook` scope. OAuth apps cannot list, view, or edit -webhooks that they did not create and users cannot list, view, or edit webhooks that were created by OAuth apps. +Updates a webhook configured in an organization. When you update a webhook, the `secret` will be overwritten. If you previously had a `secret` set, you must provide the same `secret` or set a new `secret` or the secret will be removed. If you are only updating individual webhook `config` properties, use "[Update a webhook configuration for an organization](/rest/orgs/webhooks#update-a-webhook-configuration-for-an-organization)." ```js octokit.rest.orgs.updateWebhook({ diff --git a/docs/orgs/updateWebhookConfigForOrg.md b/docs/orgs/updateWebhookConfigForOrg.md index 6a75e22af..c6980349c 100644 --- a/docs/orgs/updateWebhookConfigForOrg.md +++ b/docs/orgs/updateWebhookConfigForOrg.md @@ -10,10 +10,7 @@ type: API method Updates the webhook configuration for an organization. To update more information about the webhook, including the `active` state and `events`, use "[Update an organization webhook ](/rest/orgs/webhooks#update-an-organization-webhook)." -You must be an organization owner to use this endpoint. - -OAuth app tokens and personal access tokens (classic) need `admin:org_hook` scope. OAuth apps cannot list, view, or edit -webhooks that they did not create and users cannot list, view, or edit webhooks that were created by OAuth apps. +OAuth app tokens and personal access tokens (classic) need the `admin:org_hook` scope to use this endpoint. ```js octokit.rest.orgs.updateWebhookConfigForOrg({ diff --git a/package-lock.json b/package-lock.json index 31179a9b8..a45d3a017 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,7 +9,7 @@ "version": "0.0.0-development", "license": "MIT", "dependencies": { - "@octokit/types": "^13.0.0" + "@octokit/types": "^13.1.0" }, "devDependencies": { "@octokit/core": "^6.0.0", @@ -1673,9 +1673,9 @@ "dev": true }, "node_modules/@octokit/types": { - "version": "13.0.0", - "resolved": "https://registry.npmjs.org/@octokit/types/-/types-13.0.0.tgz", - "integrity": "sha512-jSOgEoFZvjg78txlb7cuRTAEvyyQkIEB4Nujg5ZN7E1xaICsr8A0X045Nwb1wUWNrBUHBHZNtcsDIhk8d8ipCw==", + "version": "13.1.0", + "resolved": "https://registry.npmjs.org/@octokit/types/-/types-13.1.0.tgz", + "integrity": "sha512-nBwAFOYqVUUJ2AZFK4ZzESQptaAVqdTDKk8gE0Xr0o99WuPDSrhUC38x0F40xD9OUxXhOOuZKWNNVVLPSHQDvQ==", "dependencies": { "@octokit/openapi-types": "^21.0.0" } diff --git a/package.json b/package.json index 6a338431e..6eefb894c 100644 --- a/package.json +++ b/package.json @@ -25,7 +25,7 @@ "author": "Gregor Martynus (https://twitter.com/gr2m)", "license": "MIT", "dependencies": { - "@octokit/types": "^13.0.0" + "@octokit/types": "^13.1.0" }, "devDependencies": { "@octokit/core": "^6.0.0", diff --git a/scripts/update-endpoints/generated/endpoints.json b/scripts/update-endpoints/generated/endpoints.json index 4b90bfbd9..99640cf5e 100644 --- a/scripts/update-endpoints/generated/endpoints.json +++ b/scripts/update-endpoints/generated/endpoints.json @@ -6809,7 +6809,7 @@ "isDeprecated": false, "deprecationDate": null, "removalDate": null, - "description": "Lists all workflow runs for a repository. You can use parameters to narrow the list of results. For more information about using parameters, see [Parameters](https://docs.github.com/rest/guides/getting-started-with-the-rest-api#parameters).\n\nAnyone with read access to the repository can use this endpoint.\n\nOAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with a private repository.\n\nThis API will return up to 1,000 results for each search when using the following parameters: `actor`, `branch`, `check_suite_id`, `created`, `event`, `head_sha`, `status`.", + "description": "Lists all workflow runs for a repository. You can use parameters to narrow the list of results. For more information about using parameters, see [Parameters](https://docs.github.com/rest/guides/getting-started-with-the-rest-api#parameters).\n\nAnyone with read access to the repository can use this endpoint.\n\nOAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with a private repository.", "documentationUrl": "https://docs.github.com/rest/actions/workflow-runs#list-workflow-runs-for-a-repository", "previews": [], "headers": [], @@ -35461,7 +35461,7 @@ "isDeprecated": false, "deprecationDate": null, "removalDate": null, - "description": "Create a hook that posts payloads in JSON format.\n\nYou must be an organization owner to use this endpoint. \n\nOAuth app tokens and personal access tokens (classic) need `admin:org_hook` scope. OAuth apps cannot list, view, or \nedit webhooks that they did not create and users cannot list, view, or edit webhooks that were created by OAuth apps.", + "description": "Here's how you can create a hook that posts payloads in JSON format:", "documentationUrl": "https://docs.github.com/rest/orgs/webhooks#create-an-organization-webhook", "previews": [], "headers": [], @@ -35721,7 +35721,7 @@ "isDeprecated": false, "deprecationDate": null, "removalDate": null, - "description": "You must be an organization owner to use this endpoint. \n\nOAuth app tokens and personal access tokens (classic) need `admin:org_hook` scope. OAuth apps cannot list, view, or edit \nwebhooks that they did not create and users cannot list, view, or edit webhooks that were created by OAuth apps.", + "description": "", "documentationUrl": "https://docs.github.com/rest/orgs/webhooks#delete-an-organization-webhook", "previews": [], "headers": [], @@ -35853,7 +35853,7 @@ "isDeprecated": false, "deprecationDate": null, "removalDate": null, - "description": "Gets information about an organization.\n\nWhen the value of `two_factor_requirement_enabled` is `true`, the organization requires all members, billing managers, and outside collaborators to enable [two-factor authentication](https://docs.github.com/articles/securing-your-account-with-two-factor-authentication-2fa/).\n\nTo see the full details about an organization, the authenticated user must be an organization owner.\n\nOAuth app tokens and personal access tokens (classic) need the `admin:org` scope to see the full details about an organization.\n\nTo see information about an organization's GitHub plan, GitHub Apps need the `Organization plan` permission.", + "description": "Gets information about an organization.\n\nWhen the value of `two_factor_requirement_enabled` is `true`, the organization requires all members, billing managers, and outside collaborators to enable [two-factor authentication](https://docs.github.com/articles/securing-your-account-with-two-factor-authentication-2fa/).\n\nTo see the full details about an organization, the authenticated user must be an organization owner.\n\nThe values returned by this endpoint are set by the \"Update an organization\" endpoint. If your organization set a default security configuration (beta), the following values retrieved from the \"Update an organization\" endpoint have been overwritten by that configuration:\n\n- advanced_security_enabled_for_new_repositories\n- dependabot_alerts_enabled_for_new_repositories\n- dependabot_security_updates_enabled_for_new_repositories\n- dependency_graph_enabled_for_new_repositories\n- secret_scanning_enabled_for_new_repositories\n- secret_scanning_push_protection_enabled_for_new_repositories\n\nFor more information on security configurations, see \"[Enabling security features at scale](https://docs.github.com/code-security/securing-your-organization/introduction-to-securing-your-organization-at-scale/about-enabling-security-features-at-scale).\"\n\nOAuth app tokens and personal access tokens (classic) need the `admin:org` scope to see the full details about an organization.\n\nTo see information about an organization's GitHub plan, GitHub Apps need the `Organization plan` permission.", "documentationUrl": "https://docs.github.com/rest/orgs/orgs#get-an-organization", "previews": [], "headers": [], @@ -36153,7 +36153,7 @@ "isDeprecated": false, "deprecationDate": null, "removalDate": null, - "description": "Returns a webhook configured in an organization. To get only the webhook\n`config` properties, see \"[Get a webhook configuration for an organization](/rest/orgs/webhooks#get-a-webhook-configuration-for-an-organization). \n\nYou must be an organization owner to use this endpoint. \n\nOAuth app tokens and personal access tokens (classic) need `admin:org_hook` scope. OAuth apps cannot list, view, or edit \nwebhooks that they did not create and users cannot list, view, or edit webhooks that were created by OAuth apps.", + "description": "Returns a webhook configured in an organization. To get only the webhook `config` properties, see \"[Get a webhook configuration for an organization](/rest/orgs/webhooks#get-a-webhook-configuration-for-an-organization).\"", "documentationUrl": "https://docs.github.com/rest/orgs/webhooks#get-an-organization-webhook", "previews": [], "headers": [], @@ -36208,7 +36208,7 @@ "isDeprecated": false, "deprecationDate": null, "removalDate": null, - "description": "Returns the webhook configuration for an organization. To get more information about the webhook, including the `active` state and `events`, use \"[Get an organization webhook ](/rest/orgs/webhooks#get-an-organization-webhook).\"\n\nYou must be an organization owner to use this endpoint. \n\nOAuth app tokens and personal access tokens (classic) need `admin:org_hook` scope. OAuth apps cannot list, view, or edit \nwebhooks that they did not create and users cannot list, view, or edit webhooks that were created by OAuth apps.", + "description": "Returns the webhook configuration for an organization. To get more information about the webhook, including the `active` state and `events`, use \"[Get an organization webhook ](/rest/orgs/webhooks#get-an-organization-webhook).\"\n\nOAuth app tokens and personal access tokens (classic) need the `admin:org_hook` scope to use this endpoint.", "documentationUrl": "https://docs.github.com/rest/orgs/webhooks#get-a-webhook-configuration-for-an-organization", "previews": [], "headers": [], @@ -36262,7 +36262,7 @@ "isDeprecated": false, "deprecationDate": null, "removalDate": null, - "description": "Returns a delivery for a webhook configured in an organization.\n\nYou must be an organization owner to use this endpoint. \n\nOAuth app tokens and personal access tokens (classic) need `admin:org_hook` scope. OAuth apps cannot list, view, or edit \nwebhooks that they did not create and users cannot list, view, or edit webhooks that were created by OAuth apps.", + "description": "Returns a delivery for a webhook configured in an organization.", "documentationUrl": "https://docs.github.com/rest/orgs/webhooks#get-a-webhook-delivery-for-an-organization-webhook", "previews": [], "headers": [], @@ -38121,7 +38121,7 @@ "isDeprecated": false, "deprecationDate": null, "removalDate": null, - "description": "Returns a list of webhook deliveries for a webhook configured in an organization.\n\nYou must be an organization owner to use this endpoint. \n\nOAuth app tokens and personal access tokens (classic) need `admin:org_hook` scope. OAuth apps cannot list, view, or edit \nwebhooks that they did not create and users cannot list, view, or edit webhooks that were created by OAuth apps.", + "description": "Returns a list of webhook deliveries for a webhook configured in an organization.", "documentationUrl": "https://docs.github.com/rest/orgs/webhooks#list-deliveries-for-an-organization-webhook", "previews": [], "headers": [], @@ -38221,7 +38221,7 @@ "isDeprecated": false, "deprecationDate": null, "removalDate": null, - "description": "You must be an organization owner to use this endpoint. \n\nOAuth app tokens and personal access tokens (classic) need `admin:org_hook` scope. OAuth apps cannot list, view, or edit \nwebhooks that they did not create and users cannot list, view, or edit webhooks that were created by OAuth apps.", + "description": "", "documentationUrl": "https://docs.github.com/rest/orgs/webhooks#list-organization-webhooks", "previews": [], "headers": [], @@ -38389,7 +38389,7 @@ "isDeprecated": false, "deprecationDate": null, "removalDate": null, - "description": "This will trigger a [ping event](https://docs.github.com/webhooks/#ping-event)\nto be sent to the hook.\n\nYou must be an organization owner to use this endpoint. \n\nOAuth app tokens and personal access tokens (classic) need `admin:org_hook` scope. OAuth apps cannot list, view, or edit \nwebhooks that they did not create and users cannot list, view, or edit webhooks that were created by OAuth apps.", + "description": "This will trigger a [ping event](https://docs.github.com/webhooks/#ping-event) to be sent to the hook.", "documentationUrl": "https://docs.github.com/rest/orgs/webhooks#ping-an-organization-webhook", "previews": [], "headers": [], @@ -38436,7 +38436,7 @@ "isDeprecated": false, "deprecationDate": null, "removalDate": null, - "description": "Redeliver a delivery for a webhook configured in an organization.\n\nYou must be an organization owner to use this endpoint. \n\nOAuth app tokens and personal access tokens (classic) need `admin:org_hook` scope. OAuth apps cannot list, view, or edit \nwebhooks that they did not create and users cannot list, view, or edit webhooks that were created by OAuth apps.", + "description": "Redeliver a delivery for a webhook configured in an organization.", "documentationUrl": "https://docs.github.com/rest/orgs/webhooks#redeliver-a-delivery-for-an-organization-webhook", "previews": [], "headers": [], @@ -39330,7 +39330,7 @@ "isDeprecated": false, "deprecationDate": null, "removalDate": null, - "description": "**Parameter Deprecation Notice:** GitHub will replace and discontinue `members_allowed_repository_creation_type` in favor of more granular permissions. The new input parameters are `members_can_create_public_repositories`, `members_can_create_private_repositories` for all organizations and `members_can_create_internal_repositories` for organizations associated with an enterprise account using GitHub Enterprise Cloud or GitHub Enterprise Server 2.20+. For more information, see the [blog post](https://developer.github.com/changes/2019-12-03-internal-visibility-changes).\n\nUpdates the organization's profile and member privileges.\n\nThe authenticated user must be an organization owner to use this endpoint.\n\nOAuth app tokens and personal access tokens (classic) need the `admin:org` or `repo` scope to use this endpoint.", + "description": "**Parameter Deprecation Notice:** GitHub will replace and discontinue `members_allowed_repository_creation_type` in favor of more granular permissions. The new input parameters are `members_can_create_public_repositories`, `members_can_create_private_repositories` for all organizations and `members_can_create_internal_repositories` for organizations associated with an enterprise account using GitHub Enterprise Cloud or GitHub Enterprise Server 2.20+. For more information, see the [blog post](https://developer.github.com/changes/2019-12-03-internal-visibility-changes).\n\nUpdates the organization's profile and member privileges.\n\nWith security configurations (beta), your organization can choose a default security configuration which will automatically apply a set of security enablement settings to new repositories in your organization based on their visibility. For targeted repositories, the following attributes will be overridden by the default security configuration:\n\n- advanced_security_enabled_for_new_repositories\n- dependabot_alerts_enabled_for_new_repositories\n- dependabot_security_updates_enabled_for_new_repositories\n- dependency_graph_enabled_for_new_repositories\n- secret_scanning_enabled_for_new_repositories\n- secret_scanning_push_protection_enabled_for_new_repositories\n\nFor more information on setting a default security configuration, see \"[Enabling security features at scale](https://docs.github.com/code-security/securing-your-organization/introduction-to-securing-your-organization-at-scale/about-enabling-security-features-at-scale).\"\n\nThe authenticated user must be an organization owner to use this endpoint.\n\nOAuth app tokens and personal access tokens (classic) need the `admin:org` or `repo` scope to use this endpoint.", "documentationUrl": "https://docs.github.com/rest/orgs/orgs#update-an-organization", "previews": [], "headers": [], @@ -39428,7 +39428,7 @@ }, { "name": "description", - "description": "The description of the company.", + "description": "The description of the company. The maximum size is 160 characters.", "in": "BODY", "type": "string", "required": false, @@ -39953,7 +39953,7 @@ "isDeprecated": false, "deprecationDate": null, "removalDate": null, - "description": "Updates a webhook configured in an organization. When you update a webhook,\nthe `secret` will be overwritten. If you previously had a `secret` set, you must\nprovide the same `secret` or set a new `secret` or the secret will be removed. If\nyou are only updating individual webhook `config` properties, use \"[Update a webhook\nconfiguration for an organization](/rest/orgs/webhooks#update-a-webhook-configuration-for-an-organization)\". \n\nYou must be an organization owner to use this endpoint. \n\nOAuth app tokens and personal access tokens (classic) need `admin:org_hook` scope. OAuth apps cannot list, view, or edit \nwebhooks that they did not create and users cannot list, view, or edit webhooks that were created by OAuth apps.", + "description": "Updates a webhook configured in an organization. When you update a webhook, the `secret` will be overwritten. If you previously had a `secret` set, you must provide the same `secret` or set a new `secret` or the secret will be removed. If you are only updating individual webhook `config` properties, use \"[Update a webhook configuration for an organization](/rest/orgs/webhooks#update-a-webhook-configuration-for-an-organization).\"", "documentationUrl": "https://docs.github.com/rest/orgs/webhooks#update-an-organization-webhook", "previews": [], "headers": [], @@ -40117,7 +40117,7 @@ "isDeprecated": false, "deprecationDate": null, "removalDate": null, - "description": "Updates the webhook configuration for an organization. To update more information about the webhook, including the `active` state and `events`, use \"[Update an organization webhook ](/rest/orgs/webhooks#update-an-organization-webhook).\"\n\nYou must be an organization owner to use this endpoint. \n\nOAuth app tokens and personal access tokens (classic) need `admin:org_hook` scope. OAuth apps cannot list, view, or edit \nwebhooks that they did not create and users cannot list, view, or edit webhooks that were created by OAuth apps.", + "description": "Updates the webhook configuration for an organization. To update more information about the webhook, including the `active` state and `events`, use \"[Update an organization webhook ](/rest/orgs/webhooks#update-an-organization-webhook).\"\n\nOAuth app tokens and personal access tokens (classic) need the `admin:org_hook` scope to use this endpoint.", "documentationUrl": "https://docs.github.com/rest/orgs/webhooks#update-a-webhook-configuration-for-an-organization", "previews": [], "headers": [], @@ -45285,7 +45285,6 @@ }, { "code": 304, "description": "Not modified", "examples": null }, { "code": 404, "description": "Resource not found", "examples": null }, - { "code": 406, "description": "Unacceptable", "examples": null }, { "code": 500, "description": "Internal Error", "examples": null }, { "code": 503, "description": "Service unavailable", "examples": null } ], @@ -51821,7 +51820,6 @@ ], "responses": [ { "code": 204, "description": "Response", "examples": null }, - { "code": 404, "description": "Resource not found", "examples": null }, { "code": 422, "description": "Validation failed, or the endpoint has been spammed.", @@ -70802,7 +70800,7 @@ "description": "Response", "examples": [ { - "data": "[{\"type\":\"commit\",\"details\":{\"path\":\"/example/secrets.txt\",\"start_line\":1,\"end_line\":1,\"start_column\":1,\"end_column\":64,\"blob_sha\":\"af5626b4a114abcb82d63db7c8082c3c4756e51b\",\"blob_url\":\"https://api.github.com/repos/octocat/hello-world/git/blobs/af5626b4a114abcb82d63db7c8082c3c4756e51b\",\"commit_sha\":\"f14d7debf9775f957cf4f1e8176da0786431f72b\",\"commit_url\":\"https://api.github.com/repos/octocat/hello-world/git/commits/f14d7debf9775f957cf4f1e8176da0786431f72b\"}},{\"type\":\"wiki_commit\",\"details\":{\"path\":\"/example/Home.md\",\"start_line\":1,\"end_line\":1,\"start_column\":1,\"end_column\":64,\"blob_sha\":\"af5626b4a114abcb82d63db7c8082c3c4756e51b\",\"page_url\":\"https://github.com/octocat/Hello-World/wiki/Home/302c0b7e200761c9dd9b57e57db540ee0b4293a5\",\"commit_sha\":\"302c0b7e200761c9dd9b57e57db540ee0b4293a5\",\"commit_url\":\"https://github.com/octocat/Hello-World/wiki/_compare/302c0b7e200761c9dd9b57e57db540ee0b4293a5\"}},{\"type\":\"issue_title\",\"details\":{\"issue_title_url\":\"https://api.github.com/repos/octocat/Hello-World/issues/1347\"}},{\"type\":\"issue_body\",\"details\":{\"issue_body_url\":\"https://api.github.com/repos/octocat/Hello-World/issues/1347\"}},{\"type\":\"issue_comment\",\"details\":{\"issue_comment_url\":\"https://api.github.com/repos/octocat/Hello-World/issues/comments/1081119451\"}},{\"type\":\"discussion_title\",\"details\":{\"discussion_title_url\":\"https://github.com/community/community/discussions/39082\"}},{\"type\":\"discussion_body\",\"details\":{\"discussion_body_url\":\"https://github.com/community/community/discussions/39082#discussion-4566270\"}},{\"type\":\"discussion_comment\",\"details\":{\"discussion_comment_url\":\"https://github.com/community/community/discussions/39082#discussioncomment-4158232\"}},{\"type\":\"pull_request_title\",\"details\":{\"pull_request_title_url\":\"https://api.github.com/repos/octocat/Hello-World/pull/2846\"}},{\"type\":\"pull_request_body\",\"details\":{\"pull_request_body_url\":\"https://api.github.com/repos/octocat/Hello-World/pulls/2846\"}},{\"type\":\"pull_request_comment\",\"details\":{\"pull_request_comment_url\":\"https://api.github.com/repos/octocat/Hello-World/issues/comments/1825855898\"}},{\"type\":\"pull_request_review\",\"details\":{\"pull_request_review_url\":\"https://api.github.com/repos/octocat/Hello-World/pulls/2846/reviews/80\"}},{\"type\":\"pull_request_review_comment\",\"details\":{\"pull_request_review_comment_url\":\"https://api.github.com/repos/octocat/Hello-World/pulls/comments/12\"}}]" + "data": "[{\"type\":\"commit\",\"details\":{\"path\":\"/example/secrets.txt\",\"start_line\":1,\"end_line\":1,\"start_column\":1,\"end_column\":64,\"blob_sha\":\"af5626b4a114abcb82d63db7c8082c3c4756e51b\",\"blob_url\":\"https://api.github.com/repos/octocat/hello-world/git/blobs/af5626b4a114abcb82d63db7c8082c3c4756e51b\",\"commit_sha\":\"f14d7debf9775f957cf4f1e8176da0786431f72b\",\"commit_url\":\"https://api.github.com/repos/octocat/hello-world/git/commits/f14d7debf9775f957cf4f1e8176da0786431f72b\"}},{\"type\":\"issue_title\",\"details\":{\"issue_title_url\":\"https://api.github.com/repos/octocat/Hello-World/issues/1347\"}},{\"type\":\"issue_body\",\"details\":{\"issue_body_url\":\"https://api.github.com/repos/octocat/Hello-World/issues/1347\"}},{\"type\":\"issue_comment\",\"details\":{\"issue_comment_url\":\"https://api.github.com/repos/octocat/Hello-World/issues/comments/1081119451\"}},{\"type\":\"discussion_title\",\"details\":{\"discussion_title_url\":\"https://github.com/community/community/discussions/39082\"}},{\"type\":\"discussion_body\",\"details\":{\"discussion_body_url\":\"https://github.com/community/community/discussions/39082#discussion-4566270\"}},{\"type\":\"discussion_comment\",\"details\":{\"discussion_comment_url\":\"https://github.com/community/community/discussions/39082#discussioncomment-4158232\"}},{\"type\":\"pull_request_title\",\"details\":{\"pull_request_title_url\":\"https://api.github.com/repos/octocat/Hello-World/pull/2846\"}},{\"type\":\"pull_request_body\",\"details\":{\"pull_request_body_url\":\"https://api.github.com/repos/octocat/Hello-World/pulls/2846\"}},{\"type\":\"pull_request_comment\",\"details\":{\"pull_request_comment_url\":\"https://api.github.com/repos/octocat/Hello-World/issues/comments/1825855898\"}},{\"type\":\"pull_request_review\",\"details\":{\"pull_request_review_url\":\"https://api.github.com/repos/octocat/Hello-World/pulls/2846/reviews/80\"}},{\"type\":\"pull_request_review_comment\",\"details\":{\"pull_request_review_comment_url\":\"https://api.github.com/repos/octocat/Hello-World/pulls/comments/12\"}}]" } ] }, @@ -71807,19 +71805,18 @@ "type": "string", "required": false, "enum": [ - "rubygems", - "npm", - "pip", - "maven", - "nuget", + "actions", "composer", - "go", - "rust", "erlang", - "actions", - "pub", + "go", + "maven", + "npm", + "nuget", "other", - "swift" + "pip", + "pub", + "rubygems", + "rust" ], "allowNull": false, "mapToData": null, diff --git a/src/generated/method-types.ts b/src/generated/method-types.ts index 6c737c419..e6a2e2c38 100644 --- a/src/generated/method-types.ts +++ b/src/generated/method-types.ts @@ -1632,8 +1632,6 @@ export type RestEndpointMethods = { * Anyone with read access to the repository can use this endpoint. * * OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with a private repository. - * - * This API will return up to 1,000 results for each search when using the following parameters: `actor`, `branch`, `check_suite_id`, `created`, `event`, `head_sha`, `status`. */ listWorkflowRunsForRepo: { ( @@ -6876,12 +6874,7 @@ export type RestEndpointMethods = { endpoint: EndpointInterface<{ url: string }>; }; /** - * Create a hook that posts payloads in JSON format. - * - * You must be an organization owner to use this endpoint. - * - * OAuth app tokens and personal access tokens (classic) need `admin:org_hook` scope. OAuth apps cannot list, view, or - * edit webhooks that they did not create and users cannot list, view, or edit webhooks that were created by OAuth apps. + * Here's how you can create a hook that posts payloads in JSON format: */ createWebhook: { ( @@ -6925,12 +6918,7 @@ export type RestEndpointMethods = { defaults: RequestInterface["defaults"]; endpoint: EndpointInterface<{ url: string }>; }; - /** - * You must be an organization owner to use this endpoint. - * - * OAuth app tokens and personal access tokens (classic) need `admin:org_hook` scope. OAuth apps cannot list, view, or edit - * webhooks that they did not create and users cannot list, view, or edit webhooks that were created by OAuth apps. - */ + deleteWebhook: { ( params?: RestEndpointMethodTypes["orgs"]["deleteWebhook"]["parameters"], @@ -6961,6 +6949,17 @@ export type RestEndpointMethods = { * * To see the full details about an organization, the authenticated user must be an organization owner. * + * The values returned by this endpoint are set by the "Update an organization" endpoint. If your organization set a default security configuration (beta), the following values retrieved from the "Update an organization" endpoint have been overwritten by that configuration: + * + * - advanced_security_enabled_for_new_repositories + * - dependabot_alerts_enabled_for_new_repositories + * - dependabot_security_updates_enabled_for_new_repositories + * - dependency_graph_enabled_for_new_repositories + * - secret_scanning_enabled_for_new_repositories + * - secret_scanning_push_protection_enabled_for_new_repositories + * + * For more information on security configurations, see "[Enabling security features at scale](https://docs.github.com/code-security/securing-your-organization/introduction-to-securing-your-organization-at-scale/about-enabling-security-features-at-scale)." + * * OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to see the full details about an organization. * * To see information about an organization's GitHub plan, GitHub Apps need the `Organization plan` permission. @@ -7040,13 +7039,7 @@ export type RestEndpointMethods = { endpoint: EndpointInterface<{ url: string }>; }; /** - * Returns a webhook configured in an organization. To get only the webhook - * `config` properties, see "[Get a webhook configuration for an organization](/rest/orgs/webhooks#get-a-webhook-configuration-for-an-organization). - * - * You must be an organization owner to use this endpoint. - * - * OAuth app tokens and personal access tokens (classic) need `admin:org_hook` scope. OAuth apps cannot list, view, or edit - * webhooks that they did not create and users cannot list, view, or edit webhooks that were created by OAuth apps. + * Returns a webhook configured in an organization. To get only the webhook `config` properties, see "[Get a webhook configuration for an organization](/rest/orgs/webhooks#get-a-webhook-configuration-for-an-organization)." */ getWebhook: { ( @@ -7058,10 +7051,7 @@ export type RestEndpointMethods = { /** * Returns the webhook configuration for an organization. To get more information about the webhook, including the `active` state and `events`, use "[Get an organization webhook ](/rest/orgs/webhooks#get-an-organization-webhook)." * - * You must be an organization owner to use this endpoint. - * - * OAuth app tokens and personal access tokens (classic) need `admin:org_hook` scope. OAuth apps cannot list, view, or edit - * webhooks that they did not create and users cannot list, view, or edit webhooks that were created by OAuth apps. + * OAuth app tokens and personal access tokens (classic) need the `admin:org_hook` scope to use this endpoint. */ getWebhookConfigForOrg: { ( @@ -7074,11 +7064,6 @@ export type RestEndpointMethods = { }; /** * Returns a delivery for a webhook configured in an organization. - * - * You must be an organization owner to use this endpoint. - * - * OAuth app tokens and personal access tokens (classic) need `admin:org_hook` scope. OAuth apps cannot list, view, or edit - * webhooks that they did not create and users cannot list, view, or edit webhooks that were created by OAuth apps. */ getWebhookDelivery: { ( @@ -7393,11 +7378,6 @@ export type RestEndpointMethods = { }; /** * Returns a list of webhook deliveries for a webhook configured in an organization. - * - * You must be an organization owner to use this endpoint. - * - * OAuth app tokens and personal access tokens (classic) need `admin:org_hook` scope. OAuth apps cannot list, view, or edit - * webhooks that they did not create and users cannot list, view, or edit webhooks that were created by OAuth apps. */ listWebhookDeliveries: { ( @@ -7408,12 +7388,7 @@ export type RestEndpointMethods = { defaults: RequestInterface["defaults"]; endpoint: EndpointInterface<{ url: string }>; }; - /** - * You must be an organization owner to use this endpoint. - * - * OAuth app tokens and personal access tokens (classic) need `admin:org_hook` scope. OAuth apps cannot list, view, or edit - * webhooks that they did not create and users cannot list, view, or edit webhooks that were created by OAuth apps. - */ + listWebhooks: { ( params?: RestEndpointMethodTypes["orgs"]["listWebhooks"]["parameters"], @@ -7442,13 +7417,7 @@ export type RestEndpointMethods = { endpoint: EndpointInterface<{ url: string }>; }; /** - * This will trigger a [ping event](https://docs.github.com/webhooks/#ping-event) - * to be sent to the hook. - * - * You must be an organization owner to use this endpoint. - * - * OAuth app tokens and personal access tokens (classic) need `admin:org_hook` scope. OAuth apps cannot list, view, or edit - * webhooks that they did not create and users cannot list, view, or edit webhooks that were created by OAuth apps. + * This will trigger a [ping event](https://docs.github.com/webhooks/#ping-event) to be sent to the hook. */ pingWebhook: { ( @@ -7459,11 +7428,6 @@ export type RestEndpointMethods = { }; /** * Redeliver a delivery for a webhook configured in an organization. - * - * You must be an organization owner to use this endpoint. - * - * OAuth app tokens and personal access tokens (classic) need `admin:org_hook` scope. OAuth apps cannot list, view, or edit - * webhooks that they did not create and users cannot list, view, or edit webhooks that were created by OAuth apps. */ redeliverWebhookDelivery: { ( @@ -7695,6 +7659,17 @@ export type RestEndpointMethods = { * * Updates the organization's profile and member privileges. * + * With security configurations (beta), your organization can choose a default security configuration which will automatically apply a set of security enablement settings to new repositories in your organization based on their visibility. For targeted repositories, the following attributes will be overridden by the default security configuration: + * + * - advanced_security_enabled_for_new_repositories + * - dependabot_alerts_enabled_for_new_repositories + * - dependabot_security_updates_enabled_for_new_repositories + * - dependency_graph_enabled_for_new_repositories + * - secret_scanning_enabled_for_new_repositories + * - secret_scanning_push_protection_enabled_for_new_repositories + * + * For more information on setting a default security configuration, see "[Enabling security features at scale](https://docs.github.com/code-security/securing-your-organization/introduction-to-securing-your-organization-at-scale/about-enabling-security-features-at-scale)." + * * The authenticated user must be an organization owner to use this endpoint. * * OAuth app tokens and personal access tokens (classic) need the `admin:org` or `repo` scope to use this endpoint. @@ -7747,16 +7722,7 @@ export type RestEndpointMethods = { endpoint: EndpointInterface<{ url: string }>; }; /** - * Updates a webhook configured in an organization. When you update a webhook, - * the `secret` will be overwritten. If you previously had a `secret` set, you must - * provide the same `secret` or set a new `secret` or the secret will be removed. If - * you are only updating individual webhook `config` properties, use "[Update a webhook - * configuration for an organization](/rest/orgs/webhooks#update-a-webhook-configuration-for-an-organization)". - * - * You must be an organization owner to use this endpoint. - * - * OAuth app tokens and personal access tokens (classic) need `admin:org_hook` scope. OAuth apps cannot list, view, or edit - * webhooks that they did not create and users cannot list, view, or edit webhooks that were created by OAuth apps. + * Updates a webhook configured in an organization. When you update a webhook, the `secret` will be overwritten. If you previously had a `secret` set, you must provide the same `secret` or set a new `secret` or the secret will be removed. If you are only updating individual webhook `config` properties, use "[Update a webhook configuration for an organization](/rest/orgs/webhooks#update-a-webhook-configuration-for-an-organization)." */ updateWebhook: { ( @@ -7768,10 +7734,7 @@ export type RestEndpointMethods = { /** * Updates the webhook configuration for an organization. To update more information about the webhook, including the `active` state and `events`, use "[Update an organization webhook ](/rest/orgs/webhooks#update-an-organization-webhook)." * - * You must be an organization owner to use this endpoint. - * - * OAuth app tokens and personal access tokens (classic) need `admin:org_hook` scope. OAuth apps cannot list, view, or edit - * webhooks that they did not create and users cannot list, view, or edit webhooks that were created by OAuth apps. + * OAuth app tokens and personal access tokens (classic) need the `admin:org_hook` scope to use this endpoint. */ updateWebhookConfigForOrg: { (