Skip to content

Commit

Permalink
feat: new deployment protection rule endpoints, new private reportin…
Browse files Browse the repository at this point in the history
…g of security vulnerabilities endpoint (#533)
  • Loading branch information
octokitbot authored Apr 28, 2023
1 parent 1c67ed4 commit c1af6e0
Show file tree
Hide file tree
Showing 4 changed files with 243 additions and 9 deletions.
14 changes: 7 additions & 7 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
},
"description": "Shared TypeScript definitions for Octokit projects",
"dependencies": {
"@octokit/openapi-types": "^17.0.0"
"@octokit/openapi-types": "^17.1.0"
},
"scripts": {
"build": "pika-pack build",
Expand Down Expand Up @@ -105,6 +105,6 @@
]
},
"octokit": {
"openapi-version": "11.0.0"
"openapi-version": "11.1.0"
}
}
185 changes: 185 additions & 0 deletions scripts/update-endpoints/generated/endpoints.json
Original file line number Diff line number Diff line change
Expand Up @@ -1750,6 +1750,18 @@
"previews": [],
"renamed": null
},
{
"method": "POST",
"url": "/repos/{owner}/{repo}/actions/runs/{run_id}/deployment_protection_rule",
"documentationUrl": "https://docs.github.com/rest/actions/workflow-runs#review-custom-deployment-protection-rules-for-a-workflow-run",
"parameters": [
{ "alias": null, "deprecated": null, "in": "PATH", "name": "owner" },
{ "alias": null, "deprecated": null, "in": "PATH", "name": "repo" },
{ "alias": null, "deprecated": null, "in": "PATH", "name": "run_id" }
],
"previews": [],
"renamed": null
},
{
"method": "POST",
"url": "/repos/{owner}/{repo}/actions/runs/{run_id}/pending_deployments",
Expand Down Expand Up @@ -10779,6 +10791,29 @@
"previews": [],
"renamed": null
},
{
"method": "POST",
"url": "/repos/{owner}/{repo}/environments/{environment_name}/deployment_protection_rules",
"documentationUrl": "https://docs.github.com/rest/deployments/deployment-protection-rules#create-a-deployment-protection-rule",
"parameters": [
{
"alias": null,
"deprecated": null,
"in": "PATH",
"name": "environment_name"
},
{ "alias": null, "deprecated": null, "in": "PATH", "name": "repo" },
{ "alias": null, "deprecated": null, "in": "PATH", "name": "owner" },
{
"alias": null,
"deprecated": null,
"in": "BODY",
"name": "integration_id"
}
],
"previews": [],
"renamed": null
},
{
"method": "POST",
"url": "/repos/{owner}/{repo}/deployments/{deployment_id}/statuses",
Expand Down Expand Up @@ -12024,6 +12059,29 @@
"previews": [],
"renamed": null
},
{
"method": "DELETE",
"url": "/repos/{owner}/{repo}/environments/{environment_name}/deployment_protection_rules/{protection_rule_id}",
"documentationUrl": "https://docs.github.com/rest/deployments/protection-rules#disable-deployment-protection-rule",
"parameters": [
{
"alias": null,
"deprecated": null,
"in": "PATH",
"name": "environment_name"
},
{ "alias": null, "deprecated": null, "in": "PATH", "name": "repo" },
{ "alias": null, "deprecated": null, "in": "PATH", "name": "owner" },
{
"alias": null,
"deprecated": null,
"in": "PATH",
"name": "protection_rule_id"
}
],
"previews": [],
"renamed": null
},
{
"method": "DELETE",
"url": "/repos/{owner}/{repo}/lfs",
Expand Down Expand Up @@ -12192,6 +12250,23 @@
"previews": [],
"renamed": null
},
{
"method": "GET",
"url": "/repos/{owner}/{repo}/environments/{environment_name}/deployment_protection_rules",
"documentationUrl": "https://docs.github.com/rest/deployments/protection-rules#get-all-deployment-protection-rules",
"parameters": [
{
"alias": null,
"deprecated": null,
"in": "PATH",
"name": "environment_name"
},
{ "alias": null, "deprecated": null, "in": "PATH", "name": "repo" },
{ "alias": null, "deprecated": null, "in": "PATH", "name": "owner" }
],
"previews": [],
"renamed": null
},
{
"method": "GET",
"url": "/repos/{owner}/{repo}/environments",
Expand Down Expand Up @@ -12423,6 +12498,29 @@
"previews": [],
"renamed": null
},
{
"method": "GET",
"url": "/repos/{owner}/{repo}/environments/{environment_name}/deployment_protection_rules/{protection_rule_id}",
"documentationUrl": "https://docs.github.com/rest/deployments/protection-rules#get-a-deployment-protection-rule",
"parameters": [
{ "alias": null, "deprecated": null, "in": "PATH", "name": "owner" },
{ "alias": null, "deprecated": null, "in": "PATH", "name": "repo" },
{
"alias": null,
"deprecated": null,
"in": "PATH",
"name": "environment_name"
},
{
"alias": null,
"deprecated": null,
"in": "PATH",
"name": "protection_rule_id"
}
],
"previews": [],
"renamed": null
},
{
"method": "GET",
"url": "/repos/{owner}/{repo}/keys/{key_id}",
Expand Down Expand Up @@ -12961,6 +13059,25 @@
"previews": [],
"renamed": null
},
{
"method": "GET",
"url": "/repos/{owner}/{repo}/environments/{environment_name}/deployment_protection_rules/apps",
"documentationUrl": "https://docs.github.com/rest/deployments/protection-rules#list-custom-deployment-rule-integrations",
"parameters": [
{
"alias": null,
"deprecated": null,
"in": "PATH",
"name": "environment_name"
},
{ "alias": null, "deprecated": null, "in": "PATH", "name": "repo" },
{ "alias": null, "deprecated": null, "in": "PATH", "name": "owner" },
{ "alias": null, "deprecated": null, "in": "QUERY", "name": "page" },
{ "alias": null, "deprecated": null, "in": "QUERY", "name": "per_page" }
],
"previews": [],
"renamed": null
},
{
"method": "GET",
"url": "/repos/{owner}/{repo}/keys",
Expand Down Expand Up @@ -14803,6 +14920,74 @@
"previews": [],
"renamed": null
},
{
"method": "POST",
"url": "/repos/{owner}/{repo}/security-advisories/reports",
"documentationUrl": "https://docs.github.com/rest/security-advisories/repository-advisories#privately-report-a-security-vulnerability",
"parameters": [
{ "alias": null, "deprecated": null, "in": "PATH", "name": "owner" },
{ "alias": null, "deprecated": null, "in": "PATH", "name": "repo" },
{ "alias": null, "deprecated": null, "in": "BODY", "name": "summary" },
{
"alias": null,
"deprecated": null,
"in": "BODY",
"name": "description"
},
{
"alias": null,
"deprecated": null,
"in": "BODY",
"name": "vulnerabilities"
},
{
"alias": null,
"deprecated": null,
"in": "BODY",
"name": "vulnerabilities[].package"
},
{
"alias": null,
"deprecated": null,
"in": "BODY",
"name": "vulnerabilities[].package.ecosystem"
},
{
"alias": null,
"deprecated": null,
"in": "BODY",
"name": "vulnerabilities[].package.name"
},
{
"alias": null,
"deprecated": null,
"in": "BODY",
"name": "vulnerabilities[].vulnerable_version_range"
},
{
"alias": null,
"deprecated": null,
"in": "BODY",
"name": "vulnerabilities[].patched_versions"
},
{
"alias": null,
"deprecated": null,
"in": "BODY",
"name": "vulnerabilities[].vulnerable_functions"
},
{ "alias": null, "deprecated": null, "in": "BODY", "name": "cwe_ids" },
{ "alias": null, "deprecated": null, "in": "BODY", "name": "severity" },
{
"alias": null,
"deprecated": null,
"in": "BODY",
"name": "cvss_vector_string"
}
],
"previews": [],
"renamed": null
},
{
"method": "POST",
"url": "/repos/{owner}/{repo}/security-advisories",
Expand Down
49 changes: 49 additions & 0 deletions src/generated/Endpoints.ts
Original file line number Diff line number Diff line change
Expand Up @@ -686,6 +686,13 @@ export interface Endpoints {
"/repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies/{branch_policy_id}",
"delete"
>;
/**
* @see https://docs.github.com/rest/deployments/protection-rules#disable-deployment-protection-rule
*/
"DELETE /repos/{owner}/{repo}/environments/{environment_name}/deployment_protection_rules/{protection_rule_id}": Operation<
"/repos/{owner}/{repo}/environments/{environment_name}/deployment_protection_rules/{protection_rule_id}",
"delete"
>;
/**
* @see https://docs.github.com/rest/reference/git#delete-a-reference
*/
Expand Down Expand Up @@ -2778,6 +2785,27 @@ export interface Endpoints {
"/repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies/{branch_policy_id}",
"get"
>;
/**
* @see https://docs.github.com/rest/deployments/protection-rules#get-all-deployment-protection-rules
*/
"GET /repos/{owner}/{repo}/environments/{environment_name}/deployment_protection_rules": Operation<
"/repos/{owner}/{repo}/environments/{environment_name}/deployment_protection_rules",
"get"
>;
/**
* @see https://docs.github.com/rest/deployments/protection-rules#list-custom-deployment-rule-integrations
*/
"GET /repos/{owner}/{repo}/environments/{environment_name}/deployment_protection_rules/apps": Operation<
"/repos/{owner}/{repo}/environments/{environment_name}/deployment_protection_rules/apps",
"get"
>;
/**
* @see https://docs.github.com/rest/deployments/protection-rules#get-a-deployment-protection-rule
*/
"GET /repos/{owner}/{repo}/environments/{environment_name}/deployment_protection_rules/{protection_rule_id}": Operation<
"/repos/{owner}/{repo}/environments/{environment_name}/deployment_protection_rules/{protection_rule_id}",
"get"
>;
/**
* @see https://docs.github.com/rest/reference/activity#list-repository-events
*/
Expand Down Expand Up @@ -4708,6 +4736,13 @@ export interface Endpoints {
"/repos/{owner}/{repo}/actions/runs/{run_id}/cancel",
"post"
>;
/**
* @see https://docs.github.com/rest/actions/workflow-runs#review-custom-deployment-protection-rules-for-a-workflow-run
*/
"POST /repos/{owner}/{repo}/actions/runs/{run_id}/deployment_protection_rule": Operation<
"/repos/{owner}/{repo}/actions/runs/{run_id}/deployment_protection_rule",
"post"
>;
/**
* @see https://docs.github.com/rest/reference/actions#review-pending-deployments-for-a-workflow-run
*/
Expand Down Expand Up @@ -4890,6 +4925,13 @@ export interface Endpoints {
"/repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies",
"post"
>;
/**
* @see https://docs.github.com/rest/deployments/deployment-protection-rules#create-a-deployment-protection-rule
*/
"POST /repos/{owner}/{repo}/environments/{environment_name}/deployment_protection_rules": Operation<
"/repos/{owner}/{repo}/environments/{environment_name}/deployment_protection_rules",
"post"
>;
/**
* @see https://docs.github.com/rest/reference/repos#create-a-fork
*/
Expand Down Expand Up @@ -5156,6 +5198,13 @@ export interface Endpoints {
"/repos/{owner}/{repo}/security-advisories",
"post"
>;
/**
* @see https://docs.github.com/rest/security-advisories/repository-advisories#privately-report-a-security-vulnerability
*/
"POST /repos/{owner}/{repo}/security-advisories/reports": Operation<
"/repos/{owner}/{repo}/security-advisories/reports",
"post"
>;
/**
* @see https://docs.github.com/rest/commits/statuses#create-a-commit-status
*/
Expand Down

0 comments on commit c1af6e0

Please sign in to comment.