From adb648676fcd8409b23c2ddbef888f0e9eb09eaa Mon Sep 17 00:00:00 2001 From: Mike Griffin Date: Thu, 18 Nov 2021 10:48:35 +0000 Subject: [PATCH 1/3] Remove the 11.10.x note --- .../upgrade-requirements.md | 1 - 1 file changed, 1 deletion(-) diff --git a/content/admin/enterprise-management/updating-the-virtual-machine-and-physical-resources/upgrade-requirements.md b/content/admin/enterprise-management/updating-the-virtual-machine-and-physical-resources/upgrade-requirements.md index eb0e6bf8aa..829cdf411e 100644 --- a/content/admin/enterprise-management/updating-the-virtual-machine-and-physical-resources/upgrade-requirements.md +++ b/content/admin/enterprise-management/updating-the-virtual-machine-and-physical-resources/upgrade-requirements.md @@ -16,7 +16,6 @@ topics: {% note %} **Notes:** -- To upgrade from {% data variables.product.prodname_enterprise %} 11.10.348 through {% data variables.product.current-340-version %}, you must first migrate to {% data variables.product.prodname_enterprise %} 2.1.23. For more information, see "[Migrating from {% data variables.product.prodname_enterprise %} 11.10.x to 2.1.23](/enterprise/{{ currentVersion }}/admin/guides/installation/migrating-from-github-enterprise-11-10-x-to-2-1-23)." - Upgrade packages are available at [enterprise.github.com](https://enterprise.github.com/releases) for supported versions. Verify the availability of the upgrade packages you will need to complete the upgrade. If a package is not available, contact {% data variables.contact.contact_ent_support %} for assistance. - If you're using {% data variables.product.prodname_ghe_server %} Clustering, see "[Upgrading a cluster](/enterprise/{{ currentVersion }}/admin/guides/clustering/upgrading-a-cluster/)" in the {% data variables.product.prodname_ghe_server %} Clustering Guide for specific instructions unique to clustering. - The release notes for {% data variables.product.prodname_ghe_server %} provide a comprehensive list of new features for every version of {% data variables.product.prodname_ghe_server %}. For more information, see the [releases page](https://enterprise.github.com/releases). From a45a14f4d225ab8012f6866c9dcf23257b532bb9 Mon Sep 17 00:00:00 2001 From: github-openapi-bot <69533958+github-openapi-bot@users.noreply.github.com> Date: Thu, 18 Nov 2021 06:06:42 -0500 Subject: [PATCH 2/3] Update OpenAPI Descriptions --- lib/rest/static/decorated/api.github.com.json | 290 +++++++++++++++++- lib/rest/static/decorated/ghes-3.0.json | 290 +++++++++++++++++- lib/rest/static/decorated/ghes-3.1.json | 290 +++++++++++++++++- lib/rest/static/decorated/ghes-3.2.json | 290 +++++++++++++++++- lib/rest/static/decorated/ghes-3.3.json | 290 +++++++++++++++++- lib/rest/static/decorated/github.ae.json | 290 +++++++++++++++++- .../dereferenced/api.github.com.deref.json | 141 +++++++++ .../static/dereferenced/ghes-3.0.deref.json | 122 ++++++++ .../static/dereferenced/ghes-3.1.deref.json | 141 +++++++++ .../static/dereferenced/ghes-3.2.deref.json | 141 +++++++++ .../static/dereferenced/ghes-3.3.deref.json | 141 +++++++++ .../static/dereferenced/github.ae.deref.json | 122 ++++++++ 12 files changed, 2524 insertions(+), 24 deletions(-) diff --git a/lib/rest/static/decorated/api.github.com.json b/lib/rest/static/decorated/api.github.com.json index 5d85ff2a50..fa38d8fd90 100644 --- a/lib/rest/static/decorated/api.github.com.json +++ b/lib/rest/static/decorated/api.github.com.json @@ -38237,13 +38237,13 @@ "x-codeSamples": [ { "lang": "Shell", - "source": "curl \\\n -X PUT \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/branches/BRANCH/protection \\\n -d '{\"required_status_checks\":{\"strict\":true,\"contexts\":[\"contexts\"]},\"enforce_admins\":true,\"required_pull_request_reviews\":{\"dismissal_restrictions\":{\"users\":[\"users\"],\"teams\":[\"teams\"]},\"dismiss_stale_reviews\":true,\"require_code_owner_reviews\":true,\"required_approving_review_count\":42},\"restrictions\":{\"users\":[\"users\"],\"teams\":[\"teams\"],\"apps\":[\"apps\"]}}'", - "html": "
curl \\\n  -X PUT \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/branches/BRANCH/protection \\\n  -d '{\"required_status_checks\":{\"strict\":true,\"contexts\":[\"contexts\"]},\"enforce_admins\":true,\"required_pull_request_reviews\":{\"dismissal_restrictions\":{\"users\":[\"users\"],\"teams\":[\"teams\"]},\"dismiss_stale_reviews\":true,\"require_code_owner_reviews\":true,\"required_approving_review_count\":42},\"restrictions\":{\"users\":[\"users\"],\"teams\":[\"teams\"],\"apps\":[\"apps\"]}}'
" + "source": "curl \\\n -X PUT \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/branches/BRANCH/protection \\\n -d '{\"required_status_checks\":{\"strict\":true,\"contexts\":[\"contexts\"],\"checks\":[{\"context\":\"context\",\"app_id\":\"app_id\"}]},\"enforce_admins\":true,\"required_pull_request_reviews\":{\"dismissal_restrictions\":{\"users\":[\"users\"],\"teams\":[\"teams\"]},\"dismiss_stale_reviews\":true,\"require_code_owner_reviews\":true,\"required_approving_review_count\":42},\"restrictions\":{\"users\":[\"users\"],\"teams\":[\"teams\"],\"apps\":[\"apps\"]}}'", + "html": "
curl \\\n  -X PUT \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/branches/BRANCH/protection \\\n  -d '{\"required_status_checks\":{\"strict\":true,\"contexts\":[\"contexts\"],\"checks\":[{\"context\":\"context\",\"app_id\":\"app_id\"}]},\"enforce_admins\":true,\"required_pull_request_reviews\":{\"dismissal_restrictions\":{\"users\":[\"users\"],\"teams\":[\"teams\"]},\"dismiss_stale_reviews\":true,\"require_code_owner_reviews\":true,\"required_approving_review_count\":42},\"restrictions\":{\"users\":[\"users\"],\"teams\":[\"teams\"],\"apps\":[\"apps\"]}}'
" }, { "lang": "JavaScript", - "source": "await octokit.request('PUT /repos/{owner}/{repo}/branches/{branch}/protection', {\n owner: 'octocat',\n repo: 'hello-world',\n branch: 'branch',\n required_status_checks: {\n strict: true,\n contexts: [\n 'contexts'\n ]\n },\n enforce_admins: true,\n required_pull_request_reviews: {\n dismissal_restrictions: {\n users: [\n 'users'\n ],\n teams: [\n 'teams'\n ]\n },\n dismiss_stale_reviews: true,\n require_code_owner_reviews: true,\n required_approving_review_count: 42\n },\n restrictions: {\n users: [\n 'users'\n ],\n teams: [\n 'teams'\n ],\n apps: [\n 'apps'\n ]\n }\n})", - "html": "
await octokit.request('PUT /repos/{owner}/{repo}/branches/{branch}/protection', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  branch: 'branch',\n  required_status_checks: {\n    strict: true,\n    contexts: [\n      'contexts'\n    ]\n  },\n  enforce_admins: true,\n  required_pull_request_reviews: {\n    dismissal_restrictions: {\n      users: [\n        'users'\n      ],\n      teams: [\n        'teams'\n      ]\n    },\n    dismiss_stale_reviews: true,\n    require_code_owner_reviews: true,\n    required_approving_review_count: 42\n  },\n  restrictions: {\n    users: [\n      'users'\n    ],\n    teams: [\n      'teams'\n    ],\n    apps: [\n      'apps'\n    ]\n  }\n})\n
" + "source": "await octokit.request('PUT /repos/{owner}/{repo}/branches/{branch}/protection', {\n owner: 'octocat',\n repo: 'hello-world',\n branch: 'branch',\n required_status_checks: {\n strict: true,\n contexts: [\n 'contexts'\n ],\n checks: [\n {\n context: 'context',\n app_id: 'app_id'\n }\n ]\n },\n enforce_admins: true,\n required_pull_request_reviews: {\n dismissal_restrictions: {\n users: [\n 'users'\n ],\n teams: [\n 'teams'\n ]\n },\n dismiss_stale_reviews: true,\n require_code_owner_reviews: true,\n required_approving_review_count: 42\n },\n restrictions: {\n users: [\n 'users'\n ],\n teams: [\n 'teams'\n ],\n apps: [\n 'apps'\n ]\n }\n})", + "html": "
await octokit.request('PUT /repos/{owner}/{repo}/branches/{branch}/protection', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  branch: 'branch',\n  required_status_checks: {\n    strict: true,\n    contexts: [\n      'contexts'\n    ],\n    checks: [\n      {\n        context: 'context',\n        app_id: 'app_id'\n      }\n    ]\n  },\n  enforce_admins: true,\n  required_pull_request_reviews: {\n    dismissal_restrictions: {\n      users: [\n        'users'\n      ],\n      teams: [\n        'teams'\n      ]\n    },\n    dismiss_stale_reviews: true,\n    require_code_owner_reviews: true,\n    required_approving_review_count: 42\n  },\n  restrictions: {\n    users: [\n      'users'\n    ],\n    teams: [\n      'teams'\n    ],\n    apps: [\n      'apps'\n    ]\n  }\n})\n
" } ], "summary": "Update branch protection", @@ -38288,6 +38288,64 @@ "rawType": "array", "rawDescription": "The list of status checks to require in order to merge into this branch. If any of these checks have recently been set by a particular GitHub App, they will be required to come from that app in future for the branch to merge. Use `checks` instead of `contexts` for more fine-grained control.", "childParamsGroups": [] + }, + "checks": { + "type": "array of objects", + "description": "

The list of status checks to require in order to merge into this branch.

", + "items": { + "type": "object", + "properties": { + "context": { + "type": "string", + "description": "

The name of the required check

", + "name": "context", + "in": "body", + "rawType": "string", + "rawDescription": "The name of the required check", + "childParamsGroups": [] + }, + "app_id": { + "type": "string", + "description": "

The ID of the GitHub App that must provide this check. Set to null to accept the check from any source.

", + "name": "app_id", + "in": "body", + "rawType": "string", + "rawDescription": "The ID of the GitHub App that must provide this check. Set to `null` to accept the check from any source.", + "childParamsGroups": [] + } + } + }, + "name": "checks", + "in": "body", + "rawType": "array", + "rawDescription": "The list of status checks to require in order to merge into this branch.", + "childParamsGroups": [ + { + "parentName": "checks", + "parentType": "items", + "id": "checks-items", + "params": [ + { + "type": "string", + "description": "

The name of the required check

", + "name": "context", + "in": "body", + "rawType": "string", + "rawDescription": "The name of the required check", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "

The ID of the GitHub App that must provide this check. Set to null to accept the check from any source.

", + "name": "app_id", + "in": "body", + "rawType": "string", + "rawDescription": "The ID of the GitHub App that must provide this check. Set to `null` to accept the check from any source.", + "childParamsGroups": [] + } + ] + } + ] } }, "required": [ @@ -38324,6 +38382,89 @@ "rawType": "array", "rawDescription": "The list of status checks to require in order to merge into this branch. If any of these checks have recently been set by a particular GitHub App, they will be required to come from that app in future for the branch to merge. Use `checks` instead of `contexts` for more fine-grained control.", "childParamsGroups": [] + }, + { + "type": "array of objects", + "description": "

The list of status checks to require in order to merge into this branch.

", + "items": { + "type": "object", + "properties": { + "context": { + "type": "string", + "description": "

The name of the required check

", + "name": "context", + "in": "body", + "rawType": "string", + "rawDescription": "The name of the required check", + "childParamsGroups": [] + }, + "app_id": { + "type": "string", + "description": "

The ID of the GitHub App that must provide this check. Set to null to accept the check from any source.

", + "name": "app_id", + "in": "body", + "rawType": "string", + "rawDescription": "The ID of the GitHub App that must provide this check. Set to `null` to accept the check from any source.", + "childParamsGroups": [] + } + } + }, + "name": "checks", + "in": "body", + "rawType": "array", + "rawDescription": "The list of status checks to require in order to merge into this branch.", + "childParamsGroups": [ + { + "parentName": "checks", + "parentType": "items", + "id": "checks-items", + "params": [ + { + "type": "string", + "description": "

The name of the required check

", + "name": "context", + "in": "body", + "rawType": "string", + "rawDescription": "The name of the required check", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "

The ID of the GitHub App that must provide this check. Set to null to accept the check from any source.

", + "name": "app_id", + "in": "body", + "rawType": "string", + "rawDescription": "The ID of the GitHub App that must provide this check. Set to `null` to accept the check from any source.", + "childParamsGroups": [] + } + ] + } + ] + } + ] + }, + { + "parentName": "checks", + "parentType": "items", + "id": "checks-items", + "params": [ + { + "type": "string", + "description": "

The name of the required check

", + "name": "context", + "in": "body", + "rawType": "string", + "rawDescription": "The name of the required check", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "

The ID of the GitHub App that must provide this check. Set to null to accept the check from any source.

", + "name": "app_id", + "in": "body", + "rawType": "string", + "rawDescription": "The ID of the GitHub App that must provide this check. Set to `null` to accept the check from any source.", + "childParamsGroups": [] } ] } @@ -38821,6 +38962,64 @@ "rawType": "array", "rawDescription": "The list of status checks to require in order to merge into this branch. If any of these checks have recently been set by a particular GitHub App, they will be required to come from that app in future for the branch to merge. Use `checks` instead of `contexts` for more fine-grained control.", "childParamsGroups": [] + }, + "checks": { + "type": "array of objects", + "description": "

The list of status checks to require in order to merge into this branch.

", + "items": { + "type": "object", + "properties": { + "context": { + "type": "string", + "description": "

The name of the required check

", + "name": "context", + "in": "body", + "rawType": "string", + "rawDescription": "The name of the required check", + "childParamsGroups": [] + }, + "app_id": { + "type": "string", + "description": "

The ID of the GitHub App that must provide this check. Set to null to accept the check from any source.

", + "name": "app_id", + "in": "body", + "rawType": "string", + "rawDescription": "The ID of the GitHub App that must provide this check. Set to `null` to accept the check from any source.", + "childParamsGroups": [] + } + } + }, + "name": "checks", + "in": "body", + "rawType": "array", + "rawDescription": "The list of status checks to require in order to merge into this branch.", + "childParamsGroups": [ + { + "parentName": "checks", + "parentType": "items", + "id": "checks-items", + "params": [ + { + "type": "string", + "description": "

The name of the required check

", + "name": "context", + "in": "body", + "rawType": "string", + "rawDescription": "The name of the required check", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "

The ID of the GitHub App that must provide this check. Set to null to accept the check from any source.

", + "name": "app_id", + "in": "body", + "rawType": "string", + "rawDescription": "The ID of the GitHub App that must provide this check. Set to `null` to accept the check from any source.", + "childParamsGroups": [] + } + ] + } + ] } }, "required": [ @@ -38857,6 +39056,89 @@ "rawType": "array", "rawDescription": "The list of status checks to require in order to merge into this branch. If any of these checks have recently been set by a particular GitHub App, they will be required to come from that app in future for the branch to merge. Use `checks` instead of `contexts` for more fine-grained control.", "childParamsGroups": [] + }, + { + "type": "array of objects", + "description": "

The list of status checks to require in order to merge into this branch.

", + "items": { + "type": "object", + "properties": { + "context": { + "type": "string", + "description": "

The name of the required check

", + "name": "context", + "in": "body", + "rawType": "string", + "rawDescription": "The name of the required check", + "childParamsGroups": [] + }, + "app_id": { + "type": "string", + "description": "

The ID of the GitHub App that must provide this check. Set to null to accept the check from any source.

", + "name": "app_id", + "in": "body", + "rawType": "string", + "rawDescription": "The ID of the GitHub App that must provide this check. Set to `null` to accept the check from any source.", + "childParamsGroups": [] + } + } + }, + "name": "checks", + "in": "body", + "rawType": "array", + "rawDescription": "The list of status checks to require in order to merge into this branch.", + "childParamsGroups": [ + { + "parentName": "checks", + "parentType": "items", + "id": "checks-items", + "params": [ + { + "type": "string", + "description": "

The name of the required check

", + "name": "context", + "in": "body", + "rawType": "string", + "rawDescription": "The name of the required check", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "

The ID of the GitHub App that must provide this check. Set to null to accept the check from any source.

", + "name": "app_id", + "in": "body", + "rawType": "string", + "rawDescription": "The ID of the GitHub App that must provide this check. Set to `null` to accept the check from any source.", + "childParamsGroups": [] + } + ] + } + ] + } + ] + }, + { + "parentName": "checks", + "parentType": "items", + "id": "checks-items", + "params": [ + { + "type": "string", + "description": "

The name of the required check

", + "name": "context", + "in": "body", + "rawType": "string", + "rawDescription": "The name of the required check", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "

The ID of the GitHub App that must provide this check. Set to null to accept the check from any source.

", + "name": "app_id", + "in": "body", + "rawType": "string", + "rawDescription": "The ID of the GitHub App that must provide this check. Set to `null` to accept the check from any source.", + "childParamsGroups": [] } ] } diff --git a/lib/rest/static/decorated/ghes-3.0.json b/lib/rest/static/decorated/ghes-3.0.json index 487e1ff20e..0d2fefa149 100644 --- a/lib/rest/static/decorated/ghes-3.0.json +++ b/lib/rest/static/decorated/ghes-3.0.json @@ -36135,13 +36135,13 @@ "x-codeSamples": [ { "lang": "Shell", - "source": "curl \\\n -X PUT \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n http(s)://{hostname}/api/v3/repos/octocat/hello-world/branches/BRANCH/protection \\\n -d '{\"required_status_checks\":{\"strict\":true,\"contexts\":[\"contexts\"]},\"enforce_admins\":true,\"required_pull_request_reviews\":{\"dismissal_restrictions\":{\"users\":[\"users\"],\"teams\":[\"teams\"]},\"dismiss_stale_reviews\":true,\"require_code_owner_reviews\":true,\"required_approving_review_count\":42},\"restrictions\":{\"users\":[\"users\"],\"teams\":[\"teams\"],\"apps\":[\"apps\"]}}'", - "html": "
curl \\\n  -X PUT \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  http(s)://{hostname}/api/v3/repos/octocat/hello-world/branches/BRANCH/protection \\\n  -d '{\"required_status_checks\":{\"strict\":true,\"contexts\":[\"contexts\"]},\"enforce_admins\":true,\"required_pull_request_reviews\":{\"dismissal_restrictions\":{\"users\":[\"users\"],\"teams\":[\"teams\"]},\"dismiss_stale_reviews\":true,\"require_code_owner_reviews\":true,\"required_approving_review_count\":42},\"restrictions\":{\"users\":[\"users\"],\"teams\":[\"teams\"],\"apps\":[\"apps\"]}}'
" + "source": "curl \\\n -X PUT \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n http(s)://{hostname}/api/v3/repos/octocat/hello-world/branches/BRANCH/protection \\\n -d '{\"required_status_checks\":{\"strict\":true,\"contexts\":[\"contexts\"],\"checks\":[{\"context\":\"context\",\"app_id\":\"app_id\"}]},\"enforce_admins\":true,\"required_pull_request_reviews\":{\"dismissal_restrictions\":{\"users\":[\"users\"],\"teams\":[\"teams\"]},\"dismiss_stale_reviews\":true,\"require_code_owner_reviews\":true,\"required_approving_review_count\":42},\"restrictions\":{\"users\":[\"users\"],\"teams\":[\"teams\"],\"apps\":[\"apps\"]}}'", + "html": "
curl \\\n  -X PUT \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  http(s)://{hostname}/api/v3/repos/octocat/hello-world/branches/BRANCH/protection \\\n  -d '{\"required_status_checks\":{\"strict\":true,\"contexts\":[\"contexts\"],\"checks\":[{\"context\":\"context\",\"app_id\":\"app_id\"}]},\"enforce_admins\":true,\"required_pull_request_reviews\":{\"dismissal_restrictions\":{\"users\":[\"users\"],\"teams\":[\"teams\"]},\"dismiss_stale_reviews\":true,\"require_code_owner_reviews\":true,\"required_approving_review_count\":42},\"restrictions\":{\"users\":[\"users\"],\"teams\":[\"teams\"],\"apps\":[\"apps\"]}}'
" }, { "lang": "JavaScript", - "source": "await octokit.request('PUT /repos/{owner}/{repo}/branches/{branch}/protection', {\n owner: 'octocat',\n repo: 'hello-world',\n branch: 'branch',\n required_status_checks: {\n strict: true,\n contexts: [\n 'contexts'\n ]\n },\n enforce_admins: true,\n required_pull_request_reviews: {\n dismissal_restrictions: {\n users: [\n 'users'\n ],\n teams: [\n 'teams'\n ]\n },\n dismiss_stale_reviews: true,\n require_code_owner_reviews: true,\n required_approving_review_count: 42\n },\n restrictions: {\n users: [\n 'users'\n ],\n teams: [\n 'teams'\n ],\n apps: [\n 'apps'\n ]\n }\n})", - "html": "
await octokit.request('PUT /repos/{owner}/{repo}/branches/{branch}/protection', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  branch: 'branch',\n  required_status_checks: {\n    strict: true,\n    contexts: [\n      'contexts'\n    ]\n  },\n  enforce_admins: true,\n  required_pull_request_reviews: {\n    dismissal_restrictions: {\n      users: [\n        'users'\n      ],\n      teams: [\n        'teams'\n      ]\n    },\n    dismiss_stale_reviews: true,\n    require_code_owner_reviews: true,\n    required_approving_review_count: 42\n  },\n  restrictions: {\n    users: [\n      'users'\n    ],\n    teams: [\n      'teams'\n    ],\n    apps: [\n      'apps'\n    ]\n  }\n})\n
" + "source": "await octokit.request('PUT /repos/{owner}/{repo}/branches/{branch}/protection', {\n owner: 'octocat',\n repo: 'hello-world',\n branch: 'branch',\n required_status_checks: {\n strict: true,\n contexts: [\n 'contexts'\n ],\n checks: [\n {\n context: 'context',\n app_id: 'app_id'\n }\n ]\n },\n enforce_admins: true,\n required_pull_request_reviews: {\n dismissal_restrictions: {\n users: [\n 'users'\n ],\n teams: [\n 'teams'\n ]\n },\n dismiss_stale_reviews: true,\n require_code_owner_reviews: true,\n required_approving_review_count: 42\n },\n restrictions: {\n users: [\n 'users'\n ],\n teams: [\n 'teams'\n ],\n apps: [\n 'apps'\n ]\n }\n})", + "html": "
await octokit.request('PUT /repos/{owner}/{repo}/branches/{branch}/protection', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  branch: 'branch',\n  required_status_checks: {\n    strict: true,\n    contexts: [\n      'contexts'\n    ],\n    checks: [\n      {\n        context: 'context',\n        app_id: 'app_id'\n      }\n    ]\n  },\n  enforce_admins: true,\n  required_pull_request_reviews: {\n    dismissal_restrictions: {\n      users: [\n        'users'\n      ],\n      teams: [\n        'teams'\n      ]\n    },\n    dismiss_stale_reviews: true,\n    require_code_owner_reviews: true,\n    required_approving_review_count: 42\n  },\n  restrictions: {\n    users: [\n      'users'\n    ],\n    teams: [\n      'teams'\n    ],\n    apps: [\n      'apps'\n    ]\n  }\n})\n
" } ], "summary": "Update branch protection", @@ -36186,6 +36186,64 @@ "rawType": "array", "rawDescription": "The list of status checks to require in order to merge into this branch. If any of these checks have recently been set by a particular GitHub App, they will be required to come from that app in future for the branch to merge. Use `checks` instead of `contexts` for more fine-grained control.", "childParamsGroups": [] + }, + "checks": { + "type": "array of objects", + "description": "

The list of status checks to require in order to merge into this branch.

", + "items": { + "type": "object", + "properties": { + "context": { + "type": "string", + "description": "

The name of the required check

", + "name": "context", + "in": "body", + "rawType": "string", + "rawDescription": "The name of the required check", + "childParamsGroups": [] + }, + "app_id": { + "type": "string", + "description": "

The ID of the GitHub App that must provide this check. Set to null to accept the check from any source.

", + "name": "app_id", + "in": "body", + "rawType": "string", + "rawDescription": "The ID of the GitHub App that must provide this check. Set to `null` to accept the check from any source.", + "childParamsGroups": [] + } + } + }, + "name": "checks", + "in": "body", + "rawType": "array", + "rawDescription": "The list of status checks to require in order to merge into this branch.", + "childParamsGroups": [ + { + "parentName": "checks", + "parentType": "items", + "id": "checks-items", + "params": [ + { + "type": "string", + "description": "

The name of the required check

", + "name": "context", + "in": "body", + "rawType": "string", + "rawDescription": "The name of the required check", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "

The ID of the GitHub App that must provide this check. Set to null to accept the check from any source.

", + "name": "app_id", + "in": "body", + "rawType": "string", + "rawDescription": "The ID of the GitHub App that must provide this check. Set to `null` to accept the check from any source.", + "childParamsGroups": [] + } + ] + } + ] } }, "required": [ @@ -36222,6 +36280,89 @@ "rawType": "array", "rawDescription": "The list of status checks to require in order to merge into this branch. If any of these checks have recently been set by a particular GitHub App, they will be required to come from that app in future for the branch to merge. Use `checks` instead of `contexts` for more fine-grained control.", "childParamsGroups": [] + }, + { + "type": "array of objects", + "description": "

The list of status checks to require in order to merge into this branch.

", + "items": { + "type": "object", + "properties": { + "context": { + "type": "string", + "description": "

The name of the required check

", + "name": "context", + "in": "body", + "rawType": "string", + "rawDescription": "The name of the required check", + "childParamsGroups": [] + }, + "app_id": { + "type": "string", + "description": "

The ID of the GitHub App that must provide this check. Set to null to accept the check from any source.

", + "name": "app_id", + "in": "body", + "rawType": "string", + "rawDescription": "The ID of the GitHub App that must provide this check. Set to `null` to accept the check from any source.", + "childParamsGroups": [] + } + } + }, + "name": "checks", + "in": "body", + "rawType": "array", + "rawDescription": "The list of status checks to require in order to merge into this branch.", + "childParamsGroups": [ + { + "parentName": "checks", + "parentType": "items", + "id": "checks-items", + "params": [ + { + "type": "string", + "description": "

The name of the required check

", + "name": "context", + "in": "body", + "rawType": "string", + "rawDescription": "The name of the required check", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "

The ID of the GitHub App that must provide this check. Set to null to accept the check from any source.

", + "name": "app_id", + "in": "body", + "rawType": "string", + "rawDescription": "The ID of the GitHub App that must provide this check. Set to `null` to accept the check from any source.", + "childParamsGroups": [] + } + ] + } + ] + } + ] + }, + { + "parentName": "checks", + "parentType": "items", + "id": "checks-items", + "params": [ + { + "type": "string", + "description": "

The name of the required check

", + "name": "context", + "in": "body", + "rawType": "string", + "rawDescription": "The name of the required check", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "

The ID of the GitHub App that must provide this check. Set to null to accept the check from any source.

", + "name": "app_id", + "in": "body", + "rawType": "string", + "rawDescription": "The ID of the GitHub App that must provide this check. Set to `null` to accept the check from any source.", + "childParamsGroups": [] } ] } @@ -36727,6 +36868,64 @@ "rawType": "array", "rawDescription": "The list of status checks to require in order to merge into this branch. If any of these checks have recently been set by a particular GitHub App, they will be required to come from that app in future for the branch to merge. Use `checks` instead of `contexts` for more fine-grained control.", "childParamsGroups": [] + }, + "checks": { + "type": "array of objects", + "description": "

The list of status checks to require in order to merge into this branch.

", + "items": { + "type": "object", + "properties": { + "context": { + "type": "string", + "description": "

The name of the required check

", + "name": "context", + "in": "body", + "rawType": "string", + "rawDescription": "The name of the required check", + "childParamsGroups": [] + }, + "app_id": { + "type": "string", + "description": "

The ID of the GitHub App that must provide this check. Set to null to accept the check from any source.

", + "name": "app_id", + "in": "body", + "rawType": "string", + "rawDescription": "The ID of the GitHub App that must provide this check. Set to `null` to accept the check from any source.", + "childParamsGroups": [] + } + } + }, + "name": "checks", + "in": "body", + "rawType": "array", + "rawDescription": "The list of status checks to require in order to merge into this branch.", + "childParamsGroups": [ + { + "parentName": "checks", + "parentType": "items", + "id": "checks-items", + "params": [ + { + "type": "string", + "description": "

The name of the required check

", + "name": "context", + "in": "body", + "rawType": "string", + "rawDescription": "The name of the required check", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "

The ID of the GitHub App that must provide this check. Set to null to accept the check from any source.

", + "name": "app_id", + "in": "body", + "rawType": "string", + "rawDescription": "The ID of the GitHub App that must provide this check. Set to `null` to accept the check from any source.", + "childParamsGroups": [] + } + ] + } + ] } }, "required": [ @@ -36763,6 +36962,89 @@ "rawType": "array", "rawDescription": "The list of status checks to require in order to merge into this branch. If any of these checks have recently been set by a particular GitHub App, they will be required to come from that app in future for the branch to merge. Use `checks` instead of `contexts` for more fine-grained control.", "childParamsGroups": [] + }, + { + "type": "array of objects", + "description": "

The list of status checks to require in order to merge into this branch.

", + "items": { + "type": "object", + "properties": { + "context": { + "type": "string", + "description": "

The name of the required check

", + "name": "context", + "in": "body", + "rawType": "string", + "rawDescription": "The name of the required check", + "childParamsGroups": [] + }, + "app_id": { + "type": "string", + "description": "

The ID of the GitHub App that must provide this check. Set to null to accept the check from any source.

", + "name": "app_id", + "in": "body", + "rawType": "string", + "rawDescription": "The ID of the GitHub App that must provide this check. Set to `null` to accept the check from any source.", + "childParamsGroups": [] + } + } + }, + "name": "checks", + "in": "body", + "rawType": "array", + "rawDescription": "The list of status checks to require in order to merge into this branch.", + "childParamsGroups": [ + { + "parentName": "checks", + "parentType": "items", + "id": "checks-items", + "params": [ + { + "type": "string", + "description": "

The name of the required check

", + "name": "context", + "in": "body", + "rawType": "string", + "rawDescription": "The name of the required check", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "

The ID of the GitHub App that must provide this check. Set to null to accept the check from any source.

", + "name": "app_id", + "in": "body", + "rawType": "string", + "rawDescription": "The ID of the GitHub App that must provide this check. Set to `null` to accept the check from any source.", + "childParamsGroups": [] + } + ] + } + ] + } + ] + }, + { + "parentName": "checks", + "parentType": "items", + "id": "checks-items", + "params": [ + { + "type": "string", + "description": "

The name of the required check

", + "name": "context", + "in": "body", + "rawType": "string", + "rawDescription": "The name of the required check", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "

The ID of the GitHub App that must provide this check. Set to null to accept the check from any source.

", + "name": "app_id", + "in": "body", + "rawType": "string", + "rawDescription": "The ID of the GitHub App that must provide this check. Set to `null` to accept the check from any source.", + "childParamsGroups": [] } ] } diff --git a/lib/rest/static/decorated/ghes-3.1.json b/lib/rest/static/decorated/ghes-3.1.json index 9e6bfd25d4..14f69ee89e 100644 --- a/lib/rest/static/decorated/ghes-3.1.json +++ b/lib/rest/static/decorated/ghes-3.1.json @@ -36257,13 +36257,13 @@ "x-codeSamples": [ { "lang": "Shell", - "source": "curl \\\n -X PUT \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n http(s)://{hostname}/api/v3/repos/octocat/hello-world/branches/BRANCH/protection \\\n -d '{\"required_status_checks\":{\"strict\":true,\"contexts\":[\"contexts\"]},\"enforce_admins\":true,\"required_pull_request_reviews\":{\"dismissal_restrictions\":{\"users\":[\"users\"],\"teams\":[\"teams\"]},\"dismiss_stale_reviews\":true,\"require_code_owner_reviews\":true,\"required_approving_review_count\":42},\"restrictions\":{\"users\":[\"users\"],\"teams\":[\"teams\"],\"apps\":[\"apps\"]}}'", - "html": "
curl \\\n  -X PUT \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  http(s)://{hostname}/api/v3/repos/octocat/hello-world/branches/BRANCH/protection \\\n  -d '{\"required_status_checks\":{\"strict\":true,\"contexts\":[\"contexts\"]},\"enforce_admins\":true,\"required_pull_request_reviews\":{\"dismissal_restrictions\":{\"users\":[\"users\"],\"teams\":[\"teams\"]},\"dismiss_stale_reviews\":true,\"require_code_owner_reviews\":true,\"required_approving_review_count\":42},\"restrictions\":{\"users\":[\"users\"],\"teams\":[\"teams\"],\"apps\":[\"apps\"]}}'
" + "source": "curl \\\n -X PUT \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n http(s)://{hostname}/api/v3/repos/octocat/hello-world/branches/BRANCH/protection \\\n -d '{\"required_status_checks\":{\"strict\":true,\"contexts\":[\"contexts\"],\"checks\":[{\"context\":\"context\",\"app_id\":\"app_id\"}]},\"enforce_admins\":true,\"required_pull_request_reviews\":{\"dismissal_restrictions\":{\"users\":[\"users\"],\"teams\":[\"teams\"]},\"dismiss_stale_reviews\":true,\"require_code_owner_reviews\":true,\"required_approving_review_count\":42},\"restrictions\":{\"users\":[\"users\"],\"teams\":[\"teams\"],\"apps\":[\"apps\"]}}'", + "html": "
curl \\\n  -X PUT \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  http(s)://{hostname}/api/v3/repos/octocat/hello-world/branches/BRANCH/protection \\\n  -d '{\"required_status_checks\":{\"strict\":true,\"contexts\":[\"contexts\"],\"checks\":[{\"context\":\"context\",\"app_id\":\"app_id\"}]},\"enforce_admins\":true,\"required_pull_request_reviews\":{\"dismissal_restrictions\":{\"users\":[\"users\"],\"teams\":[\"teams\"]},\"dismiss_stale_reviews\":true,\"require_code_owner_reviews\":true,\"required_approving_review_count\":42},\"restrictions\":{\"users\":[\"users\"],\"teams\":[\"teams\"],\"apps\":[\"apps\"]}}'
" }, { "lang": "JavaScript", - "source": "await octokit.request('PUT /repos/{owner}/{repo}/branches/{branch}/protection', {\n owner: 'octocat',\n repo: 'hello-world',\n branch: 'branch',\n required_status_checks: {\n strict: true,\n contexts: [\n 'contexts'\n ]\n },\n enforce_admins: true,\n required_pull_request_reviews: {\n dismissal_restrictions: {\n users: [\n 'users'\n ],\n teams: [\n 'teams'\n ]\n },\n dismiss_stale_reviews: true,\n require_code_owner_reviews: true,\n required_approving_review_count: 42\n },\n restrictions: {\n users: [\n 'users'\n ],\n teams: [\n 'teams'\n ],\n apps: [\n 'apps'\n ]\n }\n})", - "html": "
await octokit.request('PUT /repos/{owner}/{repo}/branches/{branch}/protection', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  branch: 'branch',\n  required_status_checks: {\n    strict: true,\n    contexts: [\n      'contexts'\n    ]\n  },\n  enforce_admins: true,\n  required_pull_request_reviews: {\n    dismissal_restrictions: {\n      users: [\n        'users'\n      ],\n      teams: [\n        'teams'\n      ]\n    },\n    dismiss_stale_reviews: true,\n    require_code_owner_reviews: true,\n    required_approving_review_count: 42\n  },\n  restrictions: {\n    users: [\n      'users'\n    ],\n    teams: [\n      'teams'\n    ],\n    apps: [\n      'apps'\n    ]\n  }\n})\n
" + "source": "await octokit.request('PUT /repos/{owner}/{repo}/branches/{branch}/protection', {\n owner: 'octocat',\n repo: 'hello-world',\n branch: 'branch',\n required_status_checks: {\n strict: true,\n contexts: [\n 'contexts'\n ],\n checks: [\n {\n context: 'context',\n app_id: 'app_id'\n }\n ]\n },\n enforce_admins: true,\n required_pull_request_reviews: {\n dismissal_restrictions: {\n users: [\n 'users'\n ],\n teams: [\n 'teams'\n ]\n },\n dismiss_stale_reviews: true,\n require_code_owner_reviews: true,\n required_approving_review_count: 42\n },\n restrictions: {\n users: [\n 'users'\n ],\n teams: [\n 'teams'\n ],\n apps: [\n 'apps'\n ]\n }\n})", + "html": "
await octokit.request('PUT /repos/{owner}/{repo}/branches/{branch}/protection', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  branch: 'branch',\n  required_status_checks: {\n    strict: true,\n    contexts: [\n      'contexts'\n    ],\n    checks: [\n      {\n        context: 'context',\n        app_id: 'app_id'\n      }\n    ]\n  },\n  enforce_admins: true,\n  required_pull_request_reviews: {\n    dismissal_restrictions: {\n      users: [\n        'users'\n      ],\n      teams: [\n        'teams'\n      ]\n    },\n    dismiss_stale_reviews: true,\n    require_code_owner_reviews: true,\n    required_approving_review_count: 42\n  },\n  restrictions: {\n    users: [\n      'users'\n    ],\n    teams: [\n      'teams'\n    ],\n    apps: [\n      'apps'\n    ]\n  }\n})\n
" } ], "summary": "Update branch protection", @@ -36308,6 +36308,64 @@ "rawType": "array", "rawDescription": "The list of status checks to require in order to merge into this branch. If any of these checks have recently been set by a particular GitHub App, they will be required to come from that app in future for the branch to merge. Use `checks` instead of `contexts` for more fine-grained control.", "childParamsGroups": [] + }, + "checks": { + "type": "array of objects", + "description": "

The list of status checks to require in order to merge into this branch.

", + "items": { + "type": "object", + "properties": { + "context": { + "type": "string", + "description": "

The name of the required check

", + "name": "context", + "in": "body", + "rawType": "string", + "rawDescription": "The name of the required check", + "childParamsGroups": [] + }, + "app_id": { + "type": "string", + "description": "

The ID of the GitHub App that must provide this check. Set to null to accept the check from any source.

", + "name": "app_id", + "in": "body", + "rawType": "string", + "rawDescription": "The ID of the GitHub App that must provide this check. Set to `null` to accept the check from any source.", + "childParamsGroups": [] + } + } + }, + "name": "checks", + "in": "body", + "rawType": "array", + "rawDescription": "The list of status checks to require in order to merge into this branch.", + "childParamsGroups": [ + { + "parentName": "checks", + "parentType": "items", + "id": "checks-items", + "params": [ + { + "type": "string", + "description": "

The name of the required check

", + "name": "context", + "in": "body", + "rawType": "string", + "rawDescription": "The name of the required check", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "

The ID of the GitHub App that must provide this check. Set to null to accept the check from any source.

", + "name": "app_id", + "in": "body", + "rawType": "string", + "rawDescription": "The ID of the GitHub App that must provide this check. Set to `null` to accept the check from any source.", + "childParamsGroups": [] + } + ] + } + ] } }, "required": [ @@ -36344,6 +36402,89 @@ "rawType": "array", "rawDescription": "The list of status checks to require in order to merge into this branch. If any of these checks have recently been set by a particular GitHub App, they will be required to come from that app in future for the branch to merge. Use `checks` instead of `contexts` for more fine-grained control.", "childParamsGroups": [] + }, + { + "type": "array of objects", + "description": "

The list of status checks to require in order to merge into this branch.

", + "items": { + "type": "object", + "properties": { + "context": { + "type": "string", + "description": "

The name of the required check

", + "name": "context", + "in": "body", + "rawType": "string", + "rawDescription": "The name of the required check", + "childParamsGroups": [] + }, + "app_id": { + "type": "string", + "description": "

The ID of the GitHub App that must provide this check. Set to null to accept the check from any source.

", + "name": "app_id", + "in": "body", + "rawType": "string", + "rawDescription": "The ID of the GitHub App that must provide this check. Set to `null` to accept the check from any source.", + "childParamsGroups": [] + } + } + }, + "name": "checks", + "in": "body", + "rawType": "array", + "rawDescription": "The list of status checks to require in order to merge into this branch.", + "childParamsGroups": [ + { + "parentName": "checks", + "parentType": "items", + "id": "checks-items", + "params": [ + { + "type": "string", + "description": "

The name of the required check

", + "name": "context", + "in": "body", + "rawType": "string", + "rawDescription": "The name of the required check", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "

The ID of the GitHub App that must provide this check. Set to null to accept the check from any source.

", + "name": "app_id", + "in": "body", + "rawType": "string", + "rawDescription": "The ID of the GitHub App that must provide this check. Set to `null` to accept the check from any source.", + "childParamsGroups": [] + } + ] + } + ] + } + ] + }, + { + "parentName": "checks", + "parentType": "items", + "id": "checks-items", + "params": [ + { + "type": "string", + "description": "

The name of the required check

", + "name": "context", + "in": "body", + "rawType": "string", + "rawDescription": "The name of the required check", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "

The ID of the GitHub App that must provide this check. Set to null to accept the check from any source.

", + "name": "app_id", + "in": "body", + "rawType": "string", + "rawDescription": "The ID of the GitHub App that must provide this check. Set to `null` to accept the check from any source.", + "childParamsGroups": [] } ] } @@ -36849,6 +36990,64 @@ "rawType": "array", "rawDescription": "The list of status checks to require in order to merge into this branch. If any of these checks have recently been set by a particular GitHub App, they will be required to come from that app in future for the branch to merge. Use `checks` instead of `contexts` for more fine-grained control.", "childParamsGroups": [] + }, + "checks": { + "type": "array of objects", + "description": "

The list of status checks to require in order to merge into this branch.

", + "items": { + "type": "object", + "properties": { + "context": { + "type": "string", + "description": "

The name of the required check

", + "name": "context", + "in": "body", + "rawType": "string", + "rawDescription": "The name of the required check", + "childParamsGroups": [] + }, + "app_id": { + "type": "string", + "description": "

The ID of the GitHub App that must provide this check. Set to null to accept the check from any source.

", + "name": "app_id", + "in": "body", + "rawType": "string", + "rawDescription": "The ID of the GitHub App that must provide this check. Set to `null` to accept the check from any source.", + "childParamsGroups": [] + } + } + }, + "name": "checks", + "in": "body", + "rawType": "array", + "rawDescription": "The list of status checks to require in order to merge into this branch.", + "childParamsGroups": [ + { + "parentName": "checks", + "parentType": "items", + "id": "checks-items", + "params": [ + { + "type": "string", + "description": "

The name of the required check

", + "name": "context", + "in": "body", + "rawType": "string", + "rawDescription": "The name of the required check", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "

The ID of the GitHub App that must provide this check. Set to null to accept the check from any source.

", + "name": "app_id", + "in": "body", + "rawType": "string", + "rawDescription": "The ID of the GitHub App that must provide this check. Set to `null` to accept the check from any source.", + "childParamsGroups": [] + } + ] + } + ] } }, "required": [ @@ -36885,6 +37084,89 @@ "rawType": "array", "rawDescription": "The list of status checks to require in order to merge into this branch. If any of these checks have recently been set by a particular GitHub App, they will be required to come from that app in future for the branch to merge. Use `checks` instead of `contexts` for more fine-grained control.", "childParamsGroups": [] + }, + { + "type": "array of objects", + "description": "

The list of status checks to require in order to merge into this branch.

", + "items": { + "type": "object", + "properties": { + "context": { + "type": "string", + "description": "

The name of the required check

", + "name": "context", + "in": "body", + "rawType": "string", + "rawDescription": "The name of the required check", + "childParamsGroups": [] + }, + "app_id": { + "type": "string", + "description": "

The ID of the GitHub App that must provide this check. Set to null to accept the check from any source.

", + "name": "app_id", + "in": "body", + "rawType": "string", + "rawDescription": "The ID of the GitHub App that must provide this check. Set to `null` to accept the check from any source.", + "childParamsGroups": [] + } + } + }, + "name": "checks", + "in": "body", + "rawType": "array", + "rawDescription": "The list of status checks to require in order to merge into this branch.", + "childParamsGroups": [ + { + "parentName": "checks", + "parentType": "items", + "id": "checks-items", + "params": [ + { + "type": "string", + "description": "

The name of the required check

", + "name": "context", + "in": "body", + "rawType": "string", + "rawDescription": "The name of the required check", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "

The ID of the GitHub App that must provide this check. Set to null to accept the check from any source.

", + "name": "app_id", + "in": "body", + "rawType": "string", + "rawDescription": "The ID of the GitHub App that must provide this check. Set to `null` to accept the check from any source.", + "childParamsGroups": [] + } + ] + } + ] + } + ] + }, + { + "parentName": "checks", + "parentType": "items", + "id": "checks-items", + "params": [ + { + "type": "string", + "description": "

The name of the required check

", + "name": "context", + "in": "body", + "rawType": "string", + "rawDescription": "The name of the required check", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "

The ID of the GitHub App that must provide this check. Set to null to accept the check from any source.

", + "name": "app_id", + "in": "body", + "rawType": "string", + "rawDescription": "The ID of the GitHub App that must provide this check. Set to `null` to accept the check from any source.", + "childParamsGroups": [] } ] } diff --git a/lib/rest/static/decorated/ghes-3.2.json b/lib/rest/static/decorated/ghes-3.2.json index 365c4fa942..27f083dec6 100644 --- a/lib/rest/static/decorated/ghes-3.2.json +++ b/lib/rest/static/decorated/ghes-3.2.json @@ -37503,13 +37503,13 @@ "x-codeSamples": [ { "lang": "Shell", - "source": "curl \\\n -X PUT \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n http(s)://{hostname}/api/v3/repos/octocat/hello-world/branches/BRANCH/protection \\\n -d '{\"required_status_checks\":{\"strict\":true,\"contexts\":[\"contexts\"]},\"enforce_admins\":true,\"required_pull_request_reviews\":{\"dismissal_restrictions\":{\"users\":[\"users\"],\"teams\":[\"teams\"]},\"dismiss_stale_reviews\":true,\"require_code_owner_reviews\":true,\"required_approving_review_count\":42},\"restrictions\":{\"users\":[\"users\"],\"teams\":[\"teams\"],\"apps\":[\"apps\"]}}'", - "html": "
curl \\\n  -X PUT \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  http(s)://{hostname}/api/v3/repos/octocat/hello-world/branches/BRANCH/protection \\\n  -d '{\"required_status_checks\":{\"strict\":true,\"contexts\":[\"contexts\"]},\"enforce_admins\":true,\"required_pull_request_reviews\":{\"dismissal_restrictions\":{\"users\":[\"users\"],\"teams\":[\"teams\"]},\"dismiss_stale_reviews\":true,\"require_code_owner_reviews\":true,\"required_approving_review_count\":42},\"restrictions\":{\"users\":[\"users\"],\"teams\":[\"teams\"],\"apps\":[\"apps\"]}}'
" + "source": "curl \\\n -X PUT \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n http(s)://{hostname}/api/v3/repos/octocat/hello-world/branches/BRANCH/protection \\\n -d '{\"required_status_checks\":{\"strict\":true,\"contexts\":[\"contexts\"],\"checks\":[{\"context\":\"context\",\"app_id\":\"app_id\"}]},\"enforce_admins\":true,\"required_pull_request_reviews\":{\"dismissal_restrictions\":{\"users\":[\"users\"],\"teams\":[\"teams\"]},\"dismiss_stale_reviews\":true,\"require_code_owner_reviews\":true,\"required_approving_review_count\":42},\"restrictions\":{\"users\":[\"users\"],\"teams\":[\"teams\"],\"apps\":[\"apps\"]}}'", + "html": "
curl \\\n  -X PUT \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  http(s)://{hostname}/api/v3/repos/octocat/hello-world/branches/BRANCH/protection \\\n  -d '{\"required_status_checks\":{\"strict\":true,\"contexts\":[\"contexts\"],\"checks\":[{\"context\":\"context\",\"app_id\":\"app_id\"}]},\"enforce_admins\":true,\"required_pull_request_reviews\":{\"dismissal_restrictions\":{\"users\":[\"users\"],\"teams\":[\"teams\"]},\"dismiss_stale_reviews\":true,\"require_code_owner_reviews\":true,\"required_approving_review_count\":42},\"restrictions\":{\"users\":[\"users\"],\"teams\":[\"teams\"],\"apps\":[\"apps\"]}}'
" }, { "lang": "JavaScript", - "source": "await octokit.request('PUT /repos/{owner}/{repo}/branches/{branch}/protection', {\n owner: 'octocat',\n repo: 'hello-world',\n branch: 'branch',\n required_status_checks: {\n strict: true,\n contexts: [\n 'contexts'\n ]\n },\n enforce_admins: true,\n required_pull_request_reviews: {\n dismissal_restrictions: {\n users: [\n 'users'\n ],\n teams: [\n 'teams'\n ]\n },\n dismiss_stale_reviews: true,\n require_code_owner_reviews: true,\n required_approving_review_count: 42\n },\n restrictions: {\n users: [\n 'users'\n ],\n teams: [\n 'teams'\n ],\n apps: [\n 'apps'\n ]\n }\n})", - "html": "
await octokit.request('PUT /repos/{owner}/{repo}/branches/{branch}/protection', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  branch: 'branch',\n  required_status_checks: {\n    strict: true,\n    contexts: [\n      'contexts'\n    ]\n  },\n  enforce_admins: true,\n  required_pull_request_reviews: {\n    dismissal_restrictions: {\n      users: [\n        'users'\n      ],\n      teams: [\n        'teams'\n      ]\n    },\n    dismiss_stale_reviews: true,\n    require_code_owner_reviews: true,\n    required_approving_review_count: 42\n  },\n  restrictions: {\n    users: [\n      'users'\n    ],\n    teams: [\n      'teams'\n    ],\n    apps: [\n      'apps'\n    ]\n  }\n})\n
" + "source": "await octokit.request('PUT /repos/{owner}/{repo}/branches/{branch}/protection', {\n owner: 'octocat',\n repo: 'hello-world',\n branch: 'branch',\n required_status_checks: {\n strict: true,\n contexts: [\n 'contexts'\n ],\n checks: [\n {\n context: 'context',\n app_id: 'app_id'\n }\n ]\n },\n enforce_admins: true,\n required_pull_request_reviews: {\n dismissal_restrictions: {\n users: [\n 'users'\n ],\n teams: [\n 'teams'\n ]\n },\n dismiss_stale_reviews: true,\n require_code_owner_reviews: true,\n required_approving_review_count: 42\n },\n restrictions: {\n users: [\n 'users'\n ],\n teams: [\n 'teams'\n ],\n apps: [\n 'apps'\n ]\n }\n})", + "html": "
await octokit.request('PUT /repos/{owner}/{repo}/branches/{branch}/protection', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  branch: 'branch',\n  required_status_checks: {\n    strict: true,\n    contexts: [\n      'contexts'\n    ],\n    checks: [\n      {\n        context: 'context',\n        app_id: 'app_id'\n      }\n    ]\n  },\n  enforce_admins: true,\n  required_pull_request_reviews: {\n    dismissal_restrictions: {\n      users: [\n        'users'\n      ],\n      teams: [\n        'teams'\n      ]\n    },\n    dismiss_stale_reviews: true,\n    require_code_owner_reviews: true,\n    required_approving_review_count: 42\n  },\n  restrictions: {\n    users: [\n      'users'\n    ],\n    teams: [\n      'teams'\n    ],\n    apps: [\n      'apps'\n    ]\n  }\n})\n
" } ], "summary": "Update branch protection", @@ -37554,6 +37554,64 @@ "rawType": "array", "rawDescription": "The list of status checks to require in order to merge into this branch. If any of these checks have recently been set by a particular GitHub App, they will be required to come from that app in future for the branch to merge. Use `checks` instead of `contexts` for more fine-grained control.", "childParamsGroups": [] + }, + "checks": { + "type": "array of objects", + "description": "

The list of status checks to require in order to merge into this branch.

", + "items": { + "type": "object", + "properties": { + "context": { + "type": "string", + "description": "

The name of the required check

", + "name": "context", + "in": "body", + "rawType": "string", + "rawDescription": "The name of the required check", + "childParamsGroups": [] + }, + "app_id": { + "type": "string", + "description": "

The ID of the GitHub App that must provide this check. Set to null to accept the check from any source.

", + "name": "app_id", + "in": "body", + "rawType": "string", + "rawDescription": "The ID of the GitHub App that must provide this check. Set to `null` to accept the check from any source.", + "childParamsGroups": [] + } + } + }, + "name": "checks", + "in": "body", + "rawType": "array", + "rawDescription": "The list of status checks to require in order to merge into this branch.", + "childParamsGroups": [ + { + "parentName": "checks", + "parentType": "items", + "id": "checks-items", + "params": [ + { + "type": "string", + "description": "

The name of the required check

", + "name": "context", + "in": "body", + "rawType": "string", + "rawDescription": "The name of the required check", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "

The ID of the GitHub App that must provide this check. Set to null to accept the check from any source.

", + "name": "app_id", + "in": "body", + "rawType": "string", + "rawDescription": "The ID of the GitHub App that must provide this check. Set to `null` to accept the check from any source.", + "childParamsGroups": [] + } + ] + } + ] } }, "required": [ @@ -37590,6 +37648,89 @@ "rawType": "array", "rawDescription": "The list of status checks to require in order to merge into this branch. If any of these checks have recently been set by a particular GitHub App, they will be required to come from that app in future for the branch to merge. Use `checks` instead of `contexts` for more fine-grained control.", "childParamsGroups": [] + }, + { + "type": "array of objects", + "description": "

The list of status checks to require in order to merge into this branch.

", + "items": { + "type": "object", + "properties": { + "context": { + "type": "string", + "description": "

The name of the required check

", + "name": "context", + "in": "body", + "rawType": "string", + "rawDescription": "The name of the required check", + "childParamsGroups": [] + }, + "app_id": { + "type": "string", + "description": "

The ID of the GitHub App that must provide this check. Set to null to accept the check from any source.

", + "name": "app_id", + "in": "body", + "rawType": "string", + "rawDescription": "The ID of the GitHub App that must provide this check. Set to `null` to accept the check from any source.", + "childParamsGroups": [] + } + } + }, + "name": "checks", + "in": "body", + "rawType": "array", + "rawDescription": "The list of status checks to require in order to merge into this branch.", + "childParamsGroups": [ + { + "parentName": "checks", + "parentType": "items", + "id": "checks-items", + "params": [ + { + "type": "string", + "description": "

The name of the required check

", + "name": "context", + "in": "body", + "rawType": "string", + "rawDescription": "The name of the required check", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "

The ID of the GitHub App that must provide this check. Set to null to accept the check from any source.

", + "name": "app_id", + "in": "body", + "rawType": "string", + "rawDescription": "The ID of the GitHub App that must provide this check. Set to `null` to accept the check from any source.", + "childParamsGroups": [] + } + ] + } + ] + } + ] + }, + { + "parentName": "checks", + "parentType": "items", + "id": "checks-items", + "params": [ + { + "type": "string", + "description": "

The name of the required check

", + "name": "context", + "in": "body", + "rawType": "string", + "rawDescription": "The name of the required check", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "

The ID of the GitHub App that must provide this check. Set to null to accept the check from any source.

", + "name": "app_id", + "in": "body", + "rawType": "string", + "rawDescription": "The ID of the GitHub App that must provide this check. Set to `null` to accept the check from any source.", + "childParamsGroups": [] } ] } @@ -38095,6 +38236,64 @@ "rawType": "array", "rawDescription": "The list of status checks to require in order to merge into this branch. If any of these checks have recently been set by a particular GitHub App, they will be required to come from that app in future for the branch to merge. Use `checks` instead of `contexts` for more fine-grained control.", "childParamsGroups": [] + }, + "checks": { + "type": "array of objects", + "description": "

The list of status checks to require in order to merge into this branch.

", + "items": { + "type": "object", + "properties": { + "context": { + "type": "string", + "description": "

The name of the required check

", + "name": "context", + "in": "body", + "rawType": "string", + "rawDescription": "The name of the required check", + "childParamsGroups": [] + }, + "app_id": { + "type": "string", + "description": "

The ID of the GitHub App that must provide this check. Set to null to accept the check from any source.

", + "name": "app_id", + "in": "body", + "rawType": "string", + "rawDescription": "The ID of the GitHub App that must provide this check. Set to `null` to accept the check from any source.", + "childParamsGroups": [] + } + } + }, + "name": "checks", + "in": "body", + "rawType": "array", + "rawDescription": "The list of status checks to require in order to merge into this branch.", + "childParamsGroups": [ + { + "parentName": "checks", + "parentType": "items", + "id": "checks-items", + "params": [ + { + "type": "string", + "description": "

The name of the required check

", + "name": "context", + "in": "body", + "rawType": "string", + "rawDescription": "The name of the required check", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "

The ID of the GitHub App that must provide this check. Set to null to accept the check from any source.

", + "name": "app_id", + "in": "body", + "rawType": "string", + "rawDescription": "The ID of the GitHub App that must provide this check. Set to `null` to accept the check from any source.", + "childParamsGroups": [] + } + ] + } + ] } }, "required": [ @@ -38131,6 +38330,89 @@ "rawType": "array", "rawDescription": "The list of status checks to require in order to merge into this branch. If any of these checks have recently been set by a particular GitHub App, they will be required to come from that app in future for the branch to merge. Use `checks` instead of `contexts` for more fine-grained control.", "childParamsGroups": [] + }, + { + "type": "array of objects", + "description": "

The list of status checks to require in order to merge into this branch.

", + "items": { + "type": "object", + "properties": { + "context": { + "type": "string", + "description": "

The name of the required check

", + "name": "context", + "in": "body", + "rawType": "string", + "rawDescription": "The name of the required check", + "childParamsGroups": [] + }, + "app_id": { + "type": "string", + "description": "

The ID of the GitHub App that must provide this check. Set to null to accept the check from any source.

", + "name": "app_id", + "in": "body", + "rawType": "string", + "rawDescription": "The ID of the GitHub App that must provide this check. Set to `null` to accept the check from any source.", + "childParamsGroups": [] + } + } + }, + "name": "checks", + "in": "body", + "rawType": "array", + "rawDescription": "The list of status checks to require in order to merge into this branch.", + "childParamsGroups": [ + { + "parentName": "checks", + "parentType": "items", + "id": "checks-items", + "params": [ + { + "type": "string", + "description": "

The name of the required check

", + "name": "context", + "in": "body", + "rawType": "string", + "rawDescription": "The name of the required check", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "

The ID of the GitHub App that must provide this check. Set to null to accept the check from any source.

", + "name": "app_id", + "in": "body", + "rawType": "string", + "rawDescription": "The ID of the GitHub App that must provide this check. Set to `null` to accept the check from any source.", + "childParamsGroups": [] + } + ] + } + ] + } + ] + }, + { + "parentName": "checks", + "parentType": "items", + "id": "checks-items", + "params": [ + { + "type": "string", + "description": "

The name of the required check

", + "name": "context", + "in": "body", + "rawType": "string", + "rawDescription": "The name of the required check", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "

The ID of the GitHub App that must provide this check. Set to null to accept the check from any source.

", + "name": "app_id", + "in": "body", + "rawType": "string", + "rawDescription": "The ID of the GitHub App that must provide this check. Set to `null` to accept the check from any source.", + "childParamsGroups": [] } ] } diff --git a/lib/rest/static/decorated/ghes-3.3.json b/lib/rest/static/decorated/ghes-3.3.json index 482ada3c80..543f7f646c 100644 --- a/lib/rest/static/decorated/ghes-3.3.json +++ b/lib/rest/static/decorated/ghes-3.3.json @@ -37739,13 +37739,13 @@ "x-codeSamples": [ { "lang": "Shell", - "source": "curl \\\n -X PUT \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n http(s)://{hostname}/api/v3/repos/octocat/hello-world/branches/BRANCH/protection \\\n -d '{\"required_status_checks\":{\"strict\":true,\"contexts\":[\"contexts\"]},\"enforce_admins\":true,\"required_pull_request_reviews\":{\"dismissal_restrictions\":{\"users\":[\"users\"],\"teams\":[\"teams\"]},\"dismiss_stale_reviews\":true,\"require_code_owner_reviews\":true,\"required_approving_review_count\":42},\"restrictions\":{\"users\":[\"users\"],\"teams\":[\"teams\"],\"apps\":[\"apps\"]}}'", - "html": "
curl \\\n  -X PUT \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  http(s)://{hostname}/api/v3/repos/octocat/hello-world/branches/BRANCH/protection \\\n  -d '{\"required_status_checks\":{\"strict\":true,\"contexts\":[\"contexts\"]},\"enforce_admins\":true,\"required_pull_request_reviews\":{\"dismissal_restrictions\":{\"users\":[\"users\"],\"teams\":[\"teams\"]},\"dismiss_stale_reviews\":true,\"require_code_owner_reviews\":true,\"required_approving_review_count\":42},\"restrictions\":{\"users\":[\"users\"],\"teams\":[\"teams\"],\"apps\":[\"apps\"]}}'
" + "source": "curl \\\n -X PUT \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n http(s)://{hostname}/api/v3/repos/octocat/hello-world/branches/BRANCH/protection \\\n -d '{\"required_status_checks\":{\"strict\":true,\"contexts\":[\"contexts\"],\"checks\":[{\"context\":\"context\",\"app_id\":\"app_id\"}]},\"enforce_admins\":true,\"required_pull_request_reviews\":{\"dismissal_restrictions\":{\"users\":[\"users\"],\"teams\":[\"teams\"]},\"dismiss_stale_reviews\":true,\"require_code_owner_reviews\":true,\"required_approving_review_count\":42},\"restrictions\":{\"users\":[\"users\"],\"teams\":[\"teams\"],\"apps\":[\"apps\"]}}'", + "html": "
curl \\\n  -X PUT \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  http(s)://{hostname}/api/v3/repos/octocat/hello-world/branches/BRANCH/protection \\\n  -d '{\"required_status_checks\":{\"strict\":true,\"contexts\":[\"contexts\"],\"checks\":[{\"context\":\"context\",\"app_id\":\"app_id\"}]},\"enforce_admins\":true,\"required_pull_request_reviews\":{\"dismissal_restrictions\":{\"users\":[\"users\"],\"teams\":[\"teams\"]},\"dismiss_stale_reviews\":true,\"require_code_owner_reviews\":true,\"required_approving_review_count\":42},\"restrictions\":{\"users\":[\"users\"],\"teams\":[\"teams\"],\"apps\":[\"apps\"]}}'
" }, { "lang": "JavaScript", - "source": "await octokit.request('PUT /repos/{owner}/{repo}/branches/{branch}/protection', {\n owner: 'octocat',\n repo: 'hello-world',\n branch: 'branch',\n required_status_checks: {\n strict: true,\n contexts: [\n 'contexts'\n ]\n },\n enforce_admins: true,\n required_pull_request_reviews: {\n dismissal_restrictions: {\n users: [\n 'users'\n ],\n teams: [\n 'teams'\n ]\n },\n dismiss_stale_reviews: true,\n require_code_owner_reviews: true,\n required_approving_review_count: 42\n },\n restrictions: {\n users: [\n 'users'\n ],\n teams: [\n 'teams'\n ],\n apps: [\n 'apps'\n ]\n }\n})", - "html": "
await octokit.request('PUT /repos/{owner}/{repo}/branches/{branch}/protection', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  branch: 'branch',\n  required_status_checks: {\n    strict: true,\n    contexts: [\n      'contexts'\n    ]\n  },\n  enforce_admins: true,\n  required_pull_request_reviews: {\n    dismissal_restrictions: {\n      users: [\n        'users'\n      ],\n      teams: [\n        'teams'\n      ]\n    },\n    dismiss_stale_reviews: true,\n    require_code_owner_reviews: true,\n    required_approving_review_count: 42\n  },\n  restrictions: {\n    users: [\n      'users'\n    ],\n    teams: [\n      'teams'\n    ],\n    apps: [\n      'apps'\n    ]\n  }\n})\n
" + "source": "await octokit.request('PUT /repos/{owner}/{repo}/branches/{branch}/protection', {\n owner: 'octocat',\n repo: 'hello-world',\n branch: 'branch',\n required_status_checks: {\n strict: true,\n contexts: [\n 'contexts'\n ],\n checks: [\n {\n context: 'context',\n app_id: 'app_id'\n }\n ]\n },\n enforce_admins: true,\n required_pull_request_reviews: {\n dismissal_restrictions: {\n users: [\n 'users'\n ],\n teams: [\n 'teams'\n ]\n },\n dismiss_stale_reviews: true,\n require_code_owner_reviews: true,\n required_approving_review_count: 42\n },\n restrictions: {\n users: [\n 'users'\n ],\n teams: [\n 'teams'\n ],\n apps: [\n 'apps'\n ]\n }\n})", + "html": "
await octokit.request('PUT /repos/{owner}/{repo}/branches/{branch}/protection', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  branch: 'branch',\n  required_status_checks: {\n    strict: true,\n    contexts: [\n      'contexts'\n    ],\n    checks: [\n      {\n        context: 'context',\n        app_id: 'app_id'\n      }\n    ]\n  },\n  enforce_admins: true,\n  required_pull_request_reviews: {\n    dismissal_restrictions: {\n      users: [\n        'users'\n      ],\n      teams: [\n        'teams'\n      ]\n    },\n    dismiss_stale_reviews: true,\n    require_code_owner_reviews: true,\n    required_approving_review_count: 42\n  },\n  restrictions: {\n    users: [\n      'users'\n    ],\n    teams: [\n      'teams'\n    ],\n    apps: [\n      'apps'\n    ]\n  }\n})\n
" } ], "summary": "Update branch protection", @@ -37790,6 +37790,64 @@ "rawType": "array", "rawDescription": "The list of status checks to require in order to merge into this branch. If any of these checks have recently been set by a particular GitHub App, they will be required to come from that app in future for the branch to merge. Use `checks` instead of `contexts` for more fine-grained control.", "childParamsGroups": [] + }, + "checks": { + "type": "array of objects", + "description": "

The list of status checks to require in order to merge into this branch.

", + "items": { + "type": "object", + "properties": { + "context": { + "type": "string", + "description": "

The name of the required check

", + "name": "context", + "in": "body", + "rawType": "string", + "rawDescription": "The name of the required check", + "childParamsGroups": [] + }, + "app_id": { + "type": "string", + "description": "

The ID of the GitHub App that must provide this check. Set to null to accept the check from any source.

", + "name": "app_id", + "in": "body", + "rawType": "string", + "rawDescription": "The ID of the GitHub App that must provide this check. Set to `null` to accept the check from any source.", + "childParamsGroups": [] + } + } + }, + "name": "checks", + "in": "body", + "rawType": "array", + "rawDescription": "The list of status checks to require in order to merge into this branch.", + "childParamsGroups": [ + { + "parentName": "checks", + "parentType": "items", + "id": "checks-items", + "params": [ + { + "type": "string", + "description": "

The name of the required check

", + "name": "context", + "in": "body", + "rawType": "string", + "rawDescription": "The name of the required check", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "

The ID of the GitHub App that must provide this check. Set to null to accept the check from any source.

", + "name": "app_id", + "in": "body", + "rawType": "string", + "rawDescription": "The ID of the GitHub App that must provide this check. Set to `null` to accept the check from any source.", + "childParamsGroups": [] + } + ] + } + ] } }, "required": [ @@ -37826,6 +37884,89 @@ "rawType": "array", "rawDescription": "The list of status checks to require in order to merge into this branch. If any of these checks have recently been set by a particular GitHub App, they will be required to come from that app in future for the branch to merge. Use `checks` instead of `contexts` for more fine-grained control.", "childParamsGroups": [] + }, + { + "type": "array of objects", + "description": "

The list of status checks to require in order to merge into this branch.

", + "items": { + "type": "object", + "properties": { + "context": { + "type": "string", + "description": "

The name of the required check

", + "name": "context", + "in": "body", + "rawType": "string", + "rawDescription": "The name of the required check", + "childParamsGroups": [] + }, + "app_id": { + "type": "string", + "description": "

The ID of the GitHub App that must provide this check. Set to null to accept the check from any source.

", + "name": "app_id", + "in": "body", + "rawType": "string", + "rawDescription": "The ID of the GitHub App that must provide this check. Set to `null` to accept the check from any source.", + "childParamsGroups": [] + } + } + }, + "name": "checks", + "in": "body", + "rawType": "array", + "rawDescription": "The list of status checks to require in order to merge into this branch.", + "childParamsGroups": [ + { + "parentName": "checks", + "parentType": "items", + "id": "checks-items", + "params": [ + { + "type": "string", + "description": "

The name of the required check

", + "name": "context", + "in": "body", + "rawType": "string", + "rawDescription": "The name of the required check", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "

The ID of the GitHub App that must provide this check. Set to null to accept the check from any source.

", + "name": "app_id", + "in": "body", + "rawType": "string", + "rawDescription": "The ID of the GitHub App that must provide this check. Set to `null` to accept the check from any source.", + "childParamsGroups": [] + } + ] + } + ] + } + ] + }, + { + "parentName": "checks", + "parentType": "items", + "id": "checks-items", + "params": [ + { + "type": "string", + "description": "

The name of the required check

", + "name": "context", + "in": "body", + "rawType": "string", + "rawDescription": "The name of the required check", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "

The ID of the GitHub App that must provide this check. Set to null to accept the check from any source.

", + "name": "app_id", + "in": "body", + "rawType": "string", + "rawDescription": "The ID of the GitHub App that must provide this check. Set to `null` to accept the check from any source.", + "childParamsGroups": [] } ] } @@ -38323,6 +38464,64 @@ "rawType": "array", "rawDescription": "The list of status checks to require in order to merge into this branch. If any of these checks have recently been set by a particular GitHub App, they will be required to come from that app in future for the branch to merge. Use `checks` instead of `contexts` for more fine-grained control.", "childParamsGroups": [] + }, + "checks": { + "type": "array of objects", + "description": "

The list of status checks to require in order to merge into this branch.

", + "items": { + "type": "object", + "properties": { + "context": { + "type": "string", + "description": "

The name of the required check

", + "name": "context", + "in": "body", + "rawType": "string", + "rawDescription": "The name of the required check", + "childParamsGroups": [] + }, + "app_id": { + "type": "string", + "description": "

The ID of the GitHub App that must provide this check. Set to null to accept the check from any source.

", + "name": "app_id", + "in": "body", + "rawType": "string", + "rawDescription": "The ID of the GitHub App that must provide this check. Set to `null` to accept the check from any source.", + "childParamsGroups": [] + } + } + }, + "name": "checks", + "in": "body", + "rawType": "array", + "rawDescription": "The list of status checks to require in order to merge into this branch.", + "childParamsGroups": [ + { + "parentName": "checks", + "parentType": "items", + "id": "checks-items", + "params": [ + { + "type": "string", + "description": "

The name of the required check

", + "name": "context", + "in": "body", + "rawType": "string", + "rawDescription": "The name of the required check", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "

The ID of the GitHub App that must provide this check. Set to null to accept the check from any source.

", + "name": "app_id", + "in": "body", + "rawType": "string", + "rawDescription": "The ID of the GitHub App that must provide this check. Set to `null` to accept the check from any source.", + "childParamsGroups": [] + } + ] + } + ] } }, "required": [ @@ -38359,6 +38558,89 @@ "rawType": "array", "rawDescription": "The list of status checks to require in order to merge into this branch. If any of these checks have recently been set by a particular GitHub App, they will be required to come from that app in future for the branch to merge. Use `checks` instead of `contexts` for more fine-grained control.", "childParamsGroups": [] + }, + { + "type": "array of objects", + "description": "

The list of status checks to require in order to merge into this branch.

", + "items": { + "type": "object", + "properties": { + "context": { + "type": "string", + "description": "

The name of the required check

", + "name": "context", + "in": "body", + "rawType": "string", + "rawDescription": "The name of the required check", + "childParamsGroups": [] + }, + "app_id": { + "type": "string", + "description": "

The ID of the GitHub App that must provide this check. Set to null to accept the check from any source.

", + "name": "app_id", + "in": "body", + "rawType": "string", + "rawDescription": "The ID of the GitHub App that must provide this check. Set to `null` to accept the check from any source.", + "childParamsGroups": [] + } + } + }, + "name": "checks", + "in": "body", + "rawType": "array", + "rawDescription": "The list of status checks to require in order to merge into this branch.", + "childParamsGroups": [ + { + "parentName": "checks", + "parentType": "items", + "id": "checks-items", + "params": [ + { + "type": "string", + "description": "

The name of the required check

", + "name": "context", + "in": "body", + "rawType": "string", + "rawDescription": "The name of the required check", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "

The ID of the GitHub App that must provide this check. Set to null to accept the check from any source.

", + "name": "app_id", + "in": "body", + "rawType": "string", + "rawDescription": "The ID of the GitHub App that must provide this check. Set to `null` to accept the check from any source.", + "childParamsGroups": [] + } + ] + } + ] + } + ] + }, + { + "parentName": "checks", + "parentType": "items", + "id": "checks-items", + "params": [ + { + "type": "string", + "description": "

The name of the required check

", + "name": "context", + "in": "body", + "rawType": "string", + "rawDescription": "The name of the required check", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "

The ID of the GitHub App that must provide this check. Set to null to accept the check from any source.

", + "name": "app_id", + "in": "body", + "rawType": "string", + "rawDescription": "The ID of the GitHub App that must provide this check. Set to `null` to accept the check from any source.", + "childParamsGroups": [] } ] } diff --git a/lib/rest/static/decorated/github.ae.json b/lib/rest/static/decorated/github.ae.json index 21871c8450..c27d68afe0 100644 --- a/lib/rest/static/decorated/github.ae.json +++ b/lib/rest/static/decorated/github.ae.json @@ -29507,13 +29507,13 @@ "x-codeSamples": [ { "lang": "Shell", - "source": "curl \\\n -X PUT \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://{hostname}/api/v3/repos/octocat/hello-world/branches/BRANCH/protection \\\n -d '{\"required_status_checks\":{\"strict\":true,\"contexts\":[\"contexts\"]},\"enforce_admins\":true,\"required_pull_request_reviews\":{\"dismissal_restrictions\":{\"users\":[\"users\"],\"teams\":[\"teams\"]},\"dismiss_stale_reviews\":true,\"require_code_owner_reviews\":true,\"required_approving_review_count\":42},\"restrictions\":{\"users\":[\"users\"],\"teams\":[\"teams\"],\"apps\":[\"apps\"]}}'", - "html": "
curl \\\n  -X PUT \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://{hostname}/api/v3/repos/octocat/hello-world/branches/BRANCH/protection \\\n  -d '{\"required_status_checks\":{\"strict\":true,\"contexts\":[\"contexts\"]},\"enforce_admins\":true,\"required_pull_request_reviews\":{\"dismissal_restrictions\":{\"users\":[\"users\"],\"teams\":[\"teams\"]},\"dismiss_stale_reviews\":true,\"require_code_owner_reviews\":true,\"required_approving_review_count\":42},\"restrictions\":{\"users\":[\"users\"],\"teams\":[\"teams\"],\"apps\":[\"apps\"]}}'
" + "source": "curl \\\n -X PUT \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://{hostname}/api/v3/repos/octocat/hello-world/branches/BRANCH/protection \\\n -d '{\"required_status_checks\":{\"strict\":true,\"contexts\":[\"contexts\"],\"checks\":[{\"context\":\"context\",\"app_id\":\"app_id\"}]},\"enforce_admins\":true,\"required_pull_request_reviews\":{\"dismissal_restrictions\":{\"users\":[\"users\"],\"teams\":[\"teams\"]},\"dismiss_stale_reviews\":true,\"require_code_owner_reviews\":true,\"required_approving_review_count\":42},\"restrictions\":{\"users\":[\"users\"],\"teams\":[\"teams\"],\"apps\":[\"apps\"]}}'", + "html": "
curl \\\n  -X PUT \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://{hostname}/api/v3/repos/octocat/hello-world/branches/BRANCH/protection \\\n  -d '{\"required_status_checks\":{\"strict\":true,\"contexts\":[\"contexts\"],\"checks\":[{\"context\":\"context\",\"app_id\":\"app_id\"}]},\"enforce_admins\":true,\"required_pull_request_reviews\":{\"dismissal_restrictions\":{\"users\":[\"users\"],\"teams\":[\"teams\"]},\"dismiss_stale_reviews\":true,\"require_code_owner_reviews\":true,\"required_approving_review_count\":42},\"restrictions\":{\"users\":[\"users\"],\"teams\":[\"teams\"],\"apps\":[\"apps\"]}}'
" }, { "lang": "JavaScript", - "source": "await octokit.request('PUT /repos/{owner}/{repo}/branches/{branch}/protection', {\n owner: 'octocat',\n repo: 'hello-world',\n branch: 'branch',\n required_status_checks: {\n strict: true,\n contexts: [\n 'contexts'\n ]\n },\n enforce_admins: true,\n required_pull_request_reviews: {\n dismissal_restrictions: {\n users: [\n 'users'\n ],\n teams: [\n 'teams'\n ]\n },\n dismiss_stale_reviews: true,\n require_code_owner_reviews: true,\n required_approving_review_count: 42\n },\n restrictions: {\n users: [\n 'users'\n ],\n teams: [\n 'teams'\n ],\n apps: [\n 'apps'\n ]\n }\n})", - "html": "
await octokit.request('PUT /repos/{owner}/{repo}/branches/{branch}/protection', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  branch: 'branch',\n  required_status_checks: {\n    strict: true,\n    contexts: [\n      'contexts'\n    ]\n  },\n  enforce_admins: true,\n  required_pull_request_reviews: {\n    dismissal_restrictions: {\n      users: [\n        'users'\n      ],\n      teams: [\n        'teams'\n      ]\n    },\n    dismiss_stale_reviews: true,\n    require_code_owner_reviews: true,\n    required_approving_review_count: 42\n  },\n  restrictions: {\n    users: [\n      'users'\n    ],\n    teams: [\n      'teams'\n    ],\n    apps: [\n      'apps'\n    ]\n  }\n})\n
" + "source": "await octokit.request('PUT /repos/{owner}/{repo}/branches/{branch}/protection', {\n owner: 'octocat',\n repo: 'hello-world',\n branch: 'branch',\n required_status_checks: {\n strict: true,\n contexts: [\n 'contexts'\n ],\n checks: [\n {\n context: 'context',\n app_id: 'app_id'\n }\n ]\n },\n enforce_admins: true,\n required_pull_request_reviews: {\n dismissal_restrictions: {\n users: [\n 'users'\n ],\n teams: [\n 'teams'\n ]\n },\n dismiss_stale_reviews: true,\n require_code_owner_reviews: true,\n required_approving_review_count: 42\n },\n restrictions: {\n users: [\n 'users'\n ],\n teams: [\n 'teams'\n ],\n apps: [\n 'apps'\n ]\n }\n})", + "html": "
await octokit.request('PUT /repos/{owner}/{repo}/branches/{branch}/protection', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  branch: 'branch',\n  required_status_checks: {\n    strict: true,\n    contexts: [\n      'contexts'\n    ],\n    checks: [\n      {\n        context: 'context',\n        app_id: 'app_id'\n      }\n    ]\n  },\n  enforce_admins: true,\n  required_pull_request_reviews: {\n    dismissal_restrictions: {\n      users: [\n        'users'\n      ],\n      teams: [\n        'teams'\n      ]\n    },\n    dismiss_stale_reviews: true,\n    require_code_owner_reviews: true,\n    required_approving_review_count: 42\n  },\n  restrictions: {\n    users: [\n      'users'\n    ],\n    teams: [\n      'teams'\n    ],\n    apps: [\n      'apps'\n    ]\n  }\n})\n
" } ], "summary": "Update branch protection", @@ -29558,6 +29558,64 @@ "rawType": "array", "rawDescription": "The list of status checks to require in order to merge into this branch. If any of these checks have recently been set by a particular GitHub App, they will be required to come from that app in future for the branch to merge. Use `checks` instead of `contexts` for more fine-grained control.", "childParamsGroups": [] + }, + "checks": { + "type": "array of objects", + "description": "

The list of status checks to require in order to merge into this branch.

", + "items": { + "type": "object", + "properties": { + "context": { + "type": "string", + "description": "

The name of the required check

", + "name": "context", + "in": "body", + "rawType": "string", + "rawDescription": "The name of the required check", + "childParamsGroups": [] + }, + "app_id": { + "type": "string", + "description": "

The ID of the GitHub App that must provide this check. Set to null to accept the check from any source.

", + "name": "app_id", + "in": "body", + "rawType": "string", + "rawDescription": "The ID of the GitHub App that must provide this check. Set to `null` to accept the check from any source.", + "childParamsGroups": [] + } + } + }, + "name": "checks", + "in": "body", + "rawType": "array", + "rawDescription": "The list of status checks to require in order to merge into this branch.", + "childParamsGroups": [ + { + "parentName": "checks", + "parentType": "items", + "id": "checks-items", + "params": [ + { + "type": "string", + "description": "

The name of the required check

", + "name": "context", + "in": "body", + "rawType": "string", + "rawDescription": "The name of the required check", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "

The ID of the GitHub App that must provide this check. Set to null to accept the check from any source.

", + "name": "app_id", + "in": "body", + "rawType": "string", + "rawDescription": "The ID of the GitHub App that must provide this check. Set to `null` to accept the check from any source.", + "childParamsGroups": [] + } + ] + } + ] } }, "required": [ @@ -29594,6 +29652,89 @@ "rawType": "array", "rawDescription": "The list of status checks to require in order to merge into this branch. If any of these checks have recently been set by a particular GitHub App, they will be required to come from that app in future for the branch to merge. Use `checks` instead of `contexts` for more fine-grained control.", "childParamsGroups": [] + }, + { + "type": "array of objects", + "description": "

The list of status checks to require in order to merge into this branch.

", + "items": { + "type": "object", + "properties": { + "context": { + "type": "string", + "description": "

The name of the required check

", + "name": "context", + "in": "body", + "rawType": "string", + "rawDescription": "The name of the required check", + "childParamsGroups": [] + }, + "app_id": { + "type": "string", + "description": "

The ID of the GitHub App that must provide this check. Set to null to accept the check from any source.

", + "name": "app_id", + "in": "body", + "rawType": "string", + "rawDescription": "The ID of the GitHub App that must provide this check. Set to `null` to accept the check from any source.", + "childParamsGroups": [] + } + } + }, + "name": "checks", + "in": "body", + "rawType": "array", + "rawDescription": "The list of status checks to require in order to merge into this branch.", + "childParamsGroups": [ + { + "parentName": "checks", + "parentType": "items", + "id": "checks-items", + "params": [ + { + "type": "string", + "description": "

The name of the required check

", + "name": "context", + "in": "body", + "rawType": "string", + "rawDescription": "The name of the required check", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "

The ID of the GitHub App that must provide this check. Set to null to accept the check from any source.

", + "name": "app_id", + "in": "body", + "rawType": "string", + "rawDescription": "The ID of the GitHub App that must provide this check. Set to `null` to accept the check from any source.", + "childParamsGroups": [] + } + ] + } + ] + } + ] + }, + { + "parentName": "checks", + "parentType": "items", + "id": "checks-items", + "params": [ + { + "type": "string", + "description": "

The name of the required check

", + "name": "context", + "in": "body", + "rawType": "string", + "rawDescription": "The name of the required check", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "

The ID of the GitHub App that must provide this check. Set to null to accept the check from any source.

", + "name": "app_id", + "in": "body", + "rawType": "string", + "rawDescription": "The ID of the GitHub App that must provide this check. Set to `null` to accept the check from any source.", + "childParamsGroups": [] } ] } @@ -30091,6 +30232,64 @@ "rawType": "array", "rawDescription": "The list of status checks to require in order to merge into this branch. If any of these checks have recently been set by a particular GitHub App, they will be required to come from that app in future for the branch to merge. Use `checks` instead of `contexts` for more fine-grained control.", "childParamsGroups": [] + }, + "checks": { + "type": "array of objects", + "description": "

The list of status checks to require in order to merge into this branch.

", + "items": { + "type": "object", + "properties": { + "context": { + "type": "string", + "description": "

The name of the required check

", + "name": "context", + "in": "body", + "rawType": "string", + "rawDescription": "The name of the required check", + "childParamsGroups": [] + }, + "app_id": { + "type": "string", + "description": "

The ID of the GitHub App that must provide this check. Set to null to accept the check from any source.

", + "name": "app_id", + "in": "body", + "rawType": "string", + "rawDescription": "The ID of the GitHub App that must provide this check. Set to `null` to accept the check from any source.", + "childParamsGroups": [] + } + } + }, + "name": "checks", + "in": "body", + "rawType": "array", + "rawDescription": "The list of status checks to require in order to merge into this branch.", + "childParamsGroups": [ + { + "parentName": "checks", + "parentType": "items", + "id": "checks-items", + "params": [ + { + "type": "string", + "description": "

The name of the required check

", + "name": "context", + "in": "body", + "rawType": "string", + "rawDescription": "The name of the required check", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "

The ID of the GitHub App that must provide this check. Set to null to accept the check from any source.

", + "name": "app_id", + "in": "body", + "rawType": "string", + "rawDescription": "The ID of the GitHub App that must provide this check. Set to `null` to accept the check from any source.", + "childParamsGroups": [] + } + ] + } + ] } }, "required": [ @@ -30127,6 +30326,89 @@ "rawType": "array", "rawDescription": "The list of status checks to require in order to merge into this branch. If any of these checks have recently been set by a particular GitHub App, they will be required to come from that app in future for the branch to merge. Use `checks` instead of `contexts` for more fine-grained control.", "childParamsGroups": [] + }, + { + "type": "array of objects", + "description": "

The list of status checks to require in order to merge into this branch.

", + "items": { + "type": "object", + "properties": { + "context": { + "type": "string", + "description": "

The name of the required check

", + "name": "context", + "in": "body", + "rawType": "string", + "rawDescription": "The name of the required check", + "childParamsGroups": [] + }, + "app_id": { + "type": "string", + "description": "

The ID of the GitHub App that must provide this check. Set to null to accept the check from any source.

", + "name": "app_id", + "in": "body", + "rawType": "string", + "rawDescription": "The ID of the GitHub App that must provide this check. Set to `null` to accept the check from any source.", + "childParamsGroups": [] + } + } + }, + "name": "checks", + "in": "body", + "rawType": "array", + "rawDescription": "The list of status checks to require in order to merge into this branch.", + "childParamsGroups": [ + { + "parentName": "checks", + "parentType": "items", + "id": "checks-items", + "params": [ + { + "type": "string", + "description": "

The name of the required check

", + "name": "context", + "in": "body", + "rawType": "string", + "rawDescription": "The name of the required check", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "

The ID of the GitHub App that must provide this check. Set to null to accept the check from any source.

", + "name": "app_id", + "in": "body", + "rawType": "string", + "rawDescription": "The ID of the GitHub App that must provide this check. Set to `null` to accept the check from any source.", + "childParamsGroups": [] + } + ] + } + ] + } + ] + }, + { + "parentName": "checks", + "parentType": "items", + "id": "checks-items", + "params": [ + { + "type": "string", + "description": "

The name of the required check

", + "name": "context", + "in": "body", + "rawType": "string", + "rawDescription": "The name of the required check", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "

The ID of the GitHub App that must provide this check. Set to null to accept the check from any source.

", + "name": "app_id", + "in": "body", + "rawType": "string", + "rawDescription": "The ID of the GitHub App that must provide this check. Set to `null` to accept the check from any source.", + "childParamsGroups": [] } ] } diff --git a/lib/rest/static/dereferenced/api.github.com.deref.json b/lib/rest/static/dereferenced/api.github.com.deref.json index 9367e7f9dc..e6bb3c9048 100644 --- a/lib/rest/static/dereferenced/api.github.com.deref.json +++ b/lib/rest/static/dereferenced/api.github.com.deref.json @@ -150444,6 +150444,25 @@ "type": "string" } }, + "checks": { + "type": "array", + "items": { + "type": "object", + "properties": { + "context": { + "type": "string" + }, + "app_id": { + "type": "string", + "nullable": true + } + }, + "required": [ + "context", + "app_id" + ] + } + }, "contexts_url": { "type": "string" }, @@ -151844,6 +151863,25 @@ "type": "string" } }, + "checks": { + "type": "array", + "items": { + "type": "object", + "properties": { + "context": { + "type": "string" + }, + "app_id": { + "type": "string", + "nullable": true + } + }, + "required": [ + "context", + "app_id" + ] + } + }, "contexts_url": { "type": "string" }, @@ -152735,6 +152773,25 @@ "type": "string" } }, + "checks": { + "type": "array", + "items": { + "type": "object", + "properties": { + "context": { + "type": "string" + }, + "app_id": { + "type": "string", + "nullable": true + } + }, + "required": [ + "context", + "app_id" + ] + } + }, "contexts_url": { "type": "string" }, @@ -153706,6 +153763,23 @@ "items": { "type": "string" } + }, + "checks": { + "type": "array", + "description": "The list of status checks to require in order to merge into this branch.", + "items": { + "type": "object", + "properties": { + "context": { + "type": "string", + "description": "The name of the required check" + }, + "app_id": { + "type": "string", + "description": "The ID of the GitHub App that must provide this check. Set to `null` to accept the check from any source." + } + } + } } }, "required": [ @@ -153891,6 +153965,22 @@ "type": "string" } }, + "checks": { + "type": "array", + "items": { + "type": "object", + "properties": { + "context": { + "type": "string", + "example": "continuous-integration/travis-ci" + }, + "app_id": { + "type": "string", + "nullable": true + } + } + } + }, "contexts_url": { "type": "string", "format": "uri", @@ -156484,6 +156574,22 @@ "type": "string" } }, + "checks": { + "type": "array", + "items": { + "type": "object", + "properties": { + "context": { + "type": "string", + "example": "continuous-integration/travis-ci" + }, + "app_id": { + "type": "string", + "nullable": true + } + } + } + }, "contexts_url": { "type": "string", "format": "uri", @@ -156642,6 +156748,22 @@ "type": "string" } }, + "checks": { + "type": "array", + "items": { + "type": "object", + "properties": { + "context": { + "type": "string", + "example": "continuous-integration/travis-ci" + }, + "app_id": { + "type": "string", + "nullable": true + } + } + } + }, "contexts_url": { "type": "string", "format": "uri", @@ -162894,6 +163016,25 @@ "type": "string" } }, + "checks": { + "type": "array", + "items": { + "type": "object", + "properties": { + "context": { + "type": "string" + }, + "app_id": { + "type": "string", + "nullable": true + } + }, + "required": [ + "context", + "app_id" + ] + } + }, "contexts_url": { "type": "string" }, diff --git a/lib/rest/static/dereferenced/ghes-3.0.deref.json b/lib/rest/static/dereferenced/ghes-3.0.deref.json index d040171dae..4cff9118fd 100644 --- a/lib/rest/static/dereferenced/ghes-3.0.deref.json +++ b/lib/rest/static/dereferenced/ghes-3.0.deref.json @@ -128529,6 +128529,25 @@ "type": "string" } }, + "checks": { + "type": "array", + "items": { + "type": "object", + "properties": { + "context": { + "type": "string" + }, + "app_id": { + "type": "string", + "nullable": true + } + }, + "required": [ + "context", + "app_id" + ] + } + }, "contexts_url": { "type": "string" }, @@ -129929,6 +129948,25 @@ "type": "string" } }, + "checks": { + "type": "array", + "items": { + "type": "object", + "properties": { + "context": { + "type": "string" + }, + "app_id": { + "type": "string", + "nullable": true + } + }, + "required": [ + "context", + "app_id" + ] + } + }, "contexts_url": { "type": "string" }, @@ -130820,6 +130858,25 @@ "type": "string" } }, + "checks": { + "type": "array", + "items": { + "type": "object", + "properties": { + "context": { + "type": "string" + }, + "app_id": { + "type": "string", + "nullable": true + } + }, + "required": [ + "context", + "app_id" + ] + } + }, "contexts_url": { "type": "string" }, @@ -131798,6 +131855,23 @@ "items": { "type": "string" } + }, + "checks": { + "type": "array", + "description": "The list of status checks to require in order to merge into this branch.", + "items": { + "type": "object", + "properties": { + "context": { + "type": "string", + "description": "The name of the required check" + }, + "app_id": { + "type": "string", + "description": "The ID of the GitHub App that must provide this check. Set to `null` to accept the check from any source." + } + } + } } }, "required": [ @@ -131983,6 +132057,22 @@ "type": "string" } }, + "checks": { + "type": "array", + "items": { + "type": "object", + "properties": { + "context": { + "type": "string", + "example": "continuous-integration/travis-ci" + }, + "app_id": { + "type": "string", + "nullable": true + } + } + } + }, "contexts_url": { "type": "string", "format": "uri", @@ -134618,6 +134708,22 @@ "type": "string" } }, + "checks": { + "type": "array", + "items": { + "type": "object", + "properties": { + "context": { + "type": "string", + "example": "continuous-integration/travis-ci" + }, + "app_id": { + "type": "string", + "nullable": true + } + } + } + }, "contexts_url": { "type": "string", "format": "uri", @@ -134776,6 +134882,22 @@ "type": "string" } }, + "checks": { + "type": "array", + "items": { + "type": "object", + "properties": { + "context": { + "type": "string", + "example": "continuous-integration/travis-ci" + }, + "app_id": { + "type": "string", + "nullable": true + } + } + } + }, "contexts_url": { "type": "string", "format": "uri", diff --git a/lib/rest/static/dereferenced/ghes-3.1.deref.json b/lib/rest/static/dereferenced/ghes-3.1.deref.json index d9e992ee1e..5de8dc1ea1 100644 --- a/lib/rest/static/dereferenced/ghes-3.1.deref.json +++ b/lib/rest/static/dereferenced/ghes-3.1.deref.json @@ -128844,6 +128844,25 @@ "type": "string" } }, + "checks": { + "type": "array", + "items": { + "type": "object", + "properties": { + "context": { + "type": "string" + }, + "app_id": { + "type": "string", + "nullable": true + } + }, + "required": [ + "context", + "app_id" + ] + } + }, "contexts_url": { "type": "string" }, @@ -130244,6 +130263,25 @@ "type": "string" } }, + "checks": { + "type": "array", + "items": { + "type": "object", + "properties": { + "context": { + "type": "string" + }, + "app_id": { + "type": "string", + "nullable": true + } + }, + "required": [ + "context", + "app_id" + ] + } + }, "contexts_url": { "type": "string" }, @@ -131135,6 +131173,25 @@ "type": "string" } }, + "checks": { + "type": "array", + "items": { + "type": "object", + "properties": { + "context": { + "type": "string" + }, + "app_id": { + "type": "string", + "nullable": true + } + }, + "required": [ + "context", + "app_id" + ] + } + }, "contexts_url": { "type": "string" }, @@ -132113,6 +132170,23 @@ "items": { "type": "string" } + }, + "checks": { + "type": "array", + "description": "The list of status checks to require in order to merge into this branch.", + "items": { + "type": "object", + "properties": { + "context": { + "type": "string", + "description": "The name of the required check" + }, + "app_id": { + "type": "string", + "description": "The ID of the GitHub App that must provide this check. Set to `null` to accept the check from any source." + } + } + } } }, "required": [ @@ -132298,6 +132372,22 @@ "type": "string" } }, + "checks": { + "type": "array", + "items": { + "type": "object", + "properties": { + "context": { + "type": "string", + "example": "continuous-integration/travis-ci" + }, + "app_id": { + "type": "string", + "nullable": true + } + } + } + }, "contexts_url": { "type": "string", "format": "uri", @@ -134933,6 +135023,22 @@ "type": "string" } }, + "checks": { + "type": "array", + "items": { + "type": "object", + "properties": { + "context": { + "type": "string", + "example": "continuous-integration/travis-ci" + }, + "app_id": { + "type": "string", + "nullable": true + } + } + } + }, "contexts_url": { "type": "string", "format": "uri", @@ -135091,6 +135197,22 @@ "type": "string" } }, + "checks": { + "type": "array", + "items": { + "type": "object", + "properties": { + "context": { + "type": "string", + "example": "continuous-integration/travis-ci" + }, + "app_id": { + "type": "string", + "nullable": true + } + } + } + }, "contexts_url": { "type": "string", "format": "uri", @@ -141343,6 +141465,25 @@ "type": "string" } }, + "checks": { + "type": "array", + "items": { + "type": "object", + "properties": { + "context": { + "type": "string" + }, + "app_id": { + "type": "string", + "nullable": true + } + }, + "required": [ + "context", + "app_id" + ] + } + }, "contexts_url": { "type": "string" }, diff --git a/lib/rest/static/dereferenced/ghes-3.2.deref.json b/lib/rest/static/dereferenced/ghes-3.2.deref.json index eee970a7cb..38398ff96d 100644 --- a/lib/rest/static/dereferenced/ghes-3.2.deref.json +++ b/lib/rest/static/dereferenced/ghes-3.2.deref.json @@ -132461,6 +132461,25 @@ "type": "string" } }, + "checks": { + "type": "array", + "items": { + "type": "object", + "properties": { + "context": { + "type": "string" + }, + "app_id": { + "type": "string", + "nullable": true + } + }, + "required": [ + "context", + "app_id" + ] + } + }, "contexts_url": { "type": "string" }, @@ -133861,6 +133880,25 @@ "type": "string" } }, + "checks": { + "type": "array", + "items": { + "type": "object", + "properties": { + "context": { + "type": "string" + }, + "app_id": { + "type": "string", + "nullable": true + } + }, + "required": [ + "context", + "app_id" + ] + } + }, "contexts_url": { "type": "string" }, @@ -134752,6 +134790,25 @@ "type": "string" } }, + "checks": { + "type": "array", + "items": { + "type": "object", + "properties": { + "context": { + "type": "string" + }, + "app_id": { + "type": "string", + "nullable": true + } + }, + "required": [ + "context", + "app_id" + ] + } + }, "contexts_url": { "type": "string" }, @@ -135730,6 +135787,23 @@ "items": { "type": "string" } + }, + "checks": { + "type": "array", + "description": "The list of status checks to require in order to merge into this branch.", + "items": { + "type": "object", + "properties": { + "context": { + "type": "string", + "description": "The name of the required check" + }, + "app_id": { + "type": "string", + "description": "The ID of the GitHub App that must provide this check. Set to `null` to accept the check from any source." + } + } + } } }, "required": [ @@ -135915,6 +135989,22 @@ "type": "string" } }, + "checks": { + "type": "array", + "items": { + "type": "object", + "properties": { + "context": { + "type": "string", + "example": "continuous-integration/travis-ci" + }, + "app_id": { + "type": "string", + "nullable": true + } + } + } + }, "contexts_url": { "type": "string", "format": "uri", @@ -138550,6 +138640,22 @@ "type": "string" } }, + "checks": { + "type": "array", + "items": { + "type": "object", + "properties": { + "context": { + "type": "string", + "example": "continuous-integration/travis-ci" + }, + "app_id": { + "type": "string", + "nullable": true + } + } + } + }, "contexts_url": { "type": "string", "format": "uri", @@ -138708,6 +138814,22 @@ "type": "string" } }, + "checks": { + "type": "array", + "items": { + "type": "object", + "properties": { + "context": { + "type": "string", + "example": "continuous-integration/travis-ci" + }, + "app_id": { + "type": "string", + "nullable": true + } + } + } + }, "contexts_url": { "type": "string", "format": "uri", @@ -144960,6 +145082,25 @@ "type": "string" } }, + "checks": { + "type": "array", + "items": { + "type": "object", + "properties": { + "context": { + "type": "string" + }, + "app_id": { + "type": "string", + "nullable": true + } + }, + "required": [ + "context", + "app_id" + ] + } + }, "contexts_url": { "type": "string" }, diff --git a/lib/rest/static/dereferenced/ghes-3.3.deref.json b/lib/rest/static/dereferenced/ghes-3.3.deref.json index f8f741b72f..baba972dc4 100644 --- a/lib/rest/static/dereferenced/ghes-3.3.deref.json +++ b/lib/rest/static/dereferenced/ghes-3.3.deref.json @@ -139356,6 +139356,25 @@ "type": "string" } }, + "checks": { + "type": "array", + "items": { + "type": "object", + "properties": { + "context": { + "type": "string" + }, + "app_id": { + "type": "string", + "nullable": true + } + }, + "required": [ + "context", + "app_id" + ] + } + }, "contexts_url": { "type": "string" }, @@ -140756,6 +140775,25 @@ "type": "string" } }, + "checks": { + "type": "array", + "items": { + "type": "object", + "properties": { + "context": { + "type": "string" + }, + "app_id": { + "type": "string", + "nullable": true + } + }, + "required": [ + "context", + "app_id" + ] + } + }, "contexts_url": { "type": "string" }, @@ -141647,6 +141685,25 @@ "type": "string" } }, + "checks": { + "type": "array", + "items": { + "type": "object", + "properties": { + "context": { + "type": "string" + }, + "app_id": { + "type": "string", + "nullable": true + } + }, + "required": [ + "context", + "app_id" + ] + } + }, "contexts_url": { "type": "string" }, @@ -142618,6 +142675,23 @@ "items": { "type": "string" } + }, + "checks": { + "type": "array", + "description": "The list of status checks to require in order to merge into this branch.", + "items": { + "type": "object", + "properties": { + "context": { + "type": "string", + "description": "The name of the required check" + }, + "app_id": { + "type": "string", + "description": "The ID of the GitHub App that must provide this check. Set to `null` to accept the check from any source." + } + } + } } }, "required": [ @@ -142803,6 +142877,22 @@ "type": "string" } }, + "checks": { + "type": "array", + "items": { + "type": "object", + "properties": { + "context": { + "type": "string", + "example": "continuous-integration/travis-ci" + }, + "app_id": { + "type": "string", + "nullable": true + } + } + } + }, "contexts_url": { "type": "string", "format": "uri", @@ -145396,6 +145486,22 @@ "type": "string" } }, + "checks": { + "type": "array", + "items": { + "type": "object", + "properties": { + "context": { + "type": "string", + "example": "continuous-integration/travis-ci" + }, + "app_id": { + "type": "string", + "nullable": true + } + } + } + }, "contexts_url": { "type": "string", "format": "uri", @@ -145554,6 +145660,22 @@ "type": "string" } }, + "checks": { + "type": "array", + "items": { + "type": "object", + "properties": { + "context": { + "type": "string", + "example": "continuous-integration/travis-ci" + }, + "app_id": { + "type": "string", + "nullable": true + } + } + } + }, "contexts_url": { "type": "string", "format": "uri", @@ -151806,6 +151928,25 @@ "type": "string" } }, + "checks": { + "type": "array", + "items": { + "type": "object", + "properties": { + "context": { + "type": "string" + }, + "app_id": { + "type": "string", + "nullable": true + } + }, + "required": [ + "context", + "app_id" + ] + } + }, "contexts_url": { "type": "string" }, diff --git a/lib/rest/static/dereferenced/github.ae.deref.json b/lib/rest/static/dereferenced/github.ae.deref.json index 298a7f2c9b..eb53effa3c 100644 --- a/lib/rest/static/dereferenced/github.ae.deref.json +++ b/lib/rest/static/dereferenced/github.ae.deref.json @@ -103577,6 +103577,25 @@ "type": "string" } }, + "checks": { + "type": "array", + "items": { + "type": "object", + "properties": { + "context": { + "type": "string" + }, + "app_id": { + "type": "string", + "nullable": true + } + }, + "required": [ + "context", + "app_id" + ] + } + }, "contexts_url": { "type": "string" }, @@ -104977,6 +104996,25 @@ "type": "string" } }, + "checks": { + "type": "array", + "items": { + "type": "object", + "properties": { + "context": { + "type": "string" + }, + "app_id": { + "type": "string", + "nullable": true + } + }, + "required": [ + "context", + "app_id" + ] + } + }, "contexts_url": { "type": "string" }, @@ -105868,6 +105906,25 @@ "type": "string" } }, + "checks": { + "type": "array", + "items": { + "type": "object", + "properties": { + "context": { + "type": "string" + }, + "app_id": { + "type": "string", + "nullable": true + } + }, + "required": [ + "context", + "app_id" + ] + } + }, "contexts_url": { "type": "string" }, @@ -106839,6 +106896,23 @@ "items": { "type": "string" } + }, + "checks": { + "type": "array", + "description": "The list of status checks to require in order to merge into this branch.", + "items": { + "type": "object", + "properties": { + "context": { + "type": "string", + "description": "The name of the required check" + }, + "app_id": { + "type": "string", + "description": "The ID of the GitHub App that must provide this check. Set to `null` to accept the check from any source." + } + } + } } }, "required": [ @@ -107024,6 +107098,22 @@ "type": "string" } }, + "checks": { + "type": "array", + "items": { + "type": "object", + "properties": { + "context": { + "type": "string", + "example": "continuous-integration/travis-ci" + }, + "app_id": { + "type": "string", + "nullable": true + } + } + } + }, "contexts_url": { "type": "string", "format": "uri", @@ -109617,6 +109707,22 @@ "type": "string" } }, + "checks": { + "type": "array", + "items": { + "type": "object", + "properties": { + "context": { + "type": "string", + "example": "continuous-integration/travis-ci" + }, + "app_id": { + "type": "string", + "nullable": true + } + } + } + }, "contexts_url": { "type": "string", "format": "uri", @@ -109775,6 +109881,22 @@ "type": "string" } }, + "checks": { + "type": "array", + "items": { + "type": "object", + "properties": { + "context": { + "type": "string", + "example": "continuous-integration/travis-ci" + }, + "app_id": { + "type": "string", + "nullable": true + } + } + } + }, "contexts_url": { "type": "string", "format": "uri", From ad605a410ce12b95c4f8d30e4e1de01a9767bb91 Mon Sep 17 00:00:00 2001 From: Chris Patterson Date: Thu, 18 Nov 2021 06:38:33 -0500 Subject: [PATCH 3/3] Updated workflow inputs example to include types (#22588) * Updated workflow inputs example to include types * Add versioning for GHEC/GHES/GHAE * Remove links to actions.yaml info Co-authored-by: hubwriter --- .../workflow-syntax-for-github-actions.md | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/content/actions/learn-github-actions/workflow-syntax-for-github-actions.md b/content/actions/learn-github-actions/workflow-syntax-for-github-actions.md index c466810827..8cafaf8c6b 100644 --- a/content/actions/learn-github-actions/workflow-syntax-for-github-actions.md +++ b/content/actions/learn-github-actions/workflow-syntax-for-github-actions.md @@ -187,7 +187,7 @@ For more information, see "[About comparing branches in pull requests](/pull-req {% ifversion fpt or ghes > 3.3 or ghae-issue-4757 or ghec %} ## `on.workflow_call.inputs` -When using the `workflow_call` keyword, you can optionally specify inputs that are passed to the called workflow from the caller workflow. Inputs for reusable workflows are specified with the same format as action inputs. For more information about inputs, see "[Metadata syntax for GitHub Actions](/actions/creating-actions/metadata-syntax-for-github-actions#inputs)." For more information about the `workflow_call` keyword, see "[Events that trigger workflows](/actions/learn-github-actions/events-that-trigger-workflows#workflow-reuse-events)." +When using the `workflow_call` keyword, you can optionally specify inputs that are passed to the called workflow from the caller workflow. For more information about the `workflow_call` keyword, see "[Events that trigger workflows](/actions/learn-github-actions/events-that-trigger-workflows#workflow-reuse-events)." In addition to the standard input parameters that are available, `on.workflow_call.inputs` requires a `type` parameter. For more information, see [`on.workflow_call.inputs..type`](#onworkflow_callinputsinput_idtype). @@ -268,7 +268,7 @@ A boolean specifying whether the secret must be supplied. ## `on.workflow_dispatch.inputs` -When using the `workflow_dispatch` event, you can optionally specify inputs that are passed to the workflow. Workflow dispatch inputs are specified with the same format as action inputs. For more information about the format see "[Metadata syntax for GitHub Actions](/actions/creating-actions/metadata-syntax-for-github-actions#inputs)." +When using the `workflow_dispatch` event, you can optionally specify inputs that are passed to the workflow. ```yaml on: @@ -277,10 +277,20 @@ on: logLevel: description: 'Log level' required: true - default: 'warning' + default: 'warning' {% ifversion ghec or ghes > 3.3 or ghae-issue-5511 %} + type: choice + options: + - info + - warning + - debug {% endif %} tags: description: 'Test scenario tags' - required: false + required: false {% ifversion ghec or ghes > 3.3 or ghae-issue-5511 %} + type: boolean + environment: + description: 'Environment to run tests against' + type: environment + required: true {% endif %} ``` The triggered workflow receives the inputs in the `github.event.inputs` context. For more information, see "[Contexts](/actions/learn-github-actions/contexts#github-context)."