From 4c8810ad63e6e8519615dfcb8da9995f6be6ff01 Mon Sep 17 00:00:00 2001 From: Octokit Bot Date: Tue, 9 Apr 2024 12:27:28 -0500 Subject: [PATCH] fix(docs): update information on methods (#728) --- docs/actions/listWorkflowRunsForRepo.md | 2 + docs/orgs/createWebhook.md | 7 +- docs/orgs/deleteWebhook.md | 5 ++ 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/updateWebhook.md | 11 ++- docs/orgs/updateWebhookConfigForOrg.md | 5 +- package-lock.json | 16 ++-- package.json | 2 +- .../update-endpoints/generated/endpoints.json | 51 +++++++------ src/generated/method-types.ts | 75 +++++++++++++++++-- 16 files changed, 168 insertions(+), 47 deletions(-) diff --git a/docs/actions/listWorkflowRunsForRepo.md b/docs/actions/listWorkflowRunsForRepo.md index 339168ad2..02ff060a6 100644 --- a/docs/actions/listWorkflowRunsForRepo.md +++ b/docs/actions/listWorkflowRunsForRepo.md @@ -14,6 +14,8 @@ 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 1816bc682..85a49e202 100644 --- a/docs/orgs/createWebhook.md +++ b/docs/orgs/createWebhook.md @@ -8,7 +8,12 @@ type: API method # Create an organization webhook -Here's how you can create a hook that posts payloads in JSON format: +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. ```js octokit.rest.orgs.createWebhook({ diff --git a/docs/orgs/deleteWebhook.md b/docs/orgs/deleteWebhook.md index c56aed367..264614830 100644 --- a/docs/orgs/deleteWebhook.md +++ b/docs/orgs/deleteWebhook.md @@ -8,6 +8,11 @@ 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/getWebhook.md b/docs/orgs/getWebhook.md index 0336facf5..da818607c 100644 --- a/docs/orgs/getWebhook.md +++ b/docs/orgs/getWebhook.md @@ -8,7 +8,13 @@ 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)." +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. ```js octokit.rest.orgs.getWebhook({ diff --git a/docs/orgs/getWebhookConfigForOrg.md b/docs/orgs/getWebhookConfigForOrg.md index 9054df5eb..fda7301ad 100644 --- a/docs/orgs/getWebhookConfigForOrg.md +++ b/docs/orgs/getWebhookConfigForOrg.md @@ -10,7 +10,10 @@ 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)." -OAuth app tokens and personal access tokens (classic) need the `admin:org_hook` scope to use this endpoint. +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.getWebhookConfigForOrg({ diff --git a/docs/orgs/getWebhookDelivery.md b/docs/orgs/getWebhookDelivery.md index f121ee110..95e030578 100644 --- a/docs/orgs/getWebhookDelivery.md +++ b/docs/orgs/getWebhookDelivery.md @@ -10,6 +10,11 @@ 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 cab01272f..6a51af539 100644 --- a/docs/orgs/listWebhookDeliveries.md +++ b/docs/orgs/listWebhookDeliveries.md @@ -10,6 +10,11 @@ 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 d4558c113..99dadd898 100644 --- a/docs/orgs/listWebhooks.md +++ b/docs/orgs/listWebhooks.md @@ -8,6 +8,11 @@ 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 e8b2bfd7c..0741c4529 100644 --- a/docs/orgs/pingWebhook.md +++ b/docs/orgs/pingWebhook.md @@ -8,7 +8,13 @@ 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. +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. ```js octokit.rest.orgs.pingWebhook({ diff --git a/docs/orgs/redeliverWebhookDelivery.md b/docs/orgs/redeliverWebhookDelivery.md index e3e0daac6..21b92919e 100644 --- a/docs/orgs/redeliverWebhookDelivery.md +++ b/docs/orgs/redeliverWebhookDelivery.md @@ -10,6 +10,11 @@ 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/updateWebhook.md b/docs/orgs/updateWebhook.md index bde099155..f1916765e 100644 --- a/docs/orgs/updateWebhook.md +++ b/docs/orgs/updateWebhook.md @@ -8,7 +8,16 @@ 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)." +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. ```js octokit.rest.orgs.updateWebhook({ diff --git a/docs/orgs/updateWebhookConfigForOrg.md b/docs/orgs/updateWebhookConfigForOrg.md index c6980349c..6a75e22af 100644 --- a/docs/orgs/updateWebhookConfigForOrg.md +++ b/docs/orgs/updateWebhookConfigForOrg.md @@ -10,7 +10,10 @@ 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)." -OAuth app tokens and personal access tokens (classic) need the `admin:org_hook` scope to use this endpoint. +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.updateWebhookConfigForOrg({ diff --git a/package-lock.json b/package-lock.json index a45d3a017..fea0321cb 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,7 +9,7 @@ "version": "0.0.0-development", "license": "MIT", "dependencies": { - "@octokit/types": "^13.1.0" + "@octokit/types": "^13.3.0" }, "devDependencies": { "@octokit/core": "^6.0.0", @@ -1605,9 +1605,9 @@ } }, "node_modules/@octokit/openapi-types": { - "version": "21.0.0", - "resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-21.0.0.tgz", - "integrity": "sha512-B6/NBvsNQT5UWYWSFcUT55XTMZBHyflNke7Ryvhs3dLe3I2TTPwpGPMib70YS1Ha5Iccc5CtXTLU7lHstC5e3Q==" + "version": "22.0.0", + "resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-22.0.0.tgz", + "integrity": "sha512-kWzSxSIBjCtwrT8/O/A/nrSjmHvR5I9GGTHPyBU19VuEae+QZfaPnnfLwXgV56n51xHN3U2dYy8zh/kO9/39ig==" }, "node_modules/@octokit/request": { "version": "9.0.0", @@ -1673,11 +1673,11 @@ "dev": true }, "node_modules/@octokit/types": { - "version": "13.1.0", - "resolved": "https://registry.npmjs.org/@octokit/types/-/types-13.1.0.tgz", - "integrity": "sha512-nBwAFOYqVUUJ2AZFK4ZzESQptaAVqdTDKk8gE0Xr0o99WuPDSrhUC38x0F40xD9OUxXhOOuZKWNNVVLPSHQDvQ==", + "version": "13.3.0", + "resolved": "https://registry.npmjs.org/@octokit/types/-/types-13.3.0.tgz", + "integrity": "sha512-L0Jd3e0FWSPNTmqtqiS61K4Qd9r9iAOCtqo1B12z/qe+KDjXvQF5FngLqSWzJ748lFfaPItjsv4+36dA4KrPVA==", "dependencies": { - "@octokit/openapi-types": "^21.0.0" + "@octokit/openapi-types": "^22.0.0" } }, "node_modules/@pkgjs/parseargs": { diff --git a/package.json b/package.json index 6eefb894c..7a379a58a 100644 --- a/package.json +++ b/package.json @@ -25,7 +25,7 @@ "author": "Gregor Martynus (https://twitter.com/gr2m)", "license": "MIT", "dependencies": { - "@octokit/types": "^13.1.0" + "@octokit/types": "^13.3.0" }, "devDependencies": { "@octokit/core": "^6.0.0", diff --git a/scripts/update-endpoints/generated/endpoints.json b/scripts/update-endpoints/generated/endpoints.json index 99640cf5e..ea86e4033 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.", + "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`.", "documentationUrl": "https://docs.github.com/rest/actions/workflow-runs#list-workflow-runs-for-a-repository", "previews": [], "headers": [], @@ -35171,7 +35171,7 @@ "name": "properties[].default_value", "description": "Default value of the property", "in": "BODY", - "type": "string", + "type": null, "required": false, "enum": null, "allowNull": true, @@ -35401,7 +35401,7 @@ "name": "default_value", "description": "Default value of the property", "in": "BODY", - "type": "string", + "type": null, "required": false, "enum": null, "allowNull": true, @@ -35461,7 +35461,7 @@ "isDeprecated": false, "deprecationDate": null, "removalDate": null, - "description": "Here's how you can create a hook that posts payloads in JSON format:", + "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.", "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": "", + "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.", "documentationUrl": "https://docs.github.com/rest/orgs/webhooks#delete-an-organization-webhook", "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 `config` properties, see \"[Get a webhook configuration for an organization](/rest/orgs/webhooks#get-a-webhook-configuration-for-an-organization).\"", + "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.", "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\nOAuth app tokens and personal access tokens (classic) need the `admin:org_hook` scope to use this endpoint.", + "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.", "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.", + "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.", "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.", + "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.", "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": "", + "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.", "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) to be sent to the hook.", + "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.", "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.", + "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.", "documentationUrl": "https://docs.github.com/rest/orgs/webhooks#redeliver-a-delivery-for-an-organization-webhook", "previews": [], "headers": [], @@ -39953,7 +39953,7 @@ "isDeprecated": false, "deprecationDate": null, "removalDate": null, - "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).\"", + "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.", "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\nOAuth app tokens and personal access tokens (classic) need the `admin:org_hook` scope to use this endpoint.", + "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.", "documentationUrl": "https://docs.github.com/rest/orgs/webhooks#update-a-webhook-configuration-for-an-organization", "previews": [], "headers": [], @@ -45285,6 +45285,7 @@ }, { "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 } ], @@ -51820,6 +51821,7 @@ ], "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.", @@ -70800,7 +70802,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\":\"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\":\"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\"}}]" } ] }, @@ -71805,18 +71807,19 @@ "type": "string", "required": false, "enum": [ - "actions", - "composer", - "erlang", - "go", - "maven", + "rubygems", "npm", - "nuget", - "other", "pip", + "maven", + "nuget", + "composer", + "go", + "rust", + "erlang", + "actions", "pub", - "rubygems", - "rust" + "other", + "swift" ], "allowNull": false, "mapToData": null, diff --git a/src/generated/method-types.ts b/src/generated/method-types.ts index e6a2e2c38..ea90e9353 100644 --- a/src/generated/method-types.ts +++ b/src/generated/method-types.ts @@ -1632,6 +1632,8 @@ 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: { ( @@ -6874,7 +6876,12 @@ export type RestEndpointMethods = { endpoint: EndpointInterface<{ url: string }>; }; /** - * Here's how you can create a hook that posts payloads in JSON format: + * 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. */ createWebhook: { ( @@ -6918,7 +6925,12 @@ 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"], @@ -7039,7 +7051,13 @@ 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)." + * 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. */ getWebhook: { ( @@ -7051,7 +7069,10 @@ 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)." * - * OAuth app tokens and personal access tokens (classic) need the `admin:org_hook` scope to use this endpoint. + * 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. */ getWebhookConfigForOrg: { ( @@ -7064,6 +7085,11 @@ 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: { ( @@ -7378,6 +7404,11 @@ 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: { ( @@ -7388,7 +7419,12 @@ 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"], @@ -7417,7 +7453,13 @@ 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. + * 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. */ pingWebhook: { ( @@ -7428,6 +7470,11 @@ 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: { ( @@ -7722,7 +7769,16 @@ 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)." + * 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. */ updateWebhook: { ( @@ -7734,7 +7790,10 @@ 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)." * - * OAuth app tokens and personal access tokens (classic) need the `admin:org_hook` scope to use this endpoint. + * 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. */ updateWebhookConfigForOrg: { (