From cb355c6da39d0073858fb6dbb7753b3896f7e78d Mon Sep 17 00:00:00 2001 From: Robert Sese Date: Tue, 12 Apr 2022 18:15:22 -0500 Subject: [PATCH] openapi: fix nested params (#26894) * Check for 'object' in ['object', 'null'] * Add updated decorated files * arrays can also be null with this format Co-authored-by: Rachael Sewell * arrays can also be null with this format Co-authored-by: Rachael Sewell Co-authored-by: Rachael Sewell --- lib/rest/static/decorated/api.github.com.json | 956 +++++++++++++++++- lib/rest/static/decorated/ghes-3.1.json | 485 ++++++++- lib/rest/static/decorated/ghes-3.2.json | 795 ++++++++++++++- lib/rest/static/decorated/ghes-3.3.json | 795 ++++++++++++++- lib/rest/static/decorated/ghes-3.4.json | 956 +++++++++++++++++- lib/rest/static/decorated/github.ae.json | 956 +++++++++++++++++- script/rest/utils/operation.js | 36 +- 7 files changed, 4693 insertions(+), 286 deletions(-) diff --git a/lib/rest/static/decorated/api.github.com.json b/lib/rest/static/decorated/api.github.com.json index 0a42cbe7f8..dc7ff5c7a6 100644 --- a/lib/rest/static/decorated/api.github.com.json +++ b/lib/rest/static/decorated/api.github.com.json @@ -23112,19 +23112,29 @@ "properties": { "strict": { "type": "boolean", - "description": "Require branches to be up to date before merging." + "description": "

Required. Require branches to be up to date before merging.

", + "name": "strict", + "in": "body", + "rawType": "boolean", + "rawDescription": "Require branches to be up to date before merging.", + "childParamsGroups": [] }, "contexts": { - "type": "array", + "type": "array of strings", "deprecated": true, - "description": "**Deprecated**: 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.\n", + "description": "

Required. Deprecated: 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.

", "items": { "type": "string" - } + }, + "name": "contexts", + "in": "body", + "rawType": "array", + "rawDescription": "**Deprecated**: 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.\n", + "childParamsGroups": [] }, "checks": { - "type": "array", - "description": "The list of status checks to require in order to merge into this branch.", + "type": "array of objects", + "description": "

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

", "items": { "type": "object", "required": [ @@ -23133,14 +23143,55 @@ "properties": { "context": { "type": "string", - "description": "The name of the required check" + "description": "

Required. The name of the required check

", + "name": "context", + "in": "body", + "rawType": "string", + "rawDescription": "The name of the required check", + "childParamsGroups": [] }, "app_id": { "type": "integer", - "description": "The ID of the GitHub App that must provide this check. Omit this field to automatically select the GitHub App that has recently provided this check, or any app if it was not set by a GitHub App. Pass -1 to explicitly allow any app to set the status." + "description": "

The ID of the GitHub App that must provide this check. Omit this field to automatically select the GitHub App that has recently provided this check, or any app if it was not set by a GitHub App. Pass -1 to explicitly allow any app to set the status.

", + "name": "app_id", + "in": "body", + "rawType": "integer", + "rawDescription": "The ID of the GitHub App that must provide this check. Omit this field to automatically select the GitHub App that has recently provided this check, or any app if it was not set by a GitHub App. Pass -1 to explicitly allow any app to set the status.", + "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": "

Required. The name of the required check

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

The ID of the GitHub App that must provide this check. Omit this field to automatically select the GitHub App that has recently provided this check, or any app if it was not set by a GitHub App. Pass -1 to explicitly allow any app to set the status.

", + "name": "app_id", + "in": "body", + "rawType": "integer", + "rawDescription": "The ID of the GitHub App that must provide this check. Omit this field to automatically select the GitHub App that has recently provided this check, or any app if it was not set by a GitHub App. Pass -1 to explicitly allow any app to set the status.", + "childParamsGroups": [] + } + ] + } + ] } }, "required": [ @@ -23154,7 +23205,123 @@ "null" ], "rawDescription": "Require status checks to pass before merging. Set to `null` to disable.", - "childParamsGroups": [] + "childParamsGroups": [ + { + "parentName": "required_status_checks", + "parentType": "object", + "id": "required_status_checks-object", + "params": [ + { + "type": "boolean", + "description": "

Required. Require branches to be up to date before merging.

", + "name": "strict", + "in": "body", + "rawType": "boolean", + "rawDescription": "Require branches to be up to date before merging.", + "childParamsGroups": [] + }, + { + "type": "array of strings", + "deprecated": true, + "description": "

Required. Deprecated: 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.

", + "items": { + "type": "string" + }, + "name": "contexts", + "in": "body", + "rawType": "array", + "rawDescription": "**Deprecated**: 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.\n", + "childParamsGroups": [] + }, + { + "type": "array of objects", + "description": "

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

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

Required. The name of the required check

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

The ID of the GitHub App that must provide this check. Omit this field to automatically select the GitHub App that has recently provided this check, or any app if it was not set by a GitHub App. Pass -1 to explicitly allow any app to set the status.

", + "name": "app_id", + "in": "body", + "rawType": "integer", + "rawDescription": "The ID of the GitHub App that must provide this check. Omit this field to automatically select the GitHub App that has recently provided this check, or any app if it was not set by a GitHub App. Pass -1 to explicitly allow any app to set the status.", + "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": "

Required. The name of the required check

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

The ID of the GitHub App that must provide this check. Omit this field to automatically select the GitHub App that has recently provided this check, or any app if it was not set by a GitHub App. Pass -1 to explicitly allow any app to set the status.

", + "name": "app_id", + "in": "body", + "rawType": "integer", + "rawDescription": "The ID of the GitHub App that must provide this check. Omit this field to automatically select the GitHub App that has recently provided this check, or any app if it was not set by a GitHub App. Pass -1 to explicitly allow any app to set the status.", + "childParamsGroups": [] + } + ] + } + ] + } + ] + }, + { + "parentName": "checks", + "parentType": "items", + "id": "checks-items", + "params": [ + { + "type": "string", + "description": "

Required. The name of the required check

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

The ID of the GitHub App that must provide this check. Omit this field to automatically select the GitHub App that has recently provided this check, or any app if it was not set by a GitHub App. Pass -1 to explicitly allow any app to set the status.

", + "name": "app_id", + "in": "body", + "rawType": "integer", + "rawDescription": "The ID of the GitHub App that must provide this check. Omit this field to automatically select the GitHub App that has recently provided this check, or any app if it was not set by a GitHub App. Pass -1 to explicitly allow any app to set the status.", + "childParamsGroups": [] + } + ] + } + ] }, { "type": "boolean or null", @@ -23174,55 +23341,164 @@ "properties": { "dismissal_restrictions": { "type": "object", - "description": "Specify which users and teams can dismiss pull request reviews. Pass an empty `dismissal_restrictions` object to disable. User and team `dismissal_restrictions` are only available for organization-owned repositories. Omit this parameter for personal repositories.", + "description": "

Specify which users and teams can dismiss pull request reviews. Pass an empty dismissal_restrictions object to disable. User and team dismissal_restrictions are only available for organization-owned repositories. Omit this parameter for personal repositories.

", "properties": { "users": { - "type": "array", - "description": "The list of user `login`s with dismissal access", + "type": "array of strings", + "description": "

The list of user logins with dismissal access

", "items": { "type": "string" - } + }, + "name": "users", + "in": "body", + "rawType": "array", + "rawDescription": "The list of user `login`s with dismissal access", + "childParamsGroups": [] }, "teams": { - "type": "array", - "description": "The list of team `slug`s with dismissal access", + "type": "array of strings", + "description": "

The list of team slugs with dismissal access

", "items": { "type": "string" - } + }, + "name": "teams", + "in": "body", + "rawType": "array", + "rawDescription": "The list of team `slug`s with dismissal access", + "childParamsGroups": [] } - } + }, + "name": "dismissal_restrictions", + "in": "body", + "rawType": "object", + "rawDescription": "Specify which users and teams can dismiss pull request reviews. Pass an empty `dismissal_restrictions` object to disable. User and team `dismissal_restrictions` are only available for organization-owned repositories. Omit this parameter for personal repositories.", + "childParamsGroups": [ + { + "parentName": "dismissal_restrictions", + "parentType": "object", + "id": "dismissal_restrictions-object", + "params": [ + { + "type": "array of strings", + "description": "

The list of user logins with dismissal access

", + "items": { + "type": "string" + }, + "name": "users", + "in": "body", + "rawType": "array", + "rawDescription": "The list of user `login`s with dismissal access", + "childParamsGroups": [] + }, + { + "type": "array of strings", + "description": "

The list of team slugs with dismissal access

", + "items": { + "type": "string" + }, + "name": "teams", + "in": "body", + "rawType": "array", + "rawDescription": "The list of team `slug`s with dismissal access", + "childParamsGroups": [] + } + ] + } + ] }, "dismiss_stale_reviews": { "type": "boolean", - "description": "Set to `true` if you want to automatically dismiss approving reviews when someone pushes a new commit." + "description": "

Set to true if you want to automatically dismiss approving reviews when someone pushes a new commit.

", + "name": "dismiss_stale_reviews", + "in": "body", + "rawType": "boolean", + "rawDescription": "Set to `true` if you want to automatically dismiss approving reviews when someone pushes a new commit.", + "childParamsGroups": [] }, "require_code_owner_reviews": { "type": "boolean", - "description": "Blocks merging pull requests until [code owners](https://docs.github.com/articles/about-code-owners/) review them." + "description": "

Blocks merging pull requests until code owners review them.

", + "name": "require_code_owner_reviews", + "in": "body", + "rawType": "boolean", + "rawDescription": "Blocks merging pull requests until [code owners](https://docs.github.com/articles/about-code-owners/) review them.", + "childParamsGroups": [] }, "required_approving_review_count": { "type": "integer", - "description": "Specify the number of reviewers required to approve pull requests. Use a number between 1 and 6 or 0 to not require reviewers." + "description": "

Specify the number of reviewers required to approve pull requests. Use a number between 1 and 6 or 0 to not require reviewers.

", + "name": "required_approving_review_count", + "in": "body", + "rawType": "integer", + "rawDescription": "Specify the number of reviewers required to approve pull requests. Use a number between 1 and 6 or 0 to not require reviewers.", + "childParamsGroups": [] }, "bypass_pull_request_allowances": { "type": "object", - "description": "Allow specific users or teams to bypass pull request requirements.", + "description": "

Allow specific users or teams to bypass pull request requirements.

", "properties": { "users": { - "type": "array", - "description": "The list of user `login`s allowed to bypass pull request requirements.", + "type": "array of strings", + "description": "

The list of user logins allowed to bypass pull request requirements.

", "items": { "type": "string" - } + }, + "name": "users", + "in": "body", + "rawType": "array", + "rawDescription": "The list of user `login`s allowed to bypass pull request requirements.", + "childParamsGroups": [] }, "teams": { - "type": "array", - "description": "The list of team `slug`s allowed to bypass pull request requirements.", + "type": "array of strings", + "description": "

The list of team slugs allowed to bypass pull request requirements.

", "items": { "type": "string" - } + }, + "name": "teams", + "in": "body", + "rawType": "array", + "rawDescription": "The list of team `slug`s allowed to bypass pull request requirements.", + "childParamsGroups": [] } - } + }, + "name": "bypass_pull_request_allowances", + "in": "body", + "rawType": "object", + "rawDescription": "Allow specific users or teams to bypass pull request requirements.", + "childParamsGroups": [ + { + "parentName": "bypass_pull_request_allowances", + "parentType": "object", + "id": "bypass_pull_request_allowances-object", + "params": [ + { + "type": "array of strings", + "description": "

The list of user logins allowed to bypass pull request requirements.

", + "items": { + "type": "string" + }, + "name": "users", + "in": "body", + "rawType": "array", + "rawDescription": "The list of user `login`s allowed to bypass pull request requirements.", + "childParamsGroups": [] + }, + { + "type": "array of strings", + "description": "

The list of team slugs allowed to bypass pull request requirements.

", + "items": { + "type": "string" + }, + "name": "teams", + "in": "body", + "rawType": "array", + "rawDescription": "The list of team `slug`s allowed to bypass pull request requirements.", + "childParamsGroups": [] + } + ] + } + ] } }, "name": "required_pull_request_reviews", @@ -23232,32 +23508,278 @@ "null" ], "rawDescription": "Require at least one approving review on a pull request, before merging. Set to `null` to disable.", - "childParamsGroups": [] + "childParamsGroups": [ + { + "parentName": "required_pull_request_reviews", + "parentType": "object", + "id": "required_pull_request_reviews-object", + "params": [ + { + "type": "object", + "description": "

Specify which users and teams can dismiss pull request reviews. Pass an empty dismissal_restrictions object to disable. User and team dismissal_restrictions are only available for organization-owned repositories. Omit this parameter for personal repositories.

", + "properties": { + "users": { + "type": "array of strings", + "description": "

The list of user logins with dismissal access

", + "items": { + "type": "string" + }, + "name": "users", + "in": "body", + "rawType": "array", + "rawDescription": "The list of user `login`s with dismissal access", + "childParamsGroups": [] + }, + "teams": { + "type": "array of strings", + "description": "

The list of team slugs with dismissal access

", + "items": { + "type": "string" + }, + "name": "teams", + "in": "body", + "rawType": "array", + "rawDescription": "The list of team `slug`s with dismissal access", + "childParamsGroups": [] + } + }, + "name": "dismissal_restrictions", + "in": "body", + "rawType": "object", + "rawDescription": "Specify which users and teams can dismiss pull request reviews. Pass an empty `dismissal_restrictions` object to disable. User and team `dismissal_restrictions` are only available for organization-owned repositories. Omit this parameter for personal repositories.", + "childParamsGroups": [ + { + "parentName": "dismissal_restrictions", + "parentType": "object", + "id": "dismissal_restrictions-object", + "params": [ + { + "type": "array of strings", + "description": "

The list of user logins with dismissal access

", + "items": { + "type": "string" + }, + "name": "users", + "in": "body", + "rawType": "array", + "rawDescription": "The list of user `login`s with dismissal access", + "childParamsGroups": [] + }, + { + "type": "array of strings", + "description": "

The list of team slugs with dismissal access

", + "items": { + "type": "string" + }, + "name": "teams", + "in": "body", + "rawType": "array", + "rawDescription": "The list of team `slug`s with dismissal access", + "childParamsGroups": [] + } + ] + } + ] + }, + { + "type": "boolean", + "description": "

Set to true if you want to automatically dismiss approving reviews when someone pushes a new commit.

", + "name": "dismiss_stale_reviews", + "in": "body", + "rawType": "boolean", + "rawDescription": "Set to `true` if you want to automatically dismiss approving reviews when someone pushes a new commit.", + "childParamsGroups": [] + }, + { + "type": "boolean", + "description": "

Blocks merging pull requests until code owners review them.

", + "name": "require_code_owner_reviews", + "in": "body", + "rawType": "boolean", + "rawDescription": "Blocks merging pull requests until [code owners](https://docs.github.com/articles/about-code-owners/) review them.", + "childParamsGroups": [] + }, + { + "type": "integer", + "description": "

Specify the number of reviewers required to approve pull requests. Use a number between 1 and 6 or 0 to not require reviewers.

", + "name": "required_approving_review_count", + "in": "body", + "rawType": "integer", + "rawDescription": "Specify the number of reviewers required to approve pull requests. Use a number between 1 and 6 or 0 to not require reviewers.", + "childParamsGroups": [] + }, + { + "type": "object", + "description": "

Allow specific users or teams to bypass pull request requirements.

", + "properties": { + "users": { + "type": "array of strings", + "description": "

The list of user logins allowed to bypass pull request requirements.

", + "items": { + "type": "string" + }, + "name": "users", + "in": "body", + "rawType": "array", + "rawDescription": "The list of user `login`s allowed to bypass pull request requirements.", + "childParamsGroups": [] + }, + "teams": { + "type": "array of strings", + "description": "

The list of team slugs allowed to bypass pull request requirements.

", + "items": { + "type": "string" + }, + "name": "teams", + "in": "body", + "rawType": "array", + "rawDescription": "The list of team `slug`s allowed to bypass pull request requirements.", + "childParamsGroups": [] + } + }, + "name": "bypass_pull_request_allowances", + "in": "body", + "rawType": "object", + "rawDescription": "Allow specific users or teams to bypass pull request requirements.", + "childParamsGroups": [ + { + "parentName": "bypass_pull_request_allowances", + "parentType": "object", + "id": "bypass_pull_request_allowances-object", + "params": [ + { + "type": "array of strings", + "description": "

The list of user logins allowed to bypass pull request requirements.

", + "items": { + "type": "string" + }, + "name": "users", + "in": "body", + "rawType": "array", + "rawDescription": "The list of user `login`s allowed to bypass pull request requirements.", + "childParamsGroups": [] + }, + { + "type": "array of strings", + "description": "

The list of team slugs allowed to bypass pull request requirements.

", + "items": { + "type": "string" + }, + "name": "teams", + "in": "body", + "rawType": "array", + "rawDescription": "The list of team `slug`s allowed to bypass pull request requirements.", + "childParamsGroups": [] + } + ] + } + ] + } + ] + }, + { + "parentName": "dismissal_restrictions", + "parentType": "object", + "id": "dismissal_restrictions-object", + "params": [ + { + "type": "array of strings", + "description": "

The list of user logins with dismissal access

", + "items": { + "type": "string" + }, + "name": "users", + "in": "body", + "rawType": "array", + "rawDescription": "The list of user `login`s with dismissal access", + "childParamsGroups": [] + }, + { + "type": "array of strings", + "description": "

The list of team slugs with dismissal access

", + "items": { + "type": "string" + }, + "name": "teams", + "in": "body", + "rawType": "array", + "rawDescription": "The list of team `slug`s with dismissal access", + "childParamsGroups": [] + } + ] + }, + { + "parentName": "bypass_pull_request_allowances", + "parentType": "object", + "id": "bypass_pull_request_allowances-object", + "params": [ + { + "type": "array of strings", + "description": "

The list of user logins allowed to bypass pull request requirements.

", + "items": { + "type": "string" + }, + "name": "users", + "in": "body", + "rawType": "array", + "rawDescription": "The list of user `login`s allowed to bypass pull request requirements.", + "childParamsGroups": [] + }, + { + "type": "array of strings", + "description": "

The list of team slugs allowed to bypass pull request requirements.

", + "items": { + "type": "string" + }, + "name": "teams", + "in": "body", + "rawType": "array", + "rawDescription": "The list of team `slug`s allowed to bypass pull request requirements.", + "childParamsGroups": [] + } + ] + } + ] }, { "type": "object or null", "description": "

Required. Restrict who can push to the protected branch. User, app, and team restrictions are only available for organization-owned repositories. Set to null to disable.

", "properties": { "users": { - "type": "array", - "description": "The list of user `login`s with push access", + "type": "array of strings", + "description": "

Required. The list of user logins with push access

", "items": { "type": "string" - } + }, + "name": "users", + "in": "body", + "rawType": "array", + "rawDescription": "The list of user `login`s with push access", + "childParamsGroups": [] }, "teams": { - "type": "array", - "description": "The list of team `slug`s with push access", + "type": "array of strings", + "description": "

Required. The list of team slugs with push access

", "items": { "type": "string" - } + }, + "name": "teams", + "in": "body", + "rawType": "array", + "rawDescription": "The list of team `slug`s with push access", + "childParamsGroups": [] }, "apps": { - "type": "array", - "description": "The list of app `slug`s with push access", + "type": "array of strings", + "description": "

The list of app slugs with push access

", "items": { "type": "string" - } + }, + "name": "apps", + "in": "body", + "rawType": "array", + "rawDescription": "The list of app `slug`s with push access", + "childParamsGroups": [] } }, "required": [ @@ -23271,7 +23793,51 @@ "null" ], "rawDescription": "Restrict who can push to the protected branch. User, app, and team `restrictions` are only available for organization-owned repositories. Set to `null` to disable.", - "childParamsGroups": [] + "childParamsGroups": [ + { + "parentName": "restrictions", + "parentType": "object", + "id": "restrictions-object", + "params": [ + { + "type": "array of strings", + "description": "

Required. The list of user logins with push access

", + "items": { + "type": "string" + }, + "name": "users", + "in": "body", + "rawType": "array", + "rawDescription": "The list of user `login`s with push access", + "childParamsGroups": [] + }, + { + "type": "array of strings", + "description": "

Required. The list of team slugs with push access

", + "items": { + "type": "string" + }, + "name": "teams", + "in": "body", + "rawType": "array", + "rawDescription": "The list of team `slug`s with push access", + "childParamsGroups": [] + }, + { + "type": "array of strings", + "description": "

The list of app slugs with push access

", + "items": { + "type": "string" + }, + "name": "apps", + "in": "body", + "rawType": "array", + "rawDescription": "The list of app `slug`s with push access", + "childParamsGroups": [] + } + ] + } + ] }, { "type": "boolean", @@ -45287,11 +45853,21 @@ "properties": { "protected_branches": { "type": "boolean", - "description": "Whether only branches with branch protection rules can deploy to this environment. If `protected_branches` is `true`, `custom_branch_policies` must be `false`; if `protected_branches` is `false`, `custom_branch_policies` must be `true`." + "description": "

Required. Whether only branches with branch protection rules can deploy to this environment. If protected_branches is true, custom_branch_policies must be false; if protected_branches is false, custom_branch_policies must be true.

", + "name": "protected_branches", + "in": "body", + "rawType": "boolean", + "rawDescription": "Whether only branches with branch protection rules can deploy to this environment. If `protected_branches` is `true`, `custom_branch_policies` must be `false`; if `protected_branches` is `false`, `custom_branch_policies` must be `true`.", + "childParamsGroups": [] }, "custom_branch_policies": { "type": "boolean", - "description": "Whether only branches that match the specified name patterns can deploy to this environment. If `custom_branch_policies` is `true`, `protected_branches` must be `false`; if `custom_branch_policies` is `false`, `protected_branches` must be `true`." + "description": "

Required. Whether only branches that match the specified name patterns can deploy to this environment. If custom_branch_policies is true, protected_branches must be false; if custom_branch_policies is false, protected_branches must be true.

", + "name": "custom_branch_policies", + "in": "body", + "rawType": "boolean", + "rawDescription": "Whether only branches that match the specified name patterns can deploy to this environment. If `custom_branch_policies` is `true`, `protected_branches` must be `false`; if `custom_branch_policies` is `false`, `protected_branches` must be `true`.", + "childParamsGroups": [] } }, "required": [ @@ -45305,7 +45881,33 @@ "null" ], "rawDescription": "The type of deployment branch policy for this environment. To allow all branches to deploy, set to `null`.", - "childParamsGroups": [] + "childParamsGroups": [ + { + "parentName": "deployment_branch_policy", + "parentType": "object", + "id": "deployment_branch_policy-object", + "params": [ + { + "type": "boolean", + "description": "

Required. Whether only branches with branch protection rules can deploy to this environment. If protected_branches is true, custom_branch_policies must be false; if protected_branches is false, custom_branch_policies must be true.

", + "name": "protected_branches", + "in": "body", + "rawType": "boolean", + "rawDescription": "Whether only branches with branch protection rules can deploy to this environment. If `protected_branches` is `true`, `custom_branch_policies` must be `false`; if `protected_branches` is `false`, `custom_branch_policies` must be `true`.", + "childParamsGroups": [] + }, + { + "type": "boolean", + "description": "

Required. Whether only branches that match the specified name patterns can deploy to this environment. If custom_branch_policies is true, protected_branches must be false; if custom_branch_policies is false, protected_branches must be true.

", + "name": "custom_branch_policies", + "in": "body", + "rawType": "boolean", + "rawDescription": "Whether only branches that match the specified name patterns can deploy to this environment. If `custom_branch_policies` is `true`, `protected_branches` must be `false`; if `custom_branch_policies` is `false`, `protected_branches` must be `true`.", + "childParamsGroups": [] + } + ] + } + ] } ], "enabledForGitHubApps": true, @@ -88527,33 +89129,114 @@ "properties": { "advanced_security": { "type": "object", - "description": "Use the `status` property to enable or disable GitHub Advanced Security for this repository. For more information, see \"[About GitHub Advanced Security](/github/getting-started-with-github/learning-about-github/about-github-advanced-security).\"", + "description": "

Use the status property to enable or disable GitHub Advanced Security for this repository. For more information, see \"About GitHub Advanced Security.\"

", "properties": { "status": { "type": "string", - "description": "Can be `enabled` or `disabled`." + "description": "

Can be enabled or disabled.

", + "name": "status", + "in": "body", + "rawType": "string", + "rawDescription": "Can be `enabled` or `disabled`.", + "childParamsGroups": [] } - } + }, + "name": "advanced_security", + "in": "body", + "rawType": "object", + "rawDescription": "Use the `status` property to enable or disable GitHub Advanced Security for this repository. For more information, see \"[About GitHub Advanced Security](/github/getting-started-with-github/learning-about-github/about-github-advanced-security).\"", + "childParamsGroups": [ + { + "parentName": "advanced_security", + "parentType": "object", + "id": "advanced_security-object", + "params": [ + { + "type": "string", + "description": "

Can be enabled or disabled.

", + "name": "status", + "in": "body", + "rawType": "string", + "rawDescription": "Can be `enabled` or `disabled`.", + "childParamsGroups": [] + } + ] + } + ] }, "secret_scanning": { "type": "object", - "description": "Use the `status` property to enable or disable secret scanning for this repository. For more information, see \"[About secret scanning](/code-security/secret-security/about-secret-scanning).\"", + "description": "

Use the status property to enable or disable secret scanning for this repository. For more information, see \"About secret scanning.\"

", "properties": { "status": { "type": "string", - "description": "Can be `enabled` or `disabled`." + "description": "

Can be enabled or disabled.

", + "name": "status", + "in": "body", + "rawType": "string", + "rawDescription": "Can be `enabled` or `disabled`.", + "childParamsGroups": [] } - } + }, + "name": "secret_scanning", + "in": "body", + "rawType": "object", + "rawDescription": "Use the `status` property to enable or disable secret scanning for this repository. For more information, see \"[About secret scanning](/code-security/secret-security/about-secret-scanning).\"", + "childParamsGroups": [ + { + "parentName": "secret_scanning", + "parentType": "object", + "id": "secret_scanning-object", + "params": [ + { + "type": "string", + "description": "

Can be enabled or disabled.

", + "name": "status", + "in": "body", + "rawType": "string", + "rawDescription": "Can be `enabled` or `disabled`.", + "childParamsGroups": [] + } + ] + } + ] }, "secret_scanning_push_protection": { "type": "object", - "description": "Use the `status` property to enable or disable secret scanning push protection for this repository. For more information, see \"[Protecting pushes with secret scanning](/enterprise-cloud@latest/code-security/secret-scanning/protecting-pushes-with-secret-scanning).\"", + "description": "

Use the status property to enable or disable secret scanning push protection for this repository. For more information, see \"Protecting pushes with secret scanning.\"

", "properties": { "status": { "type": "string", - "description": "Can be `enabled` or `disabled`." + "description": "

Can be enabled or disabled.

", + "name": "status", + "in": "body", + "rawType": "string", + "rawDescription": "Can be `enabled` or `disabled`.", + "childParamsGroups": [] } - } + }, + "name": "secret_scanning_push_protection", + "in": "body", + "rawType": "object", + "rawDescription": "Use the `status` property to enable or disable secret scanning push protection for this repository. For more information, see \"[Protecting pushes with secret scanning](/enterprise-cloud@latest/code-security/secret-scanning/protecting-pushes-with-secret-scanning).\"", + "childParamsGroups": [ + { + "parentName": "secret_scanning_push_protection", + "parentType": "object", + "id": "secret_scanning_push_protection-object", + "params": [ + { + "type": "string", + "description": "

Can be enabled or disabled.

", + "name": "status", + "in": "body", + "rawType": "string", + "rawDescription": "Can be `enabled` or `disabled`.", + "childParamsGroups": [] + } + ] + } + ] } }, "name": "security_and_analysis", @@ -88563,7 +89246,174 @@ "null" ], "rawDescription": "Specify which security and analysis features to enable or disable. For example, to enable GitHub Advanced Security, use this data in the body of the PATCH request: `{\"security_and_analysis\": {\"advanced_security\": {\"status\": \"enabled\"}}}`. If you have admin permissions for a private repository covered by an Advanced Security license, you can check which security and analysis features are currently enabled by using a `GET /repos/{owner}/{repo}` request.", - "childParamsGroups": [] + "childParamsGroups": [ + { + "parentName": "security_and_analysis", + "parentType": "object", + "id": "security_and_analysis-object", + "params": [ + { + "type": "object", + "description": "

Use the status property to enable or disable GitHub Advanced Security for this repository. For more information, see \"About GitHub Advanced Security.\"

", + "properties": { + "status": { + "type": "string", + "description": "

Can be enabled or disabled.

", + "name": "status", + "in": "body", + "rawType": "string", + "rawDescription": "Can be `enabled` or `disabled`.", + "childParamsGroups": [] + } + }, + "name": "advanced_security", + "in": "body", + "rawType": "object", + "rawDescription": "Use the `status` property to enable or disable GitHub Advanced Security for this repository. For more information, see \"[About GitHub Advanced Security](/github/getting-started-with-github/learning-about-github/about-github-advanced-security).\"", + "childParamsGroups": [ + { + "parentName": "advanced_security", + "parentType": "object", + "id": "advanced_security-object", + "params": [ + { + "type": "string", + "description": "

Can be enabled or disabled.

", + "name": "status", + "in": "body", + "rawType": "string", + "rawDescription": "Can be `enabled` or `disabled`.", + "childParamsGroups": [] + } + ] + } + ] + }, + { + "type": "object", + "description": "

Use the status property to enable or disable secret scanning for this repository. For more information, see \"About secret scanning.\"

", + "properties": { + "status": { + "type": "string", + "description": "

Can be enabled or disabled.

", + "name": "status", + "in": "body", + "rawType": "string", + "rawDescription": "Can be `enabled` or `disabled`.", + "childParamsGroups": [] + } + }, + "name": "secret_scanning", + "in": "body", + "rawType": "object", + "rawDescription": "Use the `status` property to enable or disable secret scanning for this repository. For more information, see \"[About secret scanning](/code-security/secret-security/about-secret-scanning).\"", + "childParamsGroups": [ + { + "parentName": "secret_scanning", + "parentType": "object", + "id": "secret_scanning-object", + "params": [ + { + "type": "string", + "description": "

Can be enabled or disabled.

", + "name": "status", + "in": "body", + "rawType": "string", + "rawDescription": "Can be `enabled` or `disabled`.", + "childParamsGroups": [] + } + ] + } + ] + }, + { + "type": "object", + "description": "

Use the status property to enable or disable secret scanning push protection for this repository. For more information, see \"Protecting pushes with secret scanning.\"

", + "properties": { + "status": { + "type": "string", + "description": "

Can be enabled or disabled.

", + "name": "status", + "in": "body", + "rawType": "string", + "rawDescription": "Can be `enabled` or `disabled`.", + "childParamsGroups": [] + } + }, + "name": "secret_scanning_push_protection", + "in": "body", + "rawType": "object", + "rawDescription": "Use the `status` property to enable or disable secret scanning push protection for this repository. For more information, see \"[Protecting pushes with secret scanning](/enterprise-cloud@latest/code-security/secret-scanning/protecting-pushes-with-secret-scanning).\"", + "childParamsGroups": [ + { + "parentName": "secret_scanning_push_protection", + "parentType": "object", + "id": "secret_scanning_push_protection-object", + "params": [ + { + "type": "string", + "description": "

Can be enabled or disabled.

", + "name": "status", + "in": "body", + "rawType": "string", + "rawDescription": "Can be `enabled` or `disabled`.", + "childParamsGroups": [] + } + ] + } + ] + } + ] + }, + { + "parentName": "advanced_security", + "parentType": "object", + "id": "advanced_security-object", + "params": [ + { + "type": "string", + "description": "

Can be enabled or disabled.

", + "name": "status", + "in": "body", + "rawType": "string", + "rawDescription": "Can be `enabled` or `disabled`.", + "childParamsGroups": [] + } + ] + }, + { + "parentName": "secret_scanning", + "parentType": "object", + "id": "secret_scanning-object", + "params": [ + { + "type": "string", + "description": "

Can be enabled or disabled.

", + "name": "status", + "in": "body", + "rawType": "string", + "rawDescription": "Can be `enabled` or `disabled`.", + "childParamsGroups": [] + } + ] + }, + { + "parentName": "secret_scanning_push_protection", + "parentType": "object", + "id": "secret_scanning_push_protection-object", + "params": [ + { + "type": "string", + "description": "

Can be enabled or disabled.

", + "name": "status", + "in": "body", + "rawType": "string", + "rawDescription": "Can be `enabled` or `disabled`.", + "childParamsGroups": [] + } + ] + } + ] }, { "type": "boolean", diff --git a/lib/rest/static/decorated/ghes-3.1.json b/lib/rest/static/decorated/ghes-3.1.json index bbdb35058f..7d062ced20 100644 --- a/lib/rest/static/decorated/ghes-3.1.json +++ b/lib/rest/static/decorated/ghes-3.1.json @@ -17838,19 +17838,29 @@ "properties": { "strict": { "type": "boolean", - "description": "Require branches to be up to date before merging." + "description": "

Required. Require branches to be up to date before merging.

", + "name": "strict", + "in": "body", + "rawType": "boolean", + "rawDescription": "Require branches to be up to date before merging.", + "childParamsGroups": [] }, "contexts": { - "type": "array", + "type": "array of strings", "deprecated": true, - "description": "**Deprecated**: 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.\n", + "description": "

Required. Deprecated: 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.

", "items": { "type": "string" - } + }, + "name": "contexts", + "in": "body", + "rawType": "array", + "rawDescription": "**Deprecated**: 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.\n", + "childParamsGroups": [] }, "checks": { - "type": "array", - "description": "The list of status checks to require in order to merge into this branch.", + "type": "array of objects", + "description": "

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

", "items": { "type": "object", "required": [ @@ -17859,14 +17869,55 @@ "properties": { "context": { "type": "string", - "description": "The name of the required check" + "description": "

Required. The name of the required check

", + "name": "context", + "in": "body", + "rawType": "string", + "rawDescription": "The name of the required check", + "childParamsGroups": [] }, "app_id": { "type": "integer", - "description": "The ID of the GitHub App that must provide this check. Omit this field to automatically select the GitHub App that has recently provided this check, or any app if it was not set by a GitHub App. Pass -1 to explicitly allow any app to set the status." + "description": "

The ID of the GitHub App that must provide this check. Omit this field to automatically select the GitHub App that has recently provided this check, or any app if it was not set by a GitHub App. Pass -1 to explicitly allow any app to set the status.

", + "name": "app_id", + "in": "body", + "rawType": "integer", + "rawDescription": "The ID of the GitHub App that must provide this check. Omit this field to automatically select the GitHub App that has recently provided this check, or any app if it was not set by a GitHub App. Pass -1 to explicitly allow any app to set the status.", + "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": "

Required. The name of the required check

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

The ID of the GitHub App that must provide this check. Omit this field to automatically select the GitHub App that has recently provided this check, or any app if it was not set by a GitHub App. Pass -1 to explicitly allow any app to set the status.

", + "name": "app_id", + "in": "body", + "rawType": "integer", + "rawDescription": "The ID of the GitHub App that must provide this check. Omit this field to automatically select the GitHub App that has recently provided this check, or any app if it was not set by a GitHub App. Pass -1 to explicitly allow any app to set the status.", + "childParamsGroups": [] + } + ] + } + ] } }, "required": [ @@ -17880,7 +17931,123 @@ "null" ], "rawDescription": "Require status checks to pass before merging. Set to `null` to disable.", - "childParamsGroups": [] + "childParamsGroups": [ + { + "parentName": "required_status_checks", + "parentType": "object", + "id": "required_status_checks-object", + "params": [ + { + "type": "boolean", + "description": "

Required. Require branches to be up to date before merging.

", + "name": "strict", + "in": "body", + "rawType": "boolean", + "rawDescription": "Require branches to be up to date before merging.", + "childParamsGroups": [] + }, + { + "type": "array of strings", + "deprecated": true, + "description": "

Required. Deprecated: 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.

", + "items": { + "type": "string" + }, + "name": "contexts", + "in": "body", + "rawType": "array", + "rawDescription": "**Deprecated**: 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.\n", + "childParamsGroups": [] + }, + { + "type": "array of objects", + "description": "

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

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

Required. The name of the required check

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

The ID of the GitHub App that must provide this check. Omit this field to automatically select the GitHub App that has recently provided this check, or any app if it was not set by a GitHub App. Pass -1 to explicitly allow any app to set the status.

", + "name": "app_id", + "in": "body", + "rawType": "integer", + "rawDescription": "The ID of the GitHub App that must provide this check. Omit this field to automatically select the GitHub App that has recently provided this check, or any app if it was not set by a GitHub App. Pass -1 to explicitly allow any app to set the status.", + "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": "

Required. The name of the required check

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

The ID of the GitHub App that must provide this check. Omit this field to automatically select the GitHub App that has recently provided this check, or any app if it was not set by a GitHub App. Pass -1 to explicitly allow any app to set the status.

", + "name": "app_id", + "in": "body", + "rawType": "integer", + "rawDescription": "The ID of the GitHub App that must provide this check. Omit this field to automatically select the GitHub App that has recently provided this check, or any app if it was not set by a GitHub App. Pass -1 to explicitly allow any app to set the status.", + "childParamsGroups": [] + } + ] + } + ] + } + ] + }, + { + "parentName": "checks", + "parentType": "items", + "id": "checks-items", + "params": [ + { + "type": "string", + "description": "

Required. The name of the required check

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

The ID of the GitHub App that must provide this check. Omit this field to automatically select the GitHub App that has recently provided this check, or any app if it was not set by a GitHub App. Pass -1 to explicitly allow any app to set the status.

", + "name": "app_id", + "in": "body", + "rawType": "integer", + "rawDescription": "The ID of the GitHub App that must provide this check. Omit this field to automatically select the GitHub App that has recently provided this check, or any app if it was not set by a GitHub App. Pass -1 to explicitly allow any app to set the status.", + "childParamsGroups": [] + } + ] + } + ] }, { "type": "boolean or null", @@ -17900,35 +18067,97 @@ "properties": { "dismissal_restrictions": { "type": "object", - "description": "Specify which users and teams can dismiss pull request reviews. Pass an empty `dismissal_restrictions` object to disable. User and team `dismissal_restrictions` are only available for organization-owned repositories. Omit this parameter for personal repositories.", + "description": "

Specify which users and teams can dismiss pull request reviews. Pass an empty dismissal_restrictions object to disable. User and team dismissal_restrictions are only available for organization-owned repositories. Omit this parameter for personal repositories.

", "properties": { "users": { - "type": "array", - "description": "The list of user `login`s with dismissal access", + "type": "array of strings", + "description": "

The list of user logins with dismissal access

", "items": { "type": "string" - } + }, + "name": "users", + "in": "body", + "rawType": "array", + "rawDescription": "The list of user `login`s with dismissal access", + "childParamsGroups": [] }, "teams": { - "type": "array", - "description": "The list of team `slug`s with dismissal access", + "type": "array of strings", + "description": "

The list of team slugs with dismissal access

", "items": { "type": "string" - } + }, + "name": "teams", + "in": "body", + "rawType": "array", + "rawDescription": "The list of team `slug`s with dismissal access", + "childParamsGroups": [] } - } + }, + "name": "dismissal_restrictions", + "in": "body", + "rawType": "object", + "rawDescription": "Specify which users and teams can dismiss pull request reviews. Pass an empty `dismissal_restrictions` object to disable. User and team `dismissal_restrictions` are only available for organization-owned repositories. Omit this parameter for personal repositories.", + "childParamsGroups": [ + { + "parentName": "dismissal_restrictions", + "parentType": "object", + "id": "dismissal_restrictions-object", + "params": [ + { + "type": "array of strings", + "description": "

The list of user logins with dismissal access

", + "items": { + "type": "string" + }, + "name": "users", + "in": "body", + "rawType": "array", + "rawDescription": "The list of user `login`s with dismissal access", + "childParamsGroups": [] + }, + { + "type": "array of strings", + "description": "

The list of team slugs with dismissal access

", + "items": { + "type": "string" + }, + "name": "teams", + "in": "body", + "rawType": "array", + "rawDescription": "The list of team `slug`s with dismissal access", + "childParamsGroups": [] + } + ] + } + ] }, "dismiss_stale_reviews": { "type": "boolean", - "description": "Set to `true` if you want to automatically dismiss approving reviews when someone pushes a new commit." + "description": "

Set to true if you want to automatically dismiss approving reviews when someone pushes a new commit.

", + "name": "dismiss_stale_reviews", + "in": "body", + "rawType": "boolean", + "rawDescription": "Set to `true` if you want to automatically dismiss approving reviews when someone pushes a new commit.", + "childParamsGroups": [] }, "require_code_owner_reviews": { "type": "boolean", - "description": "Blocks merging pull requests until [code owners](https://docs.github.com/articles/about-code-owners/) review them." + "description": "

Blocks merging pull requests until code owners review them.

", + "name": "require_code_owner_reviews", + "in": "body", + "rawType": "boolean", + "rawDescription": "Blocks merging pull requests until [code owners](https://docs.github.com/articles/about-code-owners/) review them.", + "childParamsGroups": [] }, "required_approving_review_count": { "type": "integer", - "description": "Specify the number of reviewers required to approve pull requests. Use a number between 1 and 6." + "description": "

Specify the number of reviewers required to approve pull requests. Use a number between 1 and 6.

", + "name": "required_approving_review_count", + "in": "body", + "rawType": "integer", + "rawDescription": "Specify the number of reviewers required to approve pull requests. Use a number between 1 and 6.", + "childParamsGroups": [] } }, "name": "required_pull_request_reviews", @@ -17938,32 +18167,180 @@ "null" ], "rawDescription": "Require at least one approving review on a pull request, before merging. Set to `null` to disable.", - "childParamsGroups": [] + "childParamsGroups": [ + { + "parentName": "required_pull_request_reviews", + "parentType": "object", + "id": "required_pull_request_reviews-object", + "params": [ + { + "type": "object", + "description": "

Specify which users and teams can dismiss pull request reviews. Pass an empty dismissal_restrictions object to disable. User and team dismissal_restrictions are only available for organization-owned repositories. Omit this parameter for personal repositories.

", + "properties": { + "users": { + "type": "array of strings", + "description": "

The list of user logins with dismissal access

", + "items": { + "type": "string" + }, + "name": "users", + "in": "body", + "rawType": "array", + "rawDescription": "The list of user `login`s with dismissal access", + "childParamsGroups": [] + }, + "teams": { + "type": "array of strings", + "description": "

The list of team slugs with dismissal access

", + "items": { + "type": "string" + }, + "name": "teams", + "in": "body", + "rawType": "array", + "rawDescription": "The list of team `slug`s with dismissal access", + "childParamsGroups": [] + } + }, + "name": "dismissal_restrictions", + "in": "body", + "rawType": "object", + "rawDescription": "Specify which users and teams can dismiss pull request reviews. Pass an empty `dismissal_restrictions` object to disable. User and team `dismissal_restrictions` are only available for organization-owned repositories. Omit this parameter for personal repositories.", + "childParamsGroups": [ + { + "parentName": "dismissal_restrictions", + "parentType": "object", + "id": "dismissal_restrictions-object", + "params": [ + { + "type": "array of strings", + "description": "

The list of user logins with dismissal access

", + "items": { + "type": "string" + }, + "name": "users", + "in": "body", + "rawType": "array", + "rawDescription": "The list of user `login`s with dismissal access", + "childParamsGroups": [] + }, + { + "type": "array of strings", + "description": "

The list of team slugs with dismissal access

", + "items": { + "type": "string" + }, + "name": "teams", + "in": "body", + "rawType": "array", + "rawDescription": "The list of team `slug`s with dismissal access", + "childParamsGroups": [] + } + ] + } + ] + }, + { + "type": "boolean", + "description": "

Set to true if you want to automatically dismiss approving reviews when someone pushes a new commit.

", + "name": "dismiss_stale_reviews", + "in": "body", + "rawType": "boolean", + "rawDescription": "Set to `true` if you want to automatically dismiss approving reviews when someone pushes a new commit.", + "childParamsGroups": [] + }, + { + "type": "boolean", + "description": "

Blocks merging pull requests until code owners review them.

", + "name": "require_code_owner_reviews", + "in": "body", + "rawType": "boolean", + "rawDescription": "Blocks merging pull requests until [code owners](https://docs.github.com/articles/about-code-owners/) review them.", + "childParamsGroups": [] + }, + { + "type": "integer", + "description": "

Specify the number of reviewers required to approve pull requests. Use a number between 1 and 6.

", + "name": "required_approving_review_count", + "in": "body", + "rawType": "integer", + "rawDescription": "Specify the number of reviewers required to approve pull requests. Use a number between 1 and 6.", + "childParamsGroups": [] + } + ] + }, + { + "parentName": "dismissal_restrictions", + "parentType": "object", + "id": "dismissal_restrictions-object", + "params": [ + { + "type": "array of strings", + "description": "

The list of user logins with dismissal access

", + "items": { + "type": "string" + }, + "name": "users", + "in": "body", + "rawType": "array", + "rawDescription": "The list of user `login`s with dismissal access", + "childParamsGroups": [] + }, + { + "type": "array of strings", + "description": "

The list of team slugs with dismissal access

", + "items": { + "type": "string" + }, + "name": "teams", + "in": "body", + "rawType": "array", + "rawDescription": "The list of team `slug`s with dismissal access", + "childParamsGroups": [] + } + ] + } + ] }, { "type": "object or null", "description": "

Required. Restrict who can push to the protected branch. User, app, and team restrictions are only available for organization-owned repositories. Set to null to disable.

", "properties": { "users": { - "type": "array", - "description": "The list of user `login`s with push access", + "type": "array of strings", + "description": "

Required. The list of user logins with push access

", "items": { "type": "string" - } + }, + "name": "users", + "in": "body", + "rawType": "array", + "rawDescription": "The list of user `login`s with push access", + "childParamsGroups": [] }, "teams": { - "type": "array", - "description": "The list of team `slug`s with push access", + "type": "array of strings", + "description": "

Required. The list of team slugs with push access

", "items": { "type": "string" - } + }, + "name": "teams", + "in": "body", + "rawType": "array", + "rawDescription": "The list of team `slug`s with push access", + "childParamsGroups": [] }, "apps": { - "type": "array", - "description": "The list of app `slug`s with push access", + "type": "array of strings", + "description": "

The list of app slugs with push access

", "items": { "type": "string" - } + }, + "name": "apps", + "in": "body", + "rawType": "array", + "rawDescription": "The list of app `slug`s with push access", + "childParamsGroups": [] } }, "required": [ @@ -17977,7 +18354,51 @@ "null" ], "rawDescription": "Restrict who can push to the protected branch. User, app, and team `restrictions` are only available for organization-owned repositories. Set to `null` to disable.", - "childParamsGroups": [] + "childParamsGroups": [ + { + "parentName": "restrictions", + "parentType": "object", + "id": "restrictions-object", + "params": [ + { + "type": "array of strings", + "description": "

Required. The list of user logins with push access

", + "items": { + "type": "string" + }, + "name": "users", + "in": "body", + "rawType": "array", + "rawDescription": "The list of user `login`s with push access", + "childParamsGroups": [] + }, + { + "type": "array of strings", + "description": "

Required. The list of team slugs with push access

", + "items": { + "type": "string" + }, + "name": "teams", + "in": "body", + "rawType": "array", + "rawDescription": "The list of team `slug`s with push access", + "childParamsGroups": [] + }, + { + "type": "array of strings", + "description": "

The list of app slugs with push access

", + "items": { + "type": "string" + }, + "name": "apps", + "in": "body", + "rawType": "array", + "rawDescription": "The list of app `slug`s with push access", + "childParamsGroups": [] + } + ] + } + ] }, { "type": "boolean", diff --git a/lib/rest/static/decorated/ghes-3.2.json b/lib/rest/static/decorated/ghes-3.2.json index a6fb2cea13..877c18f946 100644 --- a/lib/rest/static/decorated/ghes-3.2.json +++ b/lib/rest/static/decorated/ghes-3.2.json @@ -18894,19 +18894,29 @@ "properties": { "strict": { "type": "boolean", - "description": "Require branches to be up to date before merging." + "description": "

Required. Require branches to be up to date before merging.

", + "name": "strict", + "in": "body", + "rawType": "boolean", + "rawDescription": "Require branches to be up to date before merging.", + "childParamsGroups": [] }, "contexts": { - "type": "array", + "type": "array of strings", "deprecated": true, - "description": "**Deprecated**: 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.\n", + "description": "

Required. Deprecated: 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.

", "items": { "type": "string" - } + }, + "name": "contexts", + "in": "body", + "rawType": "array", + "rawDescription": "**Deprecated**: 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.\n", + "childParamsGroups": [] }, "checks": { - "type": "array", - "description": "The list of status checks to require in order to merge into this branch.", + "type": "array of objects", + "description": "

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

", "items": { "type": "object", "required": [ @@ -18915,14 +18925,55 @@ "properties": { "context": { "type": "string", - "description": "The name of the required check" + "description": "

Required. The name of the required check

", + "name": "context", + "in": "body", + "rawType": "string", + "rawDescription": "The name of the required check", + "childParamsGroups": [] }, "app_id": { "type": "integer", - "description": "The ID of the GitHub App that must provide this check. Omit this field to automatically select the GitHub App that has recently provided this check, or any app if it was not set by a GitHub App. Pass -1 to explicitly allow any app to set the status." + "description": "

The ID of the GitHub App that must provide this check. Omit this field to automatically select the GitHub App that has recently provided this check, or any app if it was not set by a GitHub App. Pass -1 to explicitly allow any app to set the status.

", + "name": "app_id", + "in": "body", + "rawType": "integer", + "rawDescription": "The ID of the GitHub App that must provide this check. Omit this field to automatically select the GitHub App that has recently provided this check, or any app if it was not set by a GitHub App. Pass -1 to explicitly allow any app to set the status.", + "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": "

Required. The name of the required check

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

The ID of the GitHub App that must provide this check. Omit this field to automatically select the GitHub App that has recently provided this check, or any app if it was not set by a GitHub App. Pass -1 to explicitly allow any app to set the status.

", + "name": "app_id", + "in": "body", + "rawType": "integer", + "rawDescription": "The ID of the GitHub App that must provide this check. Omit this field to automatically select the GitHub App that has recently provided this check, or any app if it was not set by a GitHub App. Pass -1 to explicitly allow any app to set the status.", + "childParamsGroups": [] + } + ] + } + ] } }, "required": [ @@ -18936,7 +18987,123 @@ "null" ], "rawDescription": "Require status checks to pass before merging. Set to `null` to disable.", - "childParamsGroups": [] + "childParamsGroups": [ + { + "parentName": "required_status_checks", + "parentType": "object", + "id": "required_status_checks-object", + "params": [ + { + "type": "boolean", + "description": "

Required. Require branches to be up to date before merging.

", + "name": "strict", + "in": "body", + "rawType": "boolean", + "rawDescription": "Require branches to be up to date before merging.", + "childParamsGroups": [] + }, + { + "type": "array of strings", + "deprecated": true, + "description": "

Required. Deprecated: 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.

", + "items": { + "type": "string" + }, + "name": "contexts", + "in": "body", + "rawType": "array", + "rawDescription": "**Deprecated**: 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.\n", + "childParamsGroups": [] + }, + { + "type": "array of objects", + "description": "

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

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

Required. The name of the required check

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

The ID of the GitHub App that must provide this check. Omit this field to automatically select the GitHub App that has recently provided this check, or any app if it was not set by a GitHub App. Pass -1 to explicitly allow any app to set the status.

", + "name": "app_id", + "in": "body", + "rawType": "integer", + "rawDescription": "The ID of the GitHub App that must provide this check. Omit this field to automatically select the GitHub App that has recently provided this check, or any app if it was not set by a GitHub App. Pass -1 to explicitly allow any app to set the status.", + "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": "

Required. The name of the required check

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

The ID of the GitHub App that must provide this check. Omit this field to automatically select the GitHub App that has recently provided this check, or any app if it was not set by a GitHub App. Pass -1 to explicitly allow any app to set the status.

", + "name": "app_id", + "in": "body", + "rawType": "integer", + "rawDescription": "The ID of the GitHub App that must provide this check. Omit this field to automatically select the GitHub App that has recently provided this check, or any app if it was not set by a GitHub App. Pass -1 to explicitly allow any app to set the status.", + "childParamsGroups": [] + } + ] + } + ] + } + ] + }, + { + "parentName": "checks", + "parentType": "items", + "id": "checks-items", + "params": [ + { + "type": "string", + "description": "

Required. The name of the required check

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

The ID of the GitHub App that must provide this check. Omit this field to automatically select the GitHub App that has recently provided this check, or any app if it was not set by a GitHub App. Pass -1 to explicitly allow any app to set the status.

", + "name": "app_id", + "in": "body", + "rawType": "integer", + "rawDescription": "The ID of the GitHub App that must provide this check. Omit this field to automatically select the GitHub App that has recently provided this check, or any app if it was not set by a GitHub App. Pass -1 to explicitly allow any app to set the status.", + "childParamsGroups": [] + } + ] + } + ] }, { "type": "boolean or null", @@ -18956,35 +19123,97 @@ "properties": { "dismissal_restrictions": { "type": "object", - "description": "Specify which users and teams can dismiss pull request reviews. Pass an empty `dismissal_restrictions` object to disable. User and team `dismissal_restrictions` are only available for organization-owned repositories. Omit this parameter for personal repositories.", + "description": "

Specify which users and teams can dismiss pull request reviews. Pass an empty dismissal_restrictions object to disable. User and team dismissal_restrictions are only available for organization-owned repositories. Omit this parameter for personal repositories.

", "properties": { "users": { - "type": "array", - "description": "The list of user `login`s with dismissal access", + "type": "array of strings", + "description": "

The list of user logins with dismissal access

", "items": { "type": "string" - } + }, + "name": "users", + "in": "body", + "rawType": "array", + "rawDescription": "The list of user `login`s with dismissal access", + "childParamsGroups": [] }, "teams": { - "type": "array", - "description": "The list of team `slug`s with dismissal access", + "type": "array of strings", + "description": "

The list of team slugs with dismissal access

", "items": { "type": "string" - } + }, + "name": "teams", + "in": "body", + "rawType": "array", + "rawDescription": "The list of team `slug`s with dismissal access", + "childParamsGroups": [] } - } + }, + "name": "dismissal_restrictions", + "in": "body", + "rawType": "object", + "rawDescription": "Specify which users and teams can dismiss pull request reviews. Pass an empty `dismissal_restrictions` object to disable. User and team `dismissal_restrictions` are only available for organization-owned repositories. Omit this parameter for personal repositories.", + "childParamsGroups": [ + { + "parentName": "dismissal_restrictions", + "parentType": "object", + "id": "dismissal_restrictions-object", + "params": [ + { + "type": "array of strings", + "description": "

The list of user logins with dismissal access

", + "items": { + "type": "string" + }, + "name": "users", + "in": "body", + "rawType": "array", + "rawDescription": "The list of user `login`s with dismissal access", + "childParamsGroups": [] + }, + { + "type": "array of strings", + "description": "

The list of team slugs with dismissal access

", + "items": { + "type": "string" + }, + "name": "teams", + "in": "body", + "rawType": "array", + "rawDescription": "The list of team `slug`s with dismissal access", + "childParamsGroups": [] + } + ] + } + ] }, "dismiss_stale_reviews": { "type": "boolean", - "description": "Set to `true` if you want to automatically dismiss approving reviews when someone pushes a new commit." + "description": "

Set to true if you want to automatically dismiss approving reviews when someone pushes a new commit.

", + "name": "dismiss_stale_reviews", + "in": "body", + "rawType": "boolean", + "rawDescription": "Set to `true` if you want to automatically dismiss approving reviews when someone pushes a new commit.", + "childParamsGroups": [] }, "require_code_owner_reviews": { "type": "boolean", - "description": "Blocks merging pull requests until [code owners](https://docs.github.com/articles/about-code-owners/) review them." + "description": "

Blocks merging pull requests until code owners review them.

", + "name": "require_code_owner_reviews", + "in": "body", + "rawType": "boolean", + "rawDescription": "Blocks merging pull requests until [code owners](https://docs.github.com/articles/about-code-owners/) review them.", + "childParamsGroups": [] }, "required_approving_review_count": { "type": "integer", - "description": "Specify the number of reviewers required to approve pull requests. Use a number between 1 and 6." + "description": "

Specify the number of reviewers required to approve pull requests. Use a number between 1 and 6.

", + "name": "required_approving_review_count", + "in": "body", + "rawType": "integer", + "rawDescription": "Specify the number of reviewers required to approve pull requests. Use a number between 1 and 6.", + "childParamsGroups": [] } }, "name": "required_pull_request_reviews", @@ -18994,32 +19223,180 @@ "null" ], "rawDescription": "Require at least one approving review on a pull request, before merging. Set to `null` to disable.", - "childParamsGroups": [] + "childParamsGroups": [ + { + "parentName": "required_pull_request_reviews", + "parentType": "object", + "id": "required_pull_request_reviews-object", + "params": [ + { + "type": "object", + "description": "

Specify which users and teams can dismiss pull request reviews. Pass an empty dismissal_restrictions object to disable. User and team dismissal_restrictions are only available for organization-owned repositories. Omit this parameter for personal repositories.

", + "properties": { + "users": { + "type": "array of strings", + "description": "

The list of user logins with dismissal access

", + "items": { + "type": "string" + }, + "name": "users", + "in": "body", + "rawType": "array", + "rawDescription": "The list of user `login`s with dismissal access", + "childParamsGroups": [] + }, + "teams": { + "type": "array of strings", + "description": "

The list of team slugs with dismissal access

", + "items": { + "type": "string" + }, + "name": "teams", + "in": "body", + "rawType": "array", + "rawDescription": "The list of team `slug`s with dismissal access", + "childParamsGroups": [] + } + }, + "name": "dismissal_restrictions", + "in": "body", + "rawType": "object", + "rawDescription": "Specify which users and teams can dismiss pull request reviews. Pass an empty `dismissal_restrictions` object to disable. User and team `dismissal_restrictions` are only available for organization-owned repositories. Omit this parameter for personal repositories.", + "childParamsGroups": [ + { + "parentName": "dismissal_restrictions", + "parentType": "object", + "id": "dismissal_restrictions-object", + "params": [ + { + "type": "array of strings", + "description": "

The list of user logins with dismissal access

", + "items": { + "type": "string" + }, + "name": "users", + "in": "body", + "rawType": "array", + "rawDescription": "The list of user `login`s with dismissal access", + "childParamsGroups": [] + }, + { + "type": "array of strings", + "description": "

The list of team slugs with dismissal access

", + "items": { + "type": "string" + }, + "name": "teams", + "in": "body", + "rawType": "array", + "rawDescription": "The list of team `slug`s with dismissal access", + "childParamsGroups": [] + } + ] + } + ] + }, + { + "type": "boolean", + "description": "

Set to true if you want to automatically dismiss approving reviews when someone pushes a new commit.

", + "name": "dismiss_stale_reviews", + "in": "body", + "rawType": "boolean", + "rawDescription": "Set to `true` if you want to automatically dismiss approving reviews when someone pushes a new commit.", + "childParamsGroups": [] + }, + { + "type": "boolean", + "description": "

Blocks merging pull requests until code owners review them.

", + "name": "require_code_owner_reviews", + "in": "body", + "rawType": "boolean", + "rawDescription": "Blocks merging pull requests until [code owners](https://docs.github.com/articles/about-code-owners/) review them.", + "childParamsGroups": [] + }, + { + "type": "integer", + "description": "

Specify the number of reviewers required to approve pull requests. Use a number between 1 and 6.

", + "name": "required_approving_review_count", + "in": "body", + "rawType": "integer", + "rawDescription": "Specify the number of reviewers required to approve pull requests. Use a number between 1 and 6.", + "childParamsGroups": [] + } + ] + }, + { + "parentName": "dismissal_restrictions", + "parentType": "object", + "id": "dismissal_restrictions-object", + "params": [ + { + "type": "array of strings", + "description": "

The list of user logins with dismissal access

", + "items": { + "type": "string" + }, + "name": "users", + "in": "body", + "rawType": "array", + "rawDescription": "The list of user `login`s with dismissal access", + "childParamsGroups": [] + }, + { + "type": "array of strings", + "description": "

The list of team slugs with dismissal access

", + "items": { + "type": "string" + }, + "name": "teams", + "in": "body", + "rawType": "array", + "rawDescription": "The list of team `slug`s with dismissal access", + "childParamsGroups": [] + } + ] + } + ] }, { "type": "object or null", "description": "

Required. Restrict who can push to the protected branch. User, app, and team restrictions are only available for organization-owned repositories. Set to null to disable.

", "properties": { "users": { - "type": "array", - "description": "The list of user `login`s with push access", + "type": "array of strings", + "description": "

Required. The list of user logins with push access

", "items": { "type": "string" - } + }, + "name": "users", + "in": "body", + "rawType": "array", + "rawDescription": "The list of user `login`s with push access", + "childParamsGroups": [] }, "teams": { - "type": "array", - "description": "The list of team `slug`s with push access", + "type": "array of strings", + "description": "

Required. The list of team slugs with push access

", "items": { "type": "string" - } + }, + "name": "teams", + "in": "body", + "rawType": "array", + "rawDescription": "The list of team `slug`s with push access", + "childParamsGroups": [] }, "apps": { - "type": "array", - "description": "The list of app `slug`s with push access", + "type": "array of strings", + "description": "

The list of app slugs with push access

", "items": { "type": "string" - } + }, + "name": "apps", + "in": "body", + "rawType": "array", + "rawDescription": "The list of app `slug`s with push access", + "childParamsGroups": [] } }, "required": [ @@ -19033,7 +19410,51 @@ "null" ], "rawDescription": "Restrict who can push to the protected branch. User, app, and team `restrictions` are only available for organization-owned repositories. Set to `null` to disable.", - "childParamsGroups": [] + "childParamsGroups": [ + { + "parentName": "restrictions", + "parentType": "object", + "id": "restrictions-object", + "params": [ + { + "type": "array of strings", + "description": "

Required. The list of user logins with push access

", + "items": { + "type": "string" + }, + "name": "users", + "in": "body", + "rawType": "array", + "rawDescription": "The list of user `login`s with push access", + "childParamsGroups": [] + }, + { + "type": "array of strings", + "description": "

Required. The list of team slugs with push access

", + "items": { + "type": "string" + }, + "name": "teams", + "in": "body", + "rawType": "array", + "rawDescription": "The list of team `slug`s with push access", + "childParamsGroups": [] + }, + { + "type": "array of strings", + "description": "

The list of app slugs with push access

", + "items": { + "type": "string" + }, + "name": "apps", + "in": "body", + "rawType": "array", + "rawDescription": "The list of app `slug`s with push access", + "childParamsGroups": [] + } + ] + } + ] }, { "type": "boolean", @@ -33806,11 +34227,21 @@ "properties": { "protected_branches": { "type": "boolean", - "description": "Whether only branches with branch protection rules can deploy to this environment. If `protected_branches` is `true`, `custom_branch_policies` must be `false`; if `protected_branches` is `false`, `custom_branch_policies` must be `true`." + "description": "

Required. Whether only branches with branch protection rules can deploy to this environment. If protected_branches is true, custom_branch_policies must be false; if protected_branches is false, custom_branch_policies must be true.

", + "name": "protected_branches", + "in": "body", + "rawType": "boolean", + "rawDescription": "Whether only branches with branch protection rules can deploy to this environment. If `protected_branches` is `true`, `custom_branch_policies` must be `false`; if `protected_branches` is `false`, `custom_branch_policies` must be `true`.", + "childParamsGroups": [] }, "custom_branch_policies": { "type": "boolean", - "description": "Whether only branches that match the specified name patterns can deploy to this environment. If `custom_branch_policies` is `true`, `protected_branches` must be `false`; if `custom_branch_policies` is `false`, `protected_branches` must be `true`." + "description": "

Required. Whether only branches that match the specified name patterns can deploy to this environment. If custom_branch_policies is true, protected_branches must be false; if custom_branch_policies is false, protected_branches must be true.

", + "name": "custom_branch_policies", + "in": "body", + "rawType": "boolean", + "rawDescription": "Whether only branches that match the specified name patterns can deploy to this environment. If `custom_branch_policies` is `true`, `protected_branches` must be `false`; if `custom_branch_policies` is `false`, `protected_branches` must be `true`.", + "childParamsGroups": [] } }, "required": [ @@ -33824,7 +34255,33 @@ "null" ], "rawDescription": "The type of deployment branch policy for this environment. To allow all branches to deploy, set to `null`.", - "childParamsGroups": [] + "childParamsGroups": [ + { + "parentName": "deployment_branch_policy", + "parentType": "object", + "id": "deployment_branch_policy-object", + "params": [ + { + "type": "boolean", + "description": "

Required. Whether only branches with branch protection rules can deploy to this environment. If protected_branches is true, custom_branch_policies must be false; if protected_branches is false, custom_branch_policies must be true.

", + "name": "protected_branches", + "in": "body", + "rawType": "boolean", + "rawDescription": "Whether only branches with branch protection rules can deploy to this environment. If `protected_branches` is `true`, `custom_branch_policies` must be `false`; if `protected_branches` is `false`, `custom_branch_policies` must be `true`.", + "childParamsGroups": [] + }, + { + "type": "boolean", + "description": "

Required. Whether only branches that match the specified name patterns can deploy to this environment. If custom_branch_policies is true, protected_branches must be false; if custom_branch_policies is false, protected_branches must be true.

", + "name": "custom_branch_policies", + "in": "body", + "rawType": "boolean", + "rawDescription": "Whether only branches that match the specified name patterns can deploy to this environment. If `custom_branch_policies` is `true`, `protected_branches` must be `false`; if `custom_branch_policies` is `false`, `protected_branches` must be `true`.", + "childParamsGroups": [] + } + ] + } + ] } ], "enabledForGitHubApps": true, @@ -72170,33 +72627,114 @@ "properties": { "advanced_security": { "type": "object", - "description": "Use the `status` property to enable or disable GitHub Advanced Security for this repository. For more information, see \"[About GitHub Advanced Security](/github/getting-started-with-github/learning-about-github/about-github-advanced-security).\"", + "description": "

Use the status property to enable or disable GitHub Advanced Security for this repository. For more information, see \"About GitHub Advanced Security.\"

", "properties": { "status": { "type": "string", - "description": "Can be `enabled` or `disabled`." + "description": "

Can be enabled or disabled.

", + "name": "status", + "in": "body", + "rawType": "string", + "rawDescription": "Can be `enabled` or `disabled`.", + "childParamsGroups": [] } - } + }, + "name": "advanced_security", + "in": "body", + "rawType": "object", + "rawDescription": "Use the `status` property to enable or disable GitHub Advanced Security for this repository. For more information, see \"[About GitHub Advanced Security](/github/getting-started-with-github/learning-about-github/about-github-advanced-security).\"", + "childParamsGroups": [ + { + "parentName": "advanced_security", + "parentType": "object", + "id": "advanced_security-object", + "params": [ + { + "type": "string", + "description": "

Can be enabled or disabled.

", + "name": "status", + "in": "body", + "rawType": "string", + "rawDescription": "Can be `enabled` or `disabled`.", + "childParamsGroups": [] + } + ] + } + ] }, "secret_scanning": { "type": "object", - "description": "Use the `status` property to enable or disable secret scanning for this repository. For more information, see \"[About secret scanning](/code-security/secret-security/about-secret-scanning).\"", + "description": "

Use the status property to enable or disable secret scanning for this repository. For more information, see \"About secret scanning.\"

", "properties": { "status": { "type": "string", - "description": "Can be `enabled` or `disabled`." + "description": "

Can be enabled or disabled.

", + "name": "status", + "in": "body", + "rawType": "string", + "rawDescription": "Can be `enabled` or `disabled`.", + "childParamsGroups": [] } - } + }, + "name": "secret_scanning", + "in": "body", + "rawType": "object", + "rawDescription": "Use the `status` property to enable or disable secret scanning for this repository. For more information, see \"[About secret scanning](/code-security/secret-security/about-secret-scanning).\"", + "childParamsGroups": [ + { + "parentName": "secret_scanning", + "parentType": "object", + "id": "secret_scanning-object", + "params": [ + { + "type": "string", + "description": "

Can be enabled or disabled.

", + "name": "status", + "in": "body", + "rawType": "string", + "rawDescription": "Can be `enabled` or `disabled`.", + "childParamsGroups": [] + } + ] + } + ] }, "secret_scanning_push_protection": { "type": "object", - "description": "Use the `status` property to enable or disable secret scanning push protection for this repository. For more information, see \"[Protecting pushes with secret scanning](/enterprise-cloud@latest/code-security/secret-scanning/protecting-pushes-with-secret-scanning).\"", + "description": "

Use the status property to enable or disable secret scanning push protection for this repository. For more information, see \"Protecting pushes with secret scanning.\"

", "properties": { "status": { "type": "string", - "description": "Can be `enabled` or `disabled`." + "description": "

Can be enabled or disabled.

", + "name": "status", + "in": "body", + "rawType": "string", + "rawDescription": "Can be `enabled` or `disabled`.", + "childParamsGroups": [] } - } + }, + "name": "secret_scanning_push_protection", + "in": "body", + "rawType": "object", + "rawDescription": "Use the `status` property to enable or disable secret scanning push protection for this repository. For more information, see \"[Protecting pushes with secret scanning](/enterprise-cloud@latest/code-security/secret-scanning/protecting-pushes-with-secret-scanning).\"", + "childParamsGroups": [ + { + "parentName": "secret_scanning_push_protection", + "parentType": "object", + "id": "secret_scanning_push_protection-object", + "params": [ + { + "type": "string", + "description": "

Can be enabled or disabled.

", + "name": "status", + "in": "body", + "rawType": "string", + "rawDescription": "Can be `enabled` or `disabled`.", + "childParamsGroups": [] + } + ] + } + ] } }, "name": "security_and_analysis", @@ -72206,7 +72744,174 @@ "null" ], "rawDescription": "Specify which security and analysis features to enable or disable. For example, to enable GitHub Advanced Security, use this data in the body of the PATCH request: `{\"security_and_analysis\": {\"advanced_security\": {\"status\": \"enabled\"}}}`. If you have admin permissions for a private repository covered by an Advanced Security license, you can check which security and analysis features are currently enabled by using a `GET /repos/{owner}/{repo}` request.", - "childParamsGroups": [] + "childParamsGroups": [ + { + "parentName": "security_and_analysis", + "parentType": "object", + "id": "security_and_analysis-object", + "params": [ + { + "type": "object", + "description": "

Use the status property to enable or disable GitHub Advanced Security for this repository. For more information, see \"About GitHub Advanced Security.\"

", + "properties": { + "status": { + "type": "string", + "description": "

Can be enabled or disabled.

", + "name": "status", + "in": "body", + "rawType": "string", + "rawDescription": "Can be `enabled` or `disabled`.", + "childParamsGroups": [] + } + }, + "name": "advanced_security", + "in": "body", + "rawType": "object", + "rawDescription": "Use the `status` property to enable or disable GitHub Advanced Security for this repository. For more information, see \"[About GitHub Advanced Security](/github/getting-started-with-github/learning-about-github/about-github-advanced-security).\"", + "childParamsGroups": [ + { + "parentName": "advanced_security", + "parentType": "object", + "id": "advanced_security-object", + "params": [ + { + "type": "string", + "description": "

Can be enabled or disabled.

", + "name": "status", + "in": "body", + "rawType": "string", + "rawDescription": "Can be `enabled` or `disabled`.", + "childParamsGroups": [] + } + ] + } + ] + }, + { + "type": "object", + "description": "

Use the status property to enable or disable secret scanning for this repository. For more information, see \"About secret scanning.\"

", + "properties": { + "status": { + "type": "string", + "description": "

Can be enabled or disabled.

", + "name": "status", + "in": "body", + "rawType": "string", + "rawDescription": "Can be `enabled` or `disabled`.", + "childParamsGroups": [] + } + }, + "name": "secret_scanning", + "in": "body", + "rawType": "object", + "rawDescription": "Use the `status` property to enable or disable secret scanning for this repository. For more information, see \"[About secret scanning](/code-security/secret-security/about-secret-scanning).\"", + "childParamsGroups": [ + { + "parentName": "secret_scanning", + "parentType": "object", + "id": "secret_scanning-object", + "params": [ + { + "type": "string", + "description": "

Can be enabled or disabled.

", + "name": "status", + "in": "body", + "rawType": "string", + "rawDescription": "Can be `enabled` or `disabled`.", + "childParamsGroups": [] + } + ] + } + ] + }, + { + "type": "object", + "description": "

Use the status property to enable or disable secret scanning push protection for this repository. For more information, see \"Protecting pushes with secret scanning.\"

", + "properties": { + "status": { + "type": "string", + "description": "

Can be enabled or disabled.

", + "name": "status", + "in": "body", + "rawType": "string", + "rawDescription": "Can be `enabled` or `disabled`.", + "childParamsGroups": [] + } + }, + "name": "secret_scanning_push_protection", + "in": "body", + "rawType": "object", + "rawDescription": "Use the `status` property to enable or disable secret scanning push protection for this repository. For more information, see \"[Protecting pushes with secret scanning](/enterprise-cloud@latest/code-security/secret-scanning/protecting-pushes-with-secret-scanning).\"", + "childParamsGroups": [ + { + "parentName": "secret_scanning_push_protection", + "parentType": "object", + "id": "secret_scanning_push_protection-object", + "params": [ + { + "type": "string", + "description": "

Can be enabled or disabled.

", + "name": "status", + "in": "body", + "rawType": "string", + "rawDescription": "Can be `enabled` or `disabled`.", + "childParamsGroups": [] + } + ] + } + ] + } + ] + }, + { + "parentName": "advanced_security", + "parentType": "object", + "id": "advanced_security-object", + "params": [ + { + "type": "string", + "description": "

Can be enabled or disabled.

", + "name": "status", + "in": "body", + "rawType": "string", + "rawDescription": "Can be `enabled` or `disabled`.", + "childParamsGroups": [] + } + ] + }, + { + "parentName": "secret_scanning", + "parentType": "object", + "id": "secret_scanning-object", + "params": [ + { + "type": "string", + "description": "

Can be enabled or disabled.

", + "name": "status", + "in": "body", + "rawType": "string", + "rawDescription": "Can be `enabled` or `disabled`.", + "childParamsGroups": [] + } + ] + }, + { + "parentName": "secret_scanning_push_protection", + "parentType": "object", + "id": "secret_scanning_push_protection-object", + "params": [ + { + "type": "string", + "description": "

Can be enabled or disabled.

", + "name": "status", + "in": "body", + "rawType": "string", + "rawDescription": "Can be `enabled` or `disabled`.", + "childParamsGroups": [] + } + ] + } + ] }, { "type": "boolean", diff --git a/lib/rest/static/decorated/ghes-3.3.json b/lib/rest/static/decorated/ghes-3.3.json index 55e6053425..1b06bcca41 100644 --- a/lib/rest/static/decorated/ghes-3.3.json +++ b/lib/rest/static/decorated/ghes-3.3.json @@ -18980,19 +18980,29 @@ "properties": { "strict": { "type": "boolean", - "description": "Require branches to be up to date before merging." + "description": "

Required. Require branches to be up to date before merging.

", + "name": "strict", + "in": "body", + "rawType": "boolean", + "rawDescription": "Require branches to be up to date before merging.", + "childParamsGroups": [] }, "contexts": { - "type": "array", + "type": "array of strings", "deprecated": true, - "description": "**Deprecated**: 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.\n", + "description": "

Required. Deprecated: 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.

", "items": { "type": "string" - } + }, + "name": "contexts", + "in": "body", + "rawType": "array", + "rawDescription": "**Deprecated**: 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.\n", + "childParamsGroups": [] }, "checks": { - "type": "array", - "description": "The list of status checks to require in order to merge into this branch.", + "type": "array of objects", + "description": "

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

", "items": { "type": "object", "required": [ @@ -19001,14 +19011,55 @@ "properties": { "context": { "type": "string", - "description": "The name of the required check" + "description": "

Required. The name of the required check

", + "name": "context", + "in": "body", + "rawType": "string", + "rawDescription": "The name of the required check", + "childParamsGroups": [] }, "app_id": { "type": "integer", - "description": "The ID of the GitHub App that must provide this check. Omit this field to automatically select the GitHub App that has recently provided this check, or any app if it was not set by a GitHub App. Pass -1 to explicitly allow any app to set the status." + "description": "

The ID of the GitHub App that must provide this check. Omit this field to automatically select the GitHub App that has recently provided this check, or any app if it was not set by a GitHub App. Pass -1 to explicitly allow any app to set the status.

", + "name": "app_id", + "in": "body", + "rawType": "integer", + "rawDescription": "The ID of the GitHub App that must provide this check. Omit this field to automatically select the GitHub App that has recently provided this check, or any app if it was not set by a GitHub App. Pass -1 to explicitly allow any app to set the status.", + "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": "

Required. The name of the required check

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

The ID of the GitHub App that must provide this check. Omit this field to automatically select the GitHub App that has recently provided this check, or any app if it was not set by a GitHub App. Pass -1 to explicitly allow any app to set the status.

", + "name": "app_id", + "in": "body", + "rawType": "integer", + "rawDescription": "The ID of the GitHub App that must provide this check. Omit this field to automatically select the GitHub App that has recently provided this check, or any app if it was not set by a GitHub App. Pass -1 to explicitly allow any app to set the status.", + "childParamsGroups": [] + } + ] + } + ] } }, "required": [ @@ -19022,7 +19073,123 @@ "null" ], "rawDescription": "Require status checks to pass before merging. Set to `null` to disable.", - "childParamsGroups": [] + "childParamsGroups": [ + { + "parentName": "required_status_checks", + "parentType": "object", + "id": "required_status_checks-object", + "params": [ + { + "type": "boolean", + "description": "

Required. Require branches to be up to date before merging.

", + "name": "strict", + "in": "body", + "rawType": "boolean", + "rawDescription": "Require branches to be up to date before merging.", + "childParamsGroups": [] + }, + { + "type": "array of strings", + "deprecated": true, + "description": "

Required. Deprecated: 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.

", + "items": { + "type": "string" + }, + "name": "contexts", + "in": "body", + "rawType": "array", + "rawDescription": "**Deprecated**: 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.\n", + "childParamsGroups": [] + }, + { + "type": "array of objects", + "description": "

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

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

Required. The name of the required check

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

The ID of the GitHub App that must provide this check. Omit this field to automatically select the GitHub App that has recently provided this check, or any app if it was not set by a GitHub App. Pass -1 to explicitly allow any app to set the status.

", + "name": "app_id", + "in": "body", + "rawType": "integer", + "rawDescription": "The ID of the GitHub App that must provide this check. Omit this field to automatically select the GitHub App that has recently provided this check, or any app if it was not set by a GitHub App. Pass -1 to explicitly allow any app to set the status.", + "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": "

Required. The name of the required check

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

The ID of the GitHub App that must provide this check. Omit this field to automatically select the GitHub App that has recently provided this check, or any app if it was not set by a GitHub App. Pass -1 to explicitly allow any app to set the status.

", + "name": "app_id", + "in": "body", + "rawType": "integer", + "rawDescription": "The ID of the GitHub App that must provide this check. Omit this field to automatically select the GitHub App that has recently provided this check, or any app if it was not set by a GitHub App. Pass -1 to explicitly allow any app to set the status.", + "childParamsGroups": [] + } + ] + } + ] + } + ] + }, + { + "parentName": "checks", + "parentType": "items", + "id": "checks-items", + "params": [ + { + "type": "string", + "description": "

Required. The name of the required check

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

The ID of the GitHub App that must provide this check. Omit this field to automatically select the GitHub App that has recently provided this check, or any app if it was not set by a GitHub App. Pass -1 to explicitly allow any app to set the status.

", + "name": "app_id", + "in": "body", + "rawType": "integer", + "rawDescription": "The ID of the GitHub App that must provide this check. Omit this field to automatically select the GitHub App that has recently provided this check, or any app if it was not set by a GitHub App. Pass -1 to explicitly allow any app to set the status.", + "childParamsGroups": [] + } + ] + } + ] }, { "type": "boolean or null", @@ -19042,35 +19209,97 @@ "properties": { "dismissal_restrictions": { "type": "object", - "description": "Specify which users and teams can dismiss pull request reviews. Pass an empty `dismissal_restrictions` object to disable. User and team `dismissal_restrictions` are only available for organization-owned repositories. Omit this parameter for personal repositories.", + "description": "

Specify which users and teams can dismiss pull request reviews. Pass an empty dismissal_restrictions object to disable. User and team dismissal_restrictions are only available for organization-owned repositories. Omit this parameter for personal repositories.

", "properties": { "users": { - "type": "array", - "description": "The list of user `login`s with dismissal access", + "type": "array of strings", + "description": "

The list of user logins with dismissal access

", "items": { "type": "string" - } + }, + "name": "users", + "in": "body", + "rawType": "array", + "rawDescription": "The list of user `login`s with dismissal access", + "childParamsGroups": [] }, "teams": { - "type": "array", - "description": "The list of team `slug`s with dismissal access", + "type": "array of strings", + "description": "

The list of team slugs with dismissal access

", "items": { "type": "string" - } + }, + "name": "teams", + "in": "body", + "rawType": "array", + "rawDescription": "The list of team `slug`s with dismissal access", + "childParamsGroups": [] } - } + }, + "name": "dismissal_restrictions", + "in": "body", + "rawType": "object", + "rawDescription": "Specify which users and teams can dismiss pull request reviews. Pass an empty `dismissal_restrictions` object to disable. User and team `dismissal_restrictions` are only available for organization-owned repositories. Omit this parameter for personal repositories.", + "childParamsGroups": [ + { + "parentName": "dismissal_restrictions", + "parentType": "object", + "id": "dismissal_restrictions-object", + "params": [ + { + "type": "array of strings", + "description": "

The list of user logins with dismissal access

", + "items": { + "type": "string" + }, + "name": "users", + "in": "body", + "rawType": "array", + "rawDescription": "The list of user `login`s with dismissal access", + "childParamsGroups": [] + }, + { + "type": "array of strings", + "description": "

The list of team slugs with dismissal access

", + "items": { + "type": "string" + }, + "name": "teams", + "in": "body", + "rawType": "array", + "rawDescription": "The list of team `slug`s with dismissal access", + "childParamsGroups": [] + } + ] + } + ] }, "dismiss_stale_reviews": { "type": "boolean", - "description": "Set to `true` if you want to automatically dismiss approving reviews when someone pushes a new commit." + "description": "

Set to true if you want to automatically dismiss approving reviews when someone pushes a new commit.

", + "name": "dismiss_stale_reviews", + "in": "body", + "rawType": "boolean", + "rawDescription": "Set to `true` if you want to automatically dismiss approving reviews when someone pushes a new commit.", + "childParamsGroups": [] }, "require_code_owner_reviews": { "type": "boolean", - "description": "Blocks merging pull requests until [code owners](https://docs.github.com/articles/about-code-owners/) review them." + "description": "

Blocks merging pull requests until code owners review them.

", + "name": "require_code_owner_reviews", + "in": "body", + "rawType": "boolean", + "rawDescription": "Blocks merging pull requests until [code owners](https://docs.github.com/articles/about-code-owners/) review them.", + "childParamsGroups": [] }, "required_approving_review_count": { "type": "integer", - "description": "Specify the number of reviewers required to approve pull requests. Use a number between 1 and 6." + "description": "

Specify the number of reviewers required to approve pull requests. Use a number between 1 and 6.

", + "name": "required_approving_review_count", + "in": "body", + "rawType": "integer", + "rawDescription": "Specify the number of reviewers required to approve pull requests. Use a number between 1 and 6.", + "childParamsGroups": [] } }, "name": "required_pull_request_reviews", @@ -19080,32 +19309,180 @@ "null" ], "rawDescription": "Require at least one approving review on a pull request, before merging. Set to `null` to disable.", - "childParamsGroups": [] + "childParamsGroups": [ + { + "parentName": "required_pull_request_reviews", + "parentType": "object", + "id": "required_pull_request_reviews-object", + "params": [ + { + "type": "object", + "description": "

Specify which users and teams can dismiss pull request reviews. Pass an empty dismissal_restrictions object to disable. User and team dismissal_restrictions are only available for organization-owned repositories. Omit this parameter for personal repositories.

", + "properties": { + "users": { + "type": "array of strings", + "description": "

The list of user logins with dismissal access

", + "items": { + "type": "string" + }, + "name": "users", + "in": "body", + "rawType": "array", + "rawDescription": "The list of user `login`s with dismissal access", + "childParamsGroups": [] + }, + "teams": { + "type": "array of strings", + "description": "

The list of team slugs with dismissal access

", + "items": { + "type": "string" + }, + "name": "teams", + "in": "body", + "rawType": "array", + "rawDescription": "The list of team `slug`s with dismissal access", + "childParamsGroups": [] + } + }, + "name": "dismissal_restrictions", + "in": "body", + "rawType": "object", + "rawDescription": "Specify which users and teams can dismiss pull request reviews. Pass an empty `dismissal_restrictions` object to disable. User and team `dismissal_restrictions` are only available for organization-owned repositories. Omit this parameter for personal repositories.", + "childParamsGroups": [ + { + "parentName": "dismissal_restrictions", + "parentType": "object", + "id": "dismissal_restrictions-object", + "params": [ + { + "type": "array of strings", + "description": "

The list of user logins with dismissal access

", + "items": { + "type": "string" + }, + "name": "users", + "in": "body", + "rawType": "array", + "rawDescription": "The list of user `login`s with dismissal access", + "childParamsGroups": [] + }, + { + "type": "array of strings", + "description": "

The list of team slugs with dismissal access

", + "items": { + "type": "string" + }, + "name": "teams", + "in": "body", + "rawType": "array", + "rawDescription": "The list of team `slug`s with dismissal access", + "childParamsGroups": [] + } + ] + } + ] + }, + { + "type": "boolean", + "description": "

Set to true if you want to automatically dismiss approving reviews when someone pushes a new commit.

", + "name": "dismiss_stale_reviews", + "in": "body", + "rawType": "boolean", + "rawDescription": "Set to `true` if you want to automatically dismiss approving reviews when someone pushes a new commit.", + "childParamsGroups": [] + }, + { + "type": "boolean", + "description": "

Blocks merging pull requests until code owners review them.

", + "name": "require_code_owner_reviews", + "in": "body", + "rawType": "boolean", + "rawDescription": "Blocks merging pull requests until [code owners](https://docs.github.com/articles/about-code-owners/) review them.", + "childParamsGroups": [] + }, + { + "type": "integer", + "description": "

Specify the number of reviewers required to approve pull requests. Use a number between 1 and 6.

", + "name": "required_approving_review_count", + "in": "body", + "rawType": "integer", + "rawDescription": "Specify the number of reviewers required to approve pull requests. Use a number between 1 and 6.", + "childParamsGroups": [] + } + ] + }, + { + "parentName": "dismissal_restrictions", + "parentType": "object", + "id": "dismissal_restrictions-object", + "params": [ + { + "type": "array of strings", + "description": "

The list of user logins with dismissal access

", + "items": { + "type": "string" + }, + "name": "users", + "in": "body", + "rawType": "array", + "rawDescription": "The list of user `login`s with dismissal access", + "childParamsGroups": [] + }, + { + "type": "array of strings", + "description": "

The list of team slugs with dismissal access

", + "items": { + "type": "string" + }, + "name": "teams", + "in": "body", + "rawType": "array", + "rawDescription": "The list of team `slug`s with dismissal access", + "childParamsGroups": [] + } + ] + } + ] }, { "type": "object or null", "description": "

Required. Restrict who can push to the protected branch. User, app, and team restrictions are only available for organization-owned repositories. Set to null to disable.

", "properties": { "users": { - "type": "array", - "description": "The list of user `login`s with push access", + "type": "array of strings", + "description": "

Required. The list of user logins with push access

", "items": { "type": "string" - } + }, + "name": "users", + "in": "body", + "rawType": "array", + "rawDescription": "The list of user `login`s with push access", + "childParamsGroups": [] }, "teams": { - "type": "array", - "description": "The list of team `slug`s with push access", + "type": "array of strings", + "description": "

Required. The list of team slugs with push access

", "items": { "type": "string" - } + }, + "name": "teams", + "in": "body", + "rawType": "array", + "rawDescription": "The list of team `slug`s with push access", + "childParamsGroups": [] }, "apps": { - "type": "array", - "description": "The list of app `slug`s with push access", + "type": "array of strings", + "description": "

The list of app slugs with push access

", "items": { "type": "string" - } + }, + "name": "apps", + "in": "body", + "rawType": "array", + "rawDescription": "The list of app `slug`s with push access", + "childParamsGroups": [] } }, "required": [ @@ -19119,7 +19496,51 @@ "null" ], "rawDescription": "Restrict who can push to the protected branch. User, app, and team `restrictions` are only available for organization-owned repositories. Set to `null` to disable.", - "childParamsGroups": [] + "childParamsGroups": [ + { + "parentName": "restrictions", + "parentType": "object", + "id": "restrictions-object", + "params": [ + { + "type": "array of strings", + "description": "

Required. The list of user logins with push access

", + "items": { + "type": "string" + }, + "name": "users", + "in": "body", + "rawType": "array", + "rawDescription": "The list of user `login`s with push access", + "childParamsGroups": [] + }, + { + "type": "array of strings", + "description": "

Required. The list of team slugs with push access

", + "items": { + "type": "string" + }, + "name": "teams", + "in": "body", + "rawType": "array", + "rawDescription": "The list of team `slug`s with push access", + "childParamsGroups": [] + }, + { + "type": "array of strings", + "description": "

The list of app slugs with push access

", + "items": { + "type": "string" + }, + "name": "apps", + "in": "body", + "rawType": "array", + "rawDescription": "The list of app `slug`s with push access", + "childParamsGroups": [] + } + ] + } + ] }, { "type": "boolean", @@ -33944,11 +34365,21 @@ "properties": { "protected_branches": { "type": "boolean", - "description": "Whether only branches with branch protection rules can deploy to this environment. If `protected_branches` is `true`, `custom_branch_policies` must be `false`; if `protected_branches` is `false`, `custom_branch_policies` must be `true`." + "description": "

Required. Whether only branches with branch protection rules can deploy to this environment. If protected_branches is true, custom_branch_policies must be false; if protected_branches is false, custom_branch_policies must be true.

", + "name": "protected_branches", + "in": "body", + "rawType": "boolean", + "rawDescription": "Whether only branches with branch protection rules can deploy to this environment. If `protected_branches` is `true`, `custom_branch_policies` must be `false`; if `protected_branches` is `false`, `custom_branch_policies` must be `true`.", + "childParamsGroups": [] }, "custom_branch_policies": { "type": "boolean", - "description": "Whether only branches that match the specified name patterns can deploy to this environment. If `custom_branch_policies` is `true`, `protected_branches` must be `false`; if `custom_branch_policies` is `false`, `protected_branches` must be `true`." + "description": "

Required. Whether only branches that match the specified name patterns can deploy to this environment. If custom_branch_policies is true, protected_branches must be false; if custom_branch_policies is false, protected_branches must be true.

", + "name": "custom_branch_policies", + "in": "body", + "rawType": "boolean", + "rawDescription": "Whether only branches that match the specified name patterns can deploy to this environment. If `custom_branch_policies` is `true`, `protected_branches` must be `false`; if `custom_branch_policies` is `false`, `protected_branches` must be `true`.", + "childParamsGroups": [] } }, "required": [ @@ -33962,7 +34393,33 @@ "null" ], "rawDescription": "The type of deployment branch policy for this environment. To allow all branches to deploy, set to `null`.", - "childParamsGroups": [] + "childParamsGroups": [ + { + "parentName": "deployment_branch_policy", + "parentType": "object", + "id": "deployment_branch_policy-object", + "params": [ + { + "type": "boolean", + "description": "

Required. Whether only branches with branch protection rules can deploy to this environment. If protected_branches is true, custom_branch_policies must be false; if protected_branches is false, custom_branch_policies must be true.

", + "name": "protected_branches", + "in": "body", + "rawType": "boolean", + "rawDescription": "Whether only branches with branch protection rules can deploy to this environment. If `protected_branches` is `true`, `custom_branch_policies` must be `false`; if `protected_branches` is `false`, `custom_branch_policies` must be `true`.", + "childParamsGroups": [] + }, + { + "type": "boolean", + "description": "

Required. Whether only branches that match the specified name patterns can deploy to this environment. If custom_branch_policies is true, protected_branches must be false; if custom_branch_policies is false, protected_branches must be true.

", + "name": "custom_branch_policies", + "in": "body", + "rawType": "boolean", + "rawDescription": "Whether only branches that match the specified name patterns can deploy to this environment. If `custom_branch_policies` is `true`, `protected_branches` must be `false`; if `custom_branch_policies` is `false`, `protected_branches` must be `true`.", + "childParamsGroups": [] + } + ] + } + ] } ], "enabledForGitHubApps": true, @@ -72111,33 +72568,114 @@ "properties": { "advanced_security": { "type": "object", - "description": "Use the `status` property to enable or disable GitHub Advanced Security for this repository. For more information, see \"[About GitHub Advanced Security](/github/getting-started-with-github/learning-about-github/about-github-advanced-security).\"", + "description": "

Use the status property to enable or disable GitHub Advanced Security for this repository. For more information, see \"About GitHub Advanced Security.\"

", "properties": { "status": { "type": "string", - "description": "Can be `enabled` or `disabled`." + "description": "

Can be enabled or disabled.

", + "name": "status", + "in": "body", + "rawType": "string", + "rawDescription": "Can be `enabled` or `disabled`.", + "childParamsGroups": [] } - } + }, + "name": "advanced_security", + "in": "body", + "rawType": "object", + "rawDescription": "Use the `status` property to enable or disable GitHub Advanced Security for this repository. For more information, see \"[About GitHub Advanced Security](/github/getting-started-with-github/learning-about-github/about-github-advanced-security).\"", + "childParamsGroups": [ + { + "parentName": "advanced_security", + "parentType": "object", + "id": "advanced_security-object", + "params": [ + { + "type": "string", + "description": "

Can be enabled or disabled.

", + "name": "status", + "in": "body", + "rawType": "string", + "rawDescription": "Can be `enabled` or `disabled`.", + "childParamsGroups": [] + } + ] + } + ] }, "secret_scanning": { "type": "object", - "description": "Use the `status` property to enable or disable secret scanning for this repository. For more information, see \"[About secret scanning](/code-security/secret-security/about-secret-scanning).\"", + "description": "

Use the status property to enable or disable secret scanning for this repository. For more information, see \"About secret scanning.\"

", "properties": { "status": { "type": "string", - "description": "Can be `enabled` or `disabled`." + "description": "

Can be enabled or disabled.

", + "name": "status", + "in": "body", + "rawType": "string", + "rawDescription": "Can be `enabled` or `disabled`.", + "childParamsGroups": [] } - } + }, + "name": "secret_scanning", + "in": "body", + "rawType": "object", + "rawDescription": "Use the `status` property to enable or disable secret scanning for this repository. For more information, see \"[About secret scanning](/code-security/secret-security/about-secret-scanning).\"", + "childParamsGroups": [ + { + "parentName": "secret_scanning", + "parentType": "object", + "id": "secret_scanning-object", + "params": [ + { + "type": "string", + "description": "

Can be enabled or disabled.

", + "name": "status", + "in": "body", + "rawType": "string", + "rawDescription": "Can be `enabled` or `disabled`.", + "childParamsGroups": [] + } + ] + } + ] }, "secret_scanning_push_protection": { "type": "object", - "description": "Use the `status` property to enable or disable secret scanning push protection for this repository. For more information, see \"[Protecting pushes with secret scanning](/enterprise-cloud@latest/code-security/secret-scanning/protecting-pushes-with-secret-scanning).\"", + "description": "

Use the status property to enable or disable secret scanning push protection for this repository. For more information, see \"Protecting pushes with secret scanning.\"

", "properties": { "status": { "type": "string", - "description": "Can be `enabled` or `disabled`." + "description": "

Can be enabled or disabled.

", + "name": "status", + "in": "body", + "rawType": "string", + "rawDescription": "Can be `enabled` or `disabled`.", + "childParamsGroups": [] } - } + }, + "name": "secret_scanning_push_protection", + "in": "body", + "rawType": "object", + "rawDescription": "Use the `status` property to enable or disable secret scanning push protection for this repository. For more information, see \"[Protecting pushes with secret scanning](/enterprise-cloud@latest/code-security/secret-scanning/protecting-pushes-with-secret-scanning).\"", + "childParamsGroups": [ + { + "parentName": "secret_scanning_push_protection", + "parentType": "object", + "id": "secret_scanning_push_protection-object", + "params": [ + { + "type": "string", + "description": "

Can be enabled or disabled.

", + "name": "status", + "in": "body", + "rawType": "string", + "rawDescription": "Can be `enabled` or `disabled`.", + "childParamsGroups": [] + } + ] + } + ] } }, "name": "security_and_analysis", @@ -72147,7 +72685,174 @@ "null" ], "rawDescription": "Specify which security and analysis features to enable or disable. For example, to enable GitHub Advanced Security, use this data in the body of the PATCH request: `{\"security_and_analysis\": {\"advanced_security\": {\"status\": \"enabled\"}}}`. If you have admin permissions for a private repository covered by an Advanced Security license, you can check which security and analysis features are currently enabled by using a `GET /repos/{owner}/{repo}` request.", - "childParamsGroups": [] + "childParamsGroups": [ + { + "parentName": "security_and_analysis", + "parentType": "object", + "id": "security_and_analysis-object", + "params": [ + { + "type": "object", + "description": "

Use the status property to enable or disable GitHub Advanced Security for this repository. For more information, see \"About GitHub Advanced Security.\"

", + "properties": { + "status": { + "type": "string", + "description": "

Can be enabled or disabled.

", + "name": "status", + "in": "body", + "rawType": "string", + "rawDescription": "Can be `enabled` or `disabled`.", + "childParamsGroups": [] + } + }, + "name": "advanced_security", + "in": "body", + "rawType": "object", + "rawDescription": "Use the `status` property to enable or disable GitHub Advanced Security for this repository. For more information, see \"[About GitHub Advanced Security](/github/getting-started-with-github/learning-about-github/about-github-advanced-security).\"", + "childParamsGroups": [ + { + "parentName": "advanced_security", + "parentType": "object", + "id": "advanced_security-object", + "params": [ + { + "type": "string", + "description": "

Can be enabled or disabled.

", + "name": "status", + "in": "body", + "rawType": "string", + "rawDescription": "Can be `enabled` or `disabled`.", + "childParamsGroups": [] + } + ] + } + ] + }, + { + "type": "object", + "description": "

Use the status property to enable or disable secret scanning for this repository. For more information, see \"About secret scanning.\"

", + "properties": { + "status": { + "type": "string", + "description": "

Can be enabled or disabled.

", + "name": "status", + "in": "body", + "rawType": "string", + "rawDescription": "Can be `enabled` or `disabled`.", + "childParamsGroups": [] + } + }, + "name": "secret_scanning", + "in": "body", + "rawType": "object", + "rawDescription": "Use the `status` property to enable or disable secret scanning for this repository. For more information, see \"[About secret scanning](/code-security/secret-security/about-secret-scanning).\"", + "childParamsGroups": [ + { + "parentName": "secret_scanning", + "parentType": "object", + "id": "secret_scanning-object", + "params": [ + { + "type": "string", + "description": "

Can be enabled or disabled.

", + "name": "status", + "in": "body", + "rawType": "string", + "rawDescription": "Can be `enabled` or `disabled`.", + "childParamsGroups": [] + } + ] + } + ] + }, + { + "type": "object", + "description": "

Use the status property to enable or disable secret scanning push protection for this repository. For more information, see \"Protecting pushes with secret scanning.\"

", + "properties": { + "status": { + "type": "string", + "description": "

Can be enabled or disabled.

", + "name": "status", + "in": "body", + "rawType": "string", + "rawDescription": "Can be `enabled` or `disabled`.", + "childParamsGroups": [] + } + }, + "name": "secret_scanning_push_protection", + "in": "body", + "rawType": "object", + "rawDescription": "Use the `status` property to enable or disable secret scanning push protection for this repository. For more information, see \"[Protecting pushes with secret scanning](/enterprise-cloud@latest/code-security/secret-scanning/protecting-pushes-with-secret-scanning).\"", + "childParamsGroups": [ + { + "parentName": "secret_scanning_push_protection", + "parentType": "object", + "id": "secret_scanning_push_protection-object", + "params": [ + { + "type": "string", + "description": "

Can be enabled or disabled.

", + "name": "status", + "in": "body", + "rawType": "string", + "rawDescription": "Can be `enabled` or `disabled`.", + "childParamsGroups": [] + } + ] + } + ] + } + ] + }, + { + "parentName": "advanced_security", + "parentType": "object", + "id": "advanced_security-object", + "params": [ + { + "type": "string", + "description": "

Can be enabled or disabled.

", + "name": "status", + "in": "body", + "rawType": "string", + "rawDescription": "Can be `enabled` or `disabled`.", + "childParamsGroups": [] + } + ] + }, + { + "parentName": "secret_scanning", + "parentType": "object", + "id": "secret_scanning-object", + "params": [ + { + "type": "string", + "description": "

Can be enabled or disabled.

", + "name": "status", + "in": "body", + "rawType": "string", + "rawDescription": "Can be `enabled` or `disabled`.", + "childParamsGroups": [] + } + ] + }, + { + "parentName": "secret_scanning_push_protection", + "parentType": "object", + "id": "secret_scanning_push_protection-object", + "params": [ + { + "type": "string", + "description": "

Can be enabled or disabled.

", + "name": "status", + "in": "body", + "rawType": "string", + "rawDescription": "Can be `enabled` or `disabled`.", + "childParamsGroups": [] + } + ] + } + ] }, { "type": "boolean", diff --git a/lib/rest/static/decorated/ghes-3.4.json b/lib/rest/static/decorated/ghes-3.4.json index f40ba140b7..13e21e364e 100644 --- a/lib/rest/static/decorated/ghes-3.4.json +++ b/lib/rest/static/decorated/ghes-3.4.json @@ -20086,19 +20086,29 @@ "properties": { "strict": { "type": "boolean", - "description": "Require branches to be up to date before merging." + "description": "

Required. Require branches to be up to date before merging.

", + "name": "strict", + "in": "body", + "rawType": "boolean", + "rawDescription": "Require branches to be up to date before merging.", + "childParamsGroups": [] }, "contexts": { - "type": "array", + "type": "array of strings", "deprecated": true, - "description": "**Deprecated**: 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.\n", + "description": "

Required. Deprecated: 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.

", "items": { "type": "string" - } + }, + "name": "contexts", + "in": "body", + "rawType": "array", + "rawDescription": "**Deprecated**: 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.\n", + "childParamsGroups": [] }, "checks": { - "type": "array", - "description": "The list of status checks to require in order to merge into this branch.", + "type": "array of objects", + "description": "

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

", "items": { "type": "object", "required": [ @@ -20107,14 +20117,55 @@ "properties": { "context": { "type": "string", - "description": "The name of the required check" + "description": "

Required. The name of the required check

", + "name": "context", + "in": "body", + "rawType": "string", + "rawDescription": "The name of the required check", + "childParamsGroups": [] }, "app_id": { "type": "integer", - "description": "The ID of the GitHub App that must provide this check. Omit this field to automatically select the GitHub App that has recently provided this check, or any app if it was not set by a GitHub App. Pass -1 to explicitly allow any app to set the status." + "description": "

The ID of the GitHub App that must provide this check. Omit this field to automatically select the GitHub App that has recently provided this check, or any app if it was not set by a GitHub App. Pass -1 to explicitly allow any app to set the status.

", + "name": "app_id", + "in": "body", + "rawType": "integer", + "rawDescription": "The ID of the GitHub App that must provide this check. Omit this field to automatically select the GitHub App that has recently provided this check, or any app if it was not set by a GitHub App. Pass -1 to explicitly allow any app to set the status.", + "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": "

Required. The name of the required check

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

The ID of the GitHub App that must provide this check. Omit this field to automatically select the GitHub App that has recently provided this check, or any app if it was not set by a GitHub App. Pass -1 to explicitly allow any app to set the status.

", + "name": "app_id", + "in": "body", + "rawType": "integer", + "rawDescription": "The ID of the GitHub App that must provide this check. Omit this field to automatically select the GitHub App that has recently provided this check, or any app if it was not set by a GitHub App. Pass -1 to explicitly allow any app to set the status.", + "childParamsGroups": [] + } + ] + } + ] } }, "required": [ @@ -20128,7 +20179,123 @@ "null" ], "rawDescription": "Require status checks to pass before merging. Set to `null` to disable.", - "childParamsGroups": [] + "childParamsGroups": [ + { + "parentName": "required_status_checks", + "parentType": "object", + "id": "required_status_checks-object", + "params": [ + { + "type": "boolean", + "description": "

Required. Require branches to be up to date before merging.

", + "name": "strict", + "in": "body", + "rawType": "boolean", + "rawDescription": "Require branches to be up to date before merging.", + "childParamsGroups": [] + }, + { + "type": "array of strings", + "deprecated": true, + "description": "

Required. Deprecated: 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.

", + "items": { + "type": "string" + }, + "name": "contexts", + "in": "body", + "rawType": "array", + "rawDescription": "**Deprecated**: 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.\n", + "childParamsGroups": [] + }, + { + "type": "array of objects", + "description": "

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

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

Required. The name of the required check

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

The ID of the GitHub App that must provide this check. Omit this field to automatically select the GitHub App that has recently provided this check, or any app if it was not set by a GitHub App. Pass -1 to explicitly allow any app to set the status.

", + "name": "app_id", + "in": "body", + "rawType": "integer", + "rawDescription": "The ID of the GitHub App that must provide this check. Omit this field to automatically select the GitHub App that has recently provided this check, or any app if it was not set by a GitHub App. Pass -1 to explicitly allow any app to set the status.", + "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": "

Required. The name of the required check

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

The ID of the GitHub App that must provide this check. Omit this field to automatically select the GitHub App that has recently provided this check, or any app if it was not set by a GitHub App. Pass -1 to explicitly allow any app to set the status.

", + "name": "app_id", + "in": "body", + "rawType": "integer", + "rawDescription": "The ID of the GitHub App that must provide this check. Omit this field to automatically select the GitHub App that has recently provided this check, or any app if it was not set by a GitHub App. Pass -1 to explicitly allow any app to set the status.", + "childParamsGroups": [] + } + ] + } + ] + } + ] + }, + { + "parentName": "checks", + "parentType": "items", + "id": "checks-items", + "params": [ + { + "type": "string", + "description": "

Required. The name of the required check

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

The ID of the GitHub App that must provide this check. Omit this field to automatically select the GitHub App that has recently provided this check, or any app if it was not set by a GitHub App. Pass -1 to explicitly allow any app to set the status.

", + "name": "app_id", + "in": "body", + "rawType": "integer", + "rawDescription": "The ID of the GitHub App that must provide this check. Omit this field to automatically select the GitHub App that has recently provided this check, or any app if it was not set by a GitHub App. Pass -1 to explicitly allow any app to set the status.", + "childParamsGroups": [] + } + ] + } + ] }, { "type": "boolean or null", @@ -20148,55 +20315,164 @@ "properties": { "dismissal_restrictions": { "type": "object", - "description": "Specify which users and teams can dismiss pull request reviews. Pass an empty `dismissal_restrictions` object to disable. User and team `dismissal_restrictions` are only available for organization-owned repositories. Omit this parameter for personal repositories.", + "description": "

Specify which users and teams can dismiss pull request reviews. Pass an empty dismissal_restrictions object to disable. User and team dismissal_restrictions are only available for organization-owned repositories. Omit this parameter for personal repositories.

", "properties": { "users": { - "type": "array", - "description": "The list of user `login`s with dismissal access", + "type": "array of strings", + "description": "

The list of user logins with dismissal access

", "items": { "type": "string" - } + }, + "name": "users", + "in": "body", + "rawType": "array", + "rawDescription": "The list of user `login`s with dismissal access", + "childParamsGroups": [] }, "teams": { - "type": "array", - "description": "The list of team `slug`s with dismissal access", + "type": "array of strings", + "description": "

The list of team slugs with dismissal access

", "items": { "type": "string" - } + }, + "name": "teams", + "in": "body", + "rawType": "array", + "rawDescription": "The list of team `slug`s with dismissal access", + "childParamsGroups": [] } - } + }, + "name": "dismissal_restrictions", + "in": "body", + "rawType": "object", + "rawDescription": "Specify which users and teams can dismiss pull request reviews. Pass an empty `dismissal_restrictions` object to disable. User and team `dismissal_restrictions` are only available for organization-owned repositories. Omit this parameter for personal repositories.", + "childParamsGroups": [ + { + "parentName": "dismissal_restrictions", + "parentType": "object", + "id": "dismissal_restrictions-object", + "params": [ + { + "type": "array of strings", + "description": "

The list of user logins with dismissal access

", + "items": { + "type": "string" + }, + "name": "users", + "in": "body", + "rawType": "array", + "rawDescription": "The list of user `login`s with dismissal access", + "childParamsGroups": [] + }, + { + "type": "array of strings", + "description": "

The list of team slugs with dismissal access

", + "items": { + "type": "string" + }, + "name": "teams", + "in": "body", + "rawType": "array", + "rawDescription": "The list of team `slug`s with dismissal access", + "childParamsGroups": [] + } + ] + } + ] }, "dismiss_stale_reviews": { "type": "boolean", - "description": "Set to `true` if you want to automatically dismiss approving reviews when someone pushes a new commit." + "description": "

Set to true if you want to automatically dismiss approving reviews when someone pushes a new commit.

", + "name": "dismiss_stale_reviews", + "in": "body", + "rawType": "boolean", + "rawDescription": "Set to `true` if you want to automatically dismiss approving reviews when someone pushes a new commit.", + "childParamsGroups": [] }, "require_code_owner_reviews": { "type": "boolean", - "description": "Blocks merging pull requests until [code owners](https://docs.github.com/articles/about-code-owners/) review them." + "description": "

Blocks merging pull requests until code owners review them.

", + "name": "require_code_owner_reviews", + "in": "body", + "rawType": "boolean", + "rawDescription": "Blocks merging pull requests until [code owners](https://docs.github.com/articles/about-code-owners/) review them.", + "childParamsGroups": [] }, "required_approving_review_count": { "type": "integer", - "description": "Specify the number of reviewers required to approve pull requests. Use a number between 1 and 6 or 0 to not require reviewers." + "description": "

Specify the number of reviewers required to approve pull requests. Use a number between 1 and 6 or 0 to not require reviewers.

", + "name": "required_approving_review_count", + "in": "body", + "rawType": "integer", + "rawDescription": "Specify the number of reviewers required to approve pull requests. Use a number between 1 and 6 or 0 to not require reviewers.", + "childParamsGroups": [] }, "bypass_pull_request_allowances": { "type": "object", - "description": "Allow specific users or teams to bypass pull request requirements.", + "description": "

Allow specific users or teams to bypass pull request requirements.

", "properties": { "users": { - "type": "array", - "description": "The list of user `login`s allowed to bypass pull request requirements.", + "type": "array of strings", + "description": "

The list of user logins allowed to bypass pull request requirements.

", "items": { "type": "string" - } + }, + "name": "users", + "in": "body", + "rawType": "array", + "rawDescription": "The list of user `login`s allowed to bypass pull request requirements.", + "childParamsGroups": [] }, "teams": { - "type": "array", - "description": "The list of team `slug`s allowed to bypass pull request requirements.", + "type": "array of strings", + "description": "

The list of team slugs allowed to bypass pull request requirements.

", "items": { "type": "string" - } + }, + "name": "teams", + "in": "body", + "rawType": "array", + "rawDescription": "The list of team `slug`s allowed to bypass pull request requirements.", + "childParamsGroups": [] } - } + }, + "name": "bypass_pull_request_allowances", + "in": "body", + "rawType": "object", + "rawDescription": "Allow specific users or teams to bypass pull request requirements.", + "childParamsGroups": [ + { + "parentName": "bypass_pull_request_allowances", + "parentType": "object", + "id": "bypass_pull_request_allowances-object", + "params": [ + { + "type": "array of strings", + "description": "

The list of user logins allowed to bypass pull request requirements.

", + "items": { + "type": "string" + }, + "name": "users", + "in": "body", + "rawType": "array", + "rawDescription": "The list of user `login`s allowed to bypass pull request requirements.", + "childParamsGroups": [] + }, + { + "type": "array of strings", + "description": "

The list of team slugs allowed to bypass pull request requirements.

", + "items": { + "type": "string" + }, + "name": "teams", + "in": "body", + "rawType": "array", + "rawDescription": "The list of team `slug`s allowed to bypass pull request requirements.", + "childParamsGroups": [] + } + ] + } + ] } }, "name": "required_pull_request_reviews", @@ -20206,32 +20482,278 @@ "null" ], "rawDescription": "Require at least one approving review on a pull request, before merging. Set to `null` to disable.", - "childParamsGroups": [] + "childParamsGroups": [ + { + "parentName": "required_pull_request_reviews", + "parentType": "object", + "id": "required_pull_request_reviews-object", + "params": [ + { + "type": "object", + "description": "

Specify which users and teams can dismiss pull request reviews. Pass an empty dismissal_restrictions object to disable. User and team dismissal_restrictions are only available for organization-owned repositories. Omit this parameter for personal repositories.

", + "properties": { + "users": { + "type": "array of strings", + "description": "

The list of user logins with dismissal access

", + "items": { + "type": "string" + }, + "name": "users", + "in": "body", + "rawType": "array", + "rawDescription": "The list of user `login`s with dismissal access", + "childParamsGroups": [] + }, + "teams": { + "type": "array of strings", + "description": "

The list of team slugs with dismissal access

", + "items": { + "type": "string" + }, + "name": "teams", + "in": "body", + "rawType": "array", + "rawDescription": "The list of team `slug`s with dismissal access", + "childParamsGroups": [] + } + }, + "name": "dismissal_restrictions", + "in": "body", + "rawType": "object", + "rawDescription": "Specify which users and teams can dismiss pull request reviews. Pass an empty `dismissal_restrictions` object to disable. User and team `dismissal_restrictions` are only available for organization-owned repositories. Omit this parameter for personal repositories.", + "childParamsGroups": [ + { + "parentName": "dismissal_restrictions", + "parentType": "object", + "id": "dismissal_restrictions-object", + "params": [ + { + "type": "array of strings", + "description": "

The list of user logins with dismissal access

", + "items": { + "type": "string" + }, + "name": "users", + "in": "body", + "rawType": "array", + "rawDescription": "The list of user `login`s with dismissal access", + "childParamsGroups": [] + }, + { + "type": "array of strings", + "description": "

The list of team slugs with dismissal access

", + "items": { + "type": "string" + }, + "name": "teams", + "in": "body", + "rawType": "array", + "rawDescription": "The list of team `slug`s with dismissal access", + "childParamsGroups": [] + } + ] + } + ] + }, + { + "type": "boolean", + "description": "

Set to true if you want to automatically dismiss approving reviews when someone pushes a new commit.

", + "name": "dismiss_stale_reviews", + "in": "body", + "rawType": "boolean", + "rawDescription": "Set to `true` if you want to automatically dismiss approving reviews when someone pushes a new commit.", + "childParamsGroups": [] + }, + { + "type": "boolean", + "description": "

Blocks merging pull requests until code owners review them.

", + "name": "require_code_owner_reviews", + "in": "body", + "rawType": "boolean", + "rawDescription": "Blocks merging pull requests until [code owners](https://docs.github.com/articles/about-code-owners/) review them.", + "childParamsGroups": [] + }, + { + "type": "integer", + "description": "

Specify the number of reviewers required to approve pull requests. Use a number between 1 and 6 or 0 to not require reviewers.

", + "name": "required_approving_review_count", + "in": "body", + "rawType": "integer", + "rawDescription": "Specify the number of reviewers required to approve pull requests. Use a number between 1 and 6 or 0 to not require reviewers.", + "childParamsGroups": [] + }, + { + "type": "object", + "description": "

Allow specific users or teams to bypass pull request requirements.

", + "properties": { + "users": { + "type": "array of strings", + "description": "

The list of user logins allowed to bypass pull request requirements.

", + "items": { + "type": "string" + }, + "name": "users", + "in": "body", + "rawType": "array", + "rawDescription": "The list of user `login`s allowed to bypass pull request requirements.", + "childParamsGroups": [] + }, + "teams": { + "type": "array of strings", + "description": "

The list of team slugs allowed to bypass pull request requirements.

", + "items": { + "type": "string" + }, + "name": "teams", + "in": "body", + "rawType": "array", + "rawDescription": "The list of team `slug`s allowed to bypass pull request requirements.", + "childParamsGroups": [] + } + }, + "name": "bypass_pull_request_allowances", + "in": "body", + "rawType": "object", + "rawDescription": "Allow specific users or teams to bypass pull request requirements.", + "childParamsGroups": [ + { + "parentName": "bypass_pull_request_allowances", + "parentType": "object", + "id": "bypass_pull_request_allowances-object", + "params": [ + { + "type": "array of strings", + "description": "

The list of user logins allowed to bypass pull request requirements.

", + "items": { + "type": "string" + }, + "name": "users", + "in": "body", + "rawType": "array", + "rawDescription": "The list of user `login`s allowed to bypass pull request requirements.", + "childParamsGroups": [] + }, + { + "type": "array of strings", + "description": "

The list of team slugs allowed to bypass pull request requirements.

", + "items": { + "type": "string" + }, + "name": "teams", + "in": "body", + "rawType": "array", + "rawDescription": "The list of team `slug`s allowed to bypass pull request requirements.", + "childParamsGroups": [] + } + ] + } + ] + } + ] + }, + { + "parentName": "dismissal_restrictions", + "parentType": "object", + "id": "dismissal_restrictions-object", + "params": [ + { + "type": "array of strings", + "description": "

The list of user logins with dismissal access

", + "items": { + "type": "string" + }, + "name": "users", + "in": "body", + "rawType": "array", + "rawDescription": "The list of user `login`s with dismissal access", + "childParamsGroups": [] + }, + { + "type": "array of strings", + "description": "

The list of team slugs with dismissal access

", + "items": { + "type": "string" + }, + "name": "teams", + "in": "body", + "rawType": "array", + "rawDescription": "The list of team `slug`s with dismissal access", + "childParamsGroups": [] + } + ] + }, + { + "parentName": "bypass_pull_request_allowances", + "parentType": "object", + "id": "bypass_pull_request_allowances-object", + "params": [ + { + "type": "array of strings", + "description": "

The list of user logins allowed to bypass pull request requirements.

", + "items": { + "type": "string" + }, + "name": "users", + "in": "body", + "rawType": "array", + "rawDescription": "The list of user `login`s allowed to bypass pull request requirements.", + "childParamsGroups": [] + }, + { + "type": "array of strings", + "description": "

The list of team slugs allowed to bypass pull request requirements.

", + "items": { + "type": "string" + }, + "name": "teams", + "in": "body", + "rawType": "array", + "rawDescription": "The list of team `slug`s allowed to bypass pull request requirements.", + "childParamsGroups": [] + } + ] + } + ] }, { "type": "object or null", "description": "

Required. Restrict who can push to the protected branch. User, app, and team restrictions are only available for organization-owned repositories. Set to null to disable.

", "properties": { "users": { - "type": "array", - "description": "The list of user `login`s with push access", + "type": "array of strings", + "description": "

Required. The list of user logins with push access

", "items": { "type": "string" - } + }, + "name": "users", + "in": "body", + "rawType": "array", + "rawDescription": "The list of user `login`s with push access", + "childParamsGroups": [] }, "teams": { - "type": "array", - "description": "The list of team `slug`s with push access", + "type": "array of strings", + "description": "

Required. The list of team slugs with push access

", "items": { "type": "string" - } + }, + "name": "teams", + "in": "body", + "rawType": "array", + "rawDescription": "The list of team `slug`s with push access", + "childParamsGroups": [] }, "apps": { - "type": "array", - "description": "The list of app `slug`s with push access", + "type": "array of strings", + "description": "

The list of app slugs with push access

", "items": { "type": "string" - } + }, + "name": "apps", + "in": "body", + "rawType": "array", + "rawDescription": "The list of app `slug`s with push access", + "childParamsGroups": [] } }, "required": [ @@ -20245,7 +20767,51 @@ "null" ], "rawDescription": "Restrict who can push to the protected branch. User, app, and team `restrictions` are only available for organization-owned repositories. Set to `null` to disable.", - "childParamsGroups": [] + "childParamsGroups": [ + { + "parentName": "restrictions", + "parentType": "object", + "id": "restrictions-object", + "params": [ + { + "type": "array of strings", + "description": "

Required. The list of user logins with push access

", + "items": { + "type": "string" + }, + "name": "users", + "in": "body", + "rawType": "array", + "rawDescription": "The list of user `login`s with push access", + "childParamsGroups": [] + }, + { + "type": "array of strings", + "description": "

Required. The list of team slugs with push access

", + "items": { + "type": "string" + }, + "name": "teams", + "in": "body", + "rawType": "array", + "rawDescription": "The list of team `slug`s with push access", + "childParamsGroups": [] + }, + { + "type": "array of strings", + "description": "

The list of app slugs with push access

", + "items": { + "type": "string" + }, + "name": "apps", + "in": "body", + "rawType": "array", + "rawDescription": "The list of app `slug`s with push access", + "childParamsGroups": [] + } + ] + } + ] }, { "type": "boolean", @@ -36395,11 +36961,21 @@ "properties": { "protected_branches": { "type": "boolean", - "description": "Whether only branches with branch protection rules can deploy to this environment. If `protected_branches` is `true`, `custom_branch_policies` must be `false`; if `protected_branches` is `false`, `custom_branch_policies` must be `true`." + "description": "

Required. Whether only branches with branch protection rules can deploy to this environment. If protected_branches is true, custom_branch_policies must be false; if protected_branches is false, custom_branch_policies must be true.

", + "name": "protected_branches", + "in": "body", + "rawType": "boolean", + "rawDescription": "Whether only branches with branch protection rules can deploy to this environment. If `protected_branches` is `true`, `custom_branch_policies` must be `false`; if `protected_branches` is `false`, `custom_branch_policies` must be `true`.", + "childParamsGroups": [] }, "custom_branch_policies": { "type": "boolean", - "description": "Whether only branches that match the specified name patterns can deploy to this environment. If `custom_branch_policies` is `true`, `protected_branches` must be `false`; if `custom_branch_policies` is `false`, `protected_branches` must be `true`." + "description": "

Required. Whether only branches that match the specified name patterns can deploy to this environment. If custom_branch_policies is true, protected_branches must be false; if custom_branch_policies is false, protected_branches must be true.

", + "name": "custom_branch_policies", + "in": "body", + "rawType": "boolean", + "rawDescription": "Whether only branches that match the specified name patterns can deploy to this environment. If `custom_branch_policies` is `true`, `protected_branches` must be `false`; if `custom_branch_policies` is `false`, `protected_branches` must be `true`.", + "childParamsGroups": [] } }, "required": [ @@ -36413,7 +36989,33 @@ "null" ], "rawDescription": "The type of deployment branch policy for this environment. To allow all branches to deploy, set to `null`.", - "childParamsGroups": [] + "childParamsGroups": [ + { + "parentName": "deployment_branch_policy", + "parentType": "object", + "id": "deployment_branch_policy-object", + "params": [ + { + "type": "boolean", + "description": "

Required. Whether only branches with branch protection rules can deploy to this environment. If protected_branches is true, custom_branch_policies must be false; if protected_branches is false, custom_branch_policies must be true.

", + "name": "protected_branches", + "in": "body", + "rawType": "boolean", + "rawDescription": "Whether only branches with branch protection rules can deploy to this environment. If `protected_branches` is `true`, `custom_branch_policies` must be `false`; if `protected_branches` is `false`, `custom_branch_policies` must be `true`.", + "childParamsGroups": [] + }, + { + "type": "boolean", + "description": "

Required. Whether only branches that match the specified name patterns can deploy to this environment. If custom_branch_policies is true, protected_branches must be false; if custom_branch_policies is false, protected_branches must be true.

", + "name": "custom_branch_policies", + "in": "body", + "rawType": "boolean", + "rawDescription": "Whether only branches that match the specified name patterns can deploy to this environment. If `custom_branch_policies` is `true`, `protected_branches` must be `false`; if `custom_branch_policies` is `false`, `protected_branches` must be `true`.", + "childParamsGroups": [] + } + ] + } + ] } ], "enabledForGitHubApps": true, @@ -76283,33 +76885,114 @@ "properties": { "advanced_security": { "type": "object", - "description": "Use the `status` property to enable or disable GitHub Advanced Security for this repository. For more information, see \"[About GitHub Advanced Security](/github/getting-started-with-github/learning-about-github/about-github-advanced-security).\"", + "description": "

Use the status property to enable or disable GitHub Advanced Security for this repository. For more information, see \"About GitHub Advanced Security.\"

", "properties": { "status": { "type": "string", - "description": "Can be `enabled` or `disabled`." + "description": "

Can be enabled or disabled.

", + "name": "status", + "in": "body", + "rawType": "string", + "rawDescription": "Can be `enabled` or `disabled`.", + "childParamsGroups": [] } - } + }, + "name": "advanced_security", + "in": "body", + "rawType": "object", + "rawDescription": "Use the `status` property to enable or disable GitHub Advanced Security for this repository. For more information, see \"[About GitHub Advanced Security](/github/getting-started-with-github/learning-about-github/about-github-advanced-security).\"", + "childParamsGroups": [ + { + "parentName": "advanced_security", + "parentType": "object", + "id": "advanced_security-object", + "params": [ + { + "type": "string", + "description": "

Can be enabled or disabled.

", + "name": "status", + "in": "body", + "rawType": "string", + "rawDescription": "Can be `enabled` or `disabled`.", + "childParamsGroups": [] + } + ] + } + ] }, "secret_scanning": { "type": "object", - "description": "Use the `status` property to enable or disable secret scanning for this repository. For more information, see \"[About secret scanning](/code-security/secret-security/about-secret-scanning).\"", + "description": "

Use the status property to enable or disable secret scanning for this repository. For more information, see \"About secret scanning.\"

", "properties": { "status": { "type": "string", - "description": "Can be `enabled` or `disabled`." + "description": "

Can be enabled or disabled.

", + "name": "status", + "in": "body", + "rawType": "string", + "rawDescription": "Can be `enabled` or `disabled`.", + "childParamsGroups": [] } - } + }, + "name": "secret_scanning", + "in": "body", + "rawType": "object", + "rawDescription": "Use the `status` property to enable or disable secret scanning for this repository. For more information, see \"[About secret scanning](/code-security/secret-security/about-secret-scanning).\"", + "childParamsGroups": [ + { + "parentName": "secret_scanning", + "parentType": "object", + "id": "secret_scanning-object", + "params": [ + { + "type": "string", + "description": "

Can be enabled or disabled.

", + "name": "status", + "in": "body", + "rawType": "string", + "rawDescription": "Can be `enabled` or `disabled`.", + "childParamsGroups": [] + } + ] + } + ] }, "secret_scanning_push_protection": { "type": "object", - "description": "Use the `status` property to enable or disable secret scanning push protection for this repository. For more information, see \"[Protecting pushes with secret scanning](/enterprise-cloud@latest/code-security/secret-scanning/protecting-pushes-with-secret-scanning).\"", + "description": "

Use the status property to enable or disable secret scanning push protection for this repository. For more information, see \"Protecting pushes with secret scanning.\"

", "properties": { "status": { "type": "string", - "description": "Can be `enabled` or `disabled`." + "description": "

Can be enabled or disabled.

", + "name": "status", + "in": "body", + "rawType": "string", + "rawDescription": "Can be `enabled` or `disabled`.", + "childParamsGroups": [] } - } + }, + "name": "secret_scanning_push_protection", + "in": "body", + "rawType": "object", + "rawDescription": "Use the `status` property to enable or disable secret scanning push protection for this repository. For more information, see \"[Protecting pushes with secret scanning](/enterprise-cloud@latest/code-security/secret-scanning/protecting-pushes-with-secret-scanning).\"", + "childParamsGroups": [ + { + "parentName": "secret_scanning_push_protection", + "parentType": "object", + "id": "secret_scanning_push_protection-object", + "params": [ + { + "type": "string", + "description": "

Can be enabled or disabled.

", + "name": "status", + "in": "body", + "rawType": "string", + "rawDescription": "Can be `enabled` or `disabled`.", + "childParamsGroups": [] + } + ] + } + ] } }, "name": "security_and_analysis", @@ -76319,7 +77002,174 @@ "null" ], "rawDescription": "Specify which security and analysis features to enable or disable. For example, to enable GitHub Advanced Security, use this data in the body of the PATCH request: `{\"security_and_analysis\": {\"advanced_security\": {\"status\": \"enabled\"}}}`. If you have admin permissions for a private repository covered by an Advanced Security license, you can check which security and analysis features are currently enabled by using a `GET /repos/{owner}/{repo}` request.", - "childParamsGroups": [] + "childParamsGroups": [ + { + "parentName": "security_and_analysis", + "parentType": "object", + "id": "security_and_analysis-object", + "params": [ + { + "type": "object", + "description": "

Use the status property to enable or disable GitHub Advanced Security for this repository. For more information, see \"About GitHub Advanced Security.\"

", + "properties": { + "status": { + "type": "string", + "description": "

Can be enabled or disabled.

", + "name": "status", + "in": "body", + "rawType": "string", + "rawDescription": "Can be `enabled` or `disabled`.", + "childParamsGroups": [] + } + }, + "name": "advanced_security", + "in": "body", + "rawType": "object", + "rawDescription": "Use the `status` property to enable or disable GitHub Advanced Security for this repository. For more information, see \"[About GitHub Advanced Security](/github/getting-started-with-github/learning-about-github/about-github-advanced-security).\"", + "childParamsGroups": [ + { + "parentName": "advanced_security", + "parentType": "object", + "id": "advanced_security-object", + "params": [ + { + "type": "string", + "description": "

Can be enabled or disabled.

", + "name": "status", + "in": "body", + "rawType": "string", + "rawDescription": "Can be `enabled` or `disabled`.", + "childParamsGroups": [] + } + ] + } + ] + }, + { + "type": "object", + "description": "

Use the status property to enable or disable secret scanning for this repository. For more information, see \"About secret scanning.\"

", + "properties": { + "status": { + "type": "string", + "description": "

Can be enabled or disabled.

", + "name": "status", + "in": "body", + "rawType": "string", + "rawDescription": "Can be `enabled` or `disabled`.", + "childParamsGroups": [] + } + }, + "name": "secret_scanning", + "in": "body", + "rawType": "object", + "rawDescription": "Use the `status` property to enable or disable secret scanning for this repository. For more information, see \"[About secret scanning](/code-security/secret-security/about-secret-scanning).\"", + "childParamsGroups": [ + { + "parentName": "secret_scanning", + "parentType": "object", + "id": "secret_scanning-object", + "params": [ + { + "type": "string", + "description": "

Can be enabled or disabled.

", + "name": "status", + "in": "body", + "rawType": "string", + "rawDescription": "Can be `enabled` or `disabled`.", + "childParamsGroups": [] + } + ] + } + ] + }, + { + "type": "object", + "description": "

Use the status property to enable or disable secret scanning push protection for this repository. For more information, see \"Protecting pushes with secret scanning.\"

", + "properties": { + "status": { + "type": "string", + "description": "

Can be enabled or disabled.

", + "name": "status", + "in": "body", + "rawType": "string", + "rawDescription": "Can be `enabled` or `disabled`.", + "childParamsGroups": [] + } + }, + "name": "secret_scanning_push_protection", + "in": "body", + "rawType": "object", + "rawDescription": "Use the `status` property to enable or disable secret scanning push protection for this repository. For more information, see \"[Protecting pushes with secret scanning](/enterprise-cloud@latest/code-security/secret-scanning/protecting-pushes-with-secret-scanning).\"", + "childParamsGroups": [ + { + "parentName": "secret_scanning_push_protection", + "parentType": "object", + "id": "secret_scanning_push_protection-object", + "params": [ + { + "type": "string", + "description": "

Can be enabled or disabled.

", + "name": "status", + "in": "body", + "rawType": "string", + "rawDescription": "Can be `enabled` or `disabled`.", + "childParamsGroups": [] + } + ] + } + ] + } + ] + }, + { + "parentName": "advanced_security", + "parentType": "object", + "id": "advanced_security-object", + "params": [ + { + "type": "string", + "description": "

Can be enabled or disabled.

", + "name": "status", + "in": "body", + "rawType": "string", + "rawDescription": "Can be `enabled` or `disabled`.", + "childParamsGroups": [] + } + ] + }, + { + "parentName": "secret_scanning", + "parentType": "object", + "id": "secret_scanning-object", + "params": [ + { + "type": "string", + "description": "

Can be enabled or disabled.

", + "name": "status", + "in": "body", + "rawType": "string", + "rawDescription": "Can be `enabled` or `disabled`.", + "childParamsGroups": [] + } + ] + }, + { + "parentName": "secret_scanning_push_protection", + "parentType": "object", + "id": "secret_scanning_push_protection-object", + "params": [ + { + "type": "string", + "description": "

Can be enabled or disabled.

", + "name": "status", + "in": "body", + "rawType": "string", + "rawDescription": "Can be `enabled` or `disabled`.", + "childParamsGroups": [] + } + ] + } + ] }, { "type": "boolean", diff --git a/lib/rest/static/decorated/github.ae.json b/lib/rest/static/decorated/github.ae.json index 360e9d911f..6c0b571d3e 100644 --- a/lib/rest/static/decorated/github.ae.json +++ b/lib/rest/static/decorated/github.ae.json @@ -15998,19 +15998,29 @@ "properties": { "strict": { "type": "boolean", - "description": "Require branches to be up to date before merging." + "description": "

Required. Require branches to be up to date before merging.

", + "name": "strict", + "in": "body", + "rawType": "boolean", + "rawDescription": "Require branches to be up to date before merging.", + "childParamsGroups": [] }, "contexts": { - "type": "array", + "type": "array of strings", "deprecated": true, - "description": "**Deprecated**: 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.\n", + "description": "

Required. Deprecated: 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.

", "items": { "type": "string" - } + }, + "name": "contexts", + "in": "body", + "rawType": "array", + "rawDescription": "**Deprecated**: 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.\n", + "childParamsGroups": [] }, "checks": { - "type": "array", - "description": "The list of status checks to require in order to merge into this branch.", + "type": "array of objects", + "description": "

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

", "items": { "type": "object", "required": [ @@ -16019,14 +16029,55 @@ "properties": { "context": { "type": "string", - "description": "The name of the required check" + "description": "

Required. The name of the required check

", + "name": "context", + "in": "body", + "rawType": "string", + "rawDescription": "The name of the required check", + "childParamsGroups": [] }, "app_id": { "type": "integer", - "description": "The ID of the GitHub App that must provide this check. Omit this field to automatically select the GitHub App that has recently provided this check, or any app if it was not set by a GitHub App. Pass -1 to explicitly allow any app to set the status." + "description": "

The ID of the GitHub App that must provide this check. Omit this field to automatically select the GitHub App that has recently provided this check, or any app if it was not set by a GitHub App. Pass -1 to explicitly allow any app to set the status.

", + "name": "app_id", + "in": "body", + "rawType": "integer", + "rawDescription": "The ID of the GitHub App that must provide this check. Omit this field to automatically select the GitHub App that has recently provided this check, or any app if it was not set by a GitHub App. Pass -1 to explicitly allow any app to set the status.", + "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": "

Required. The name of the required check

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

The ID of the GitHub App that must provide this check. Omit this field to automatically select the GitHub App that has recently provided this check, or any app if it was not set by a GitHub App. Pass -1 to explicitly allow any app to set the status.

", + "name": "app_id", + "in": "body", + "rawType": "integer", + "rawDescription": "The ID of the GitHub App that must provide this check. Omit this field to automatically select the GitHub App that has recently provided this check, or any app if it was not set by a GitHub App. Pass -1 to explicitly allow any app to set the status.", + "childParamsGroups": [] + } + ] + } + ] } }, "required": [ @@ -16040,7 +16091,123 @@ "null" ], "rawDescription": "Require status checks to pass before merging. Set to `null` to disable.", - "childParamsGroups": [] + "childParamsGroups": [ + { + "parentName": "required_status_checks", + "parentType": "object", + "id": "required_status_checks-object", + "params": [ + { + "type": "boolean", + "description": "

Required. Require branches to be up to date before merging.

", + "name": "strict", + "in": "body", + "rawType": "boolean", + "rawDescription": "Require branches to be up to date before merging.", + "childParamsGroups": [] + }, + { + "type": "array of strings", + "deprecated": true, + "description": "

Required. Deprecated: 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.

", + "items": { + "type": "string" + }, + "name": "contexts", + "in": "body", + "rawType": "array", + "rawDescription": "**Deprecated**: 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.\n", + "childParamsGroups": [] + }, + { + "type": "array of objects", + "description": "

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

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

Required. The name of the required check

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

The ID of the GitHub App that must provide this check. Omit this field to automatically select the GitHub App that has recently provided this check, or any app if it was not set by a GitHub App. Pass -1 to explicitly allow any app to set the status.

", + "name": "app_id", + "in": "body", + "rawType": "integer", + "rawDescription": "The ID of the GitHub App that must provide this check. Omit this field to automatically select the GitHub App that has recently provided this check, or any app if it was not set by a GitHub App. Pass -1 to explicitly allow any app to set the status.", + "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": "

Required. The name of the required check

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

The ID of the GitHub App that must provide this check. Omit this field to automatically select the GitHub App that has recently provided this check, or any app if it was not set by a GitHub App. Pass -1 to explicitly allow any app to set the status.

", + "name": "app_id", + "in": "body", + "rawType": "integer", + "rawDescription": "The ID of the GitHub App that must provide this check. Omit this field to automatically select the GitHub App that has recently provided this check, or any app if it was not set by a GitHub App. Pass -1 to explicitly allow any app to set the status.", + "childParamsGroups": [] + } + ] + } + ] + } + ] + }, + { + "parentName": "checks", + "parentType": "items", + "id": "checks-items", + "params": [ + { + "type": "string", + "description": "

Required. The name of the required check

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

The ID of the GitHub App that must provide this check. Omit this field to automatically select the GitHub App that has recently provided this check, or any app if it was not set by a GitHub App. Pass -1 to explicitly allow any app to set the status.

", + "name": "app_id", + "in": "body", + "rawType": "integer", + "rawDescription": "The ID of the GitHub App that must provide this check. Omit this field to automatically select the GitHub App that has recently provided this check, or any app if it was not set by a GitHub App. Pass -1 to explicitly allow any app to set the status.", + "childParamsGroups": [] + } + ] + } + ] }, { "type": "boolean or null", @@ -16060,55 +16227,164 @@ "properties": { "dismissal_restrictions": { "type": "object", - "description": "Specify which users and teams can dismiss pull request reviews. Pass an empty `dismissal_restrictions` object to disable. User and team `dismissal_restrictions` are only available for organization-owned repositories. Omit this parameter for personal repositories.", + "description": "

Specify which users and teams can dismiss pull request reviews. Pass an empty dismissal_restrictions object to disable. User and team dismissal_restrictions are only available for organization-owned repositories. Omit this parameter for personal repositories.

", "properties": { "users": { - "type": "array", - "description": "The list of user `login`s with dismissal access", + "type": "array of strings", + "description": "

The list of user logins with dismissal access

", "items": { "type": "string" - } + }, + "name": "users", + "in": "body", + "rawType": "array", + "rawDescription": "The list of user `login`s with dismissal access", + "childParamsGroups": [] }, "teams": { - "type": "array", - "description": "The list of team `slug`s with dismissal access", + "type": "array of strings", + "description": "

The list of team slugs with dismissal access

", "items": { "type": "string" - } + }, + "name": "teams", + "in": "body", + "rawType": "array", + "rawDescription": "The list of team `slug`s with dismissal access", + "childParamsGroups": [] } - } + }, + "name": "dismissal_restrictions", + "in": "body", + "rawType": "object", + "rawDescription": "Specify which users and teams can dismiss pull request reviews. Pass an empty `dismissal_restrictions` object to disable. User and team `dismissal_restrictions` are only available for organization-owned repositories. Omit this parameter for personal repositories.", + "childParamsGroups": [ + { + "parentName": "dismissal_restrictions", + "parentType": "object", + "id": "dismissal_restrictions-object", + "params": [ + { + "type": "array of strings", + "description": "

The list of user logins with dismissal access

", + "items": { + "type": "string" + }, + "name": "users", + "in": "body", + "rawType": "array", + "rawDescription": "The list of user `login`s with dismissal access", + "childParamsGroups": [] + }, + { + "type": "array of strings", + "description": "

The list of team slugs with dismissal access

", + "items": { + "type": "string" + }, + "name": "teams", + "in": "body", + "rawType": "array", + "rawDescription": "The list of team `slug`s with dismissal access", + "childParamsGroups": [] + } + ] + } + ] }, "dismiss_stale_reviews": { "type": "boolean", - "description": "Set to `true` if you want to automatically dismiss approving reviews when someone pushes a new commit." + "description": "

Set to true if you want to automatically dismiss approving reviews when someone pushes a new commit.

", + "name": "dismiss_stale_reviews", + "in": "body", + "rawType": "boolean", + "rawDescription": "Set to `true` if you want to automatically dismiss approving reviews when someone pushes a new commit.", + "childParamsGroups": [] }, "require_code_owner_reviews": { "type": "boolean", - "description": "Blocks merging pull requests until [code owners](https://docs.github.com/articles/about-code-owners/) review them." + "description": "

Blocks merging pull requests until code owners review them.

", + "name": "require_code_owner_reviews", + "in": "body", + "rawType": "boolean", + "rawDescription": "Blocks merging pull requests until [code owners](https://docs.github.com/articles/about-code-owners/) review them.", + "childParamsGroups": [] }, "required_approving_review_count": { "type": "integer", - "description": "Specify the number of reviewers required to approve pull requests. Use a number between 1 and 6 or 0 to not require reviewers." + "description": "

Specify the number of reviewers required to approve pull requests. Use a number between 1 and 6 or 0 to not require reviewers.

", + "name": "required_approving_review_count", + "in": "body", + "rawType": "integer", + "rawDescription": "Specify the number of reviewers required to approve pull requests. Use a number between 1 and 6 or 0 to not require reviewers.", + "childParamsGroups": [] }, "bypass_pull_request_allowances": { "type": "object", - "description": "Allow specific users or teams to bypass pull request requirements.", + "description": "

Allow specific users or teams to bypass pull request requirements.

", "properties": { "users": { - "type": "array", - "description": "The list of user `login`s allowed to bypass pull request requirements.", + "type": "array of strings", + "description": "

The list of user logins allowed to bypass pull request requirements.

", "items": { "type": "string" - } + }, + "name": "users", + "in": "body", + "rawType": "array", + "rawDescription": "The list of user `login`s allowed to bypass pull request requirements.", + "childParamsGroups": [] }, "teams": { - "type": "array", - "description": "The list of team `slug`s allowed to bypass pull request requirements.", + "type": "array of strings", + "description": "

The list of team slugs allowed to bypass pull request requirements.

", "items": { "type": "string" - } + }, + "name": "teams", + "in": "body", + "rawType": "array", + "rawDescription": "The list of team `slug`s allowed to bypass pull request requirements.", + "childParamsGroups": [] } - } + }, + "name": "bypass_pull_request_allowances", + "in": "body", + "rawType": "object", + "rawDescription": "Allow specific users or teams to bypass pull request requirements.", + "childParamsGroups": [ + { + "parentName": "bypass_pull_request_allowances", + "parentType": "object", + "id": "bypass_pull_request_allowances-object", + "params": [ + { + "type": "array of strings", + "description": "

The list of user logins allowed to bypass pull request requirements.

", + "items": { + "type": "string" + }, + "name": "users", + "in": "body", + "rawType": "array", + "rawDescription": "The list of user `login`s allowed to bypass pull request requirements.", + "childParamsGroups": [] + }, + { + "type": "array of strings", + "description": "

The list of team slugs allowed to bypass pull request requirements.

", + "items": { + "type": "string" + }, + "name": "teams", + "in": "body", + "rawType": "array", + "rawDescription": "The list of team `slug`s allowed to bypass pull request requirements.", + "childParamsGroups": [] + } + ] + } + ] } }, "name": "required_pull_request_reviews", @@ -16118,32 +16394,278 @@ "null" ], "rawDescription": "Require at least one approving review on a pull request, before merging. Set to `null` to disable.", - "childParamsGroups": [] + "childParamsGroups": [ + { + "parentName": "required_pull_request_reviews", + "parentType": "object", + "id": "required_pull_request_reviews-object", + "params": [ + { + "type": "object", + "description": "

Specify which users and teams can dismiss pull request reviews. Pass an empty dismissal_restrictions object to disable. User and team dismissal_restrictions are only available for organization-owned repositories. Omit this parameter for personal repositories.

", + "properties": { + "users": { + "type": "array of strings", + "description": "

The list of user logins with dismissal access

", + "items": { + "type": "string" + }, + "name": "users", + "in": "body", + "rawType": "array", + "rawDescription": "The list of user `login`s with dismissal access", + "childParamsGroups": [] + }, + "teams": { + "type": "array of strings", + "description": "

The list of team slugs with dismissal access

", + "items": { + "type": "string" + }, + "name": "teams", + "in": "body", + "rawType": "array", + "rawDescription": "The list of team `slug`s with dismissal access", + "childParamsGroups": [] + } + }, + "name": "dismissal_restrictions", + "in": "body", + "rawType": "object", + "rawDescription": "Specify which users and teams can dismiss pull request reviews. Pass an empty `dismissal_restrictions` object to disable. User and team `dismissal_restrictions` are only available for organization-owned repositories. Omit this parameter for personal repositories.", + "childParamsGroups": [ + { + "parentName": "dismissal_restrictions", + "parentType": "object", + "id": "dismissal_restrictions-object", + "params": [ + { + "type": "array of strings", + "description": "

The list of user logins with dismissal access

", + "items": { + "type": "string" + }, + "name": "users", + "in": "body", + "rawType": "array", + "rawDescription": "The list of user `login`s with dismissal access", + "childParamsGroups": [] + }, + { + "type": "array of strings", + "description": "

The list of team slugs with dismissal access

", + "items": { + "type": "string" + }, + "name": "teams", + "in": "body", + "rawType": "array", + "rawDescription": "The list of team `slug`s with dismissal access", + "childParamsGroups": [] + } + ] + } + ] + }, + { + "type": "boolean", + "description": "

Set to true if you want to automatically dismiss approving reviews when someone pushes a new commit.

", + "name": "dismiss_stale_reviews", + "in": "body", + "rawType": "boolean", + "rawDescription": "Set to `true` if you want to automatically dismiss approving reviews when someone pushes a new commit.", + "childParamsGroups": [] + }, + { + "type": "boolean", + "description": "

Blocks merging pull requests until code owners review them.

", + "name": "require_code_owner_reviews", + "in": "body", + "rawType": "boolean", + "rawDescription": "Blocks merging pull requests until [code owners](https://docs.github.com/articles/about-code-owners/) review them.", + "childParamsGroups": [] + }, + { + "type": "integer", + "description": "

Specify the number of reviewers required to approve pull requests. Use a number between 1 and 6 or 0 to not require reviewers.

", + "name": "required_approving_review_count", + "in": "body", + "rawType": "integer", + "rawDescription": "Specify the number of reviewers required to approve pull requests. Use a number between 1 and 6 or 0 to not require reviewers.", + "childParamsGroups": [] + }, + { + "type": "object", + "description": "

Allow specific users or teams to bypass pull request requirements.

", + "properties": { + "users": { + "type": "array of strings", + "description": "

The list of user logins allowed to bypass pull request requirements.

", + "items": { + "type": "string" + }, + "name": "users", + "in": "body", + "rawType": "array", + "rawDescription": "The list of user `login`s allowed to bypass pull request requirements.", + "childParamsGroups": [] + }, + "teams": { + "type": "array of strings", + "description": "

The list of team slugs allowed to bypass pull request requirements.

", + "items": { + "type": "string" + }, + "name": "teams", + "in": "body", + "rawType": "array", + "rawDescription": "The list of team `slug`s allowed to bypass pull request requirements.", + "childParamsGroups": [] + } + }, + "name": "bypass_pull_request_allowances", + "in": "body", + "rawType": "object", + "rawDescription": "Allow specific users or teams to bypass pull request requirements.", + "childParamsGroups": [ + { + "parentName": "bypass_pull_request_allowances", + "parentType": "object", + "id": "bypass_pull_request_allowances-object", + "params": [ + { + "type": "array of strings", + "description": "

The list of user logins allowed to bypass pull request requirements.

", + "items": { + "type": "string" + }, + "name": "users", + "in": "body", + "rawType": "array", + "rawDescription": "The list of user `login`s allowed to bypass pull request requirements.", + "childParamsGroups": [] + }, + { + "type": "array of strings", + "description": "

The list of team slugs allowed to bypass pull request requirements.

", + "items": { + "type": "string" + }, + "name": "teams", + "in": "body", + "rawType": "array", + "rawDescription": "The list of team `slug`s allowed to bypass pull request requirements.", + "childParamsGroups": [] + } + ] + } + ] + } + ] + }, + { + "parentName": "dismissal_restrictions", + "parentType": "object", + "id": "dismissal_restrictions-object", + "params": [ + { + "type": "array of strings", + "description": "

The list of user logins with dismissal access

", + "items": { + "type": "string" + }, + "name": "users", + "in": "body", + "rawType": "array", + "rawDescription": "The list of user `login`s with dismissal access", + "childParamsGroups": [] + }, + { + "type": "array of strings", + "description": "

The list of team slugs with dismissal access

", + "items": { + "type": "string" + }, + "name": "teams", + "in": "body", + "rawType": "array", + "rawDescription": "The list of team `slug`s with dismissal access", + "childParamsGroups": [] + } + ] + }, + { + "parentName": "bypass_pull_request_allowances", + "parentType": "object", + "id": "bypass_pull_request_allowances-object", + "params": [ + { + "type": "array of strings", + "description": "

The list of user logins allowed to bypass pull request requirements.

", + "items": { + "type": "string" + }, + "name": "users", + "in": "body", + "rawType": "array", + "rawDescription": "The list of user `login`s allowed to bypass pull request requirements.", + "childParamsGroups": [] + }, + { + "type": "array of strings", + "description": "

The list of team slugs allowed to bypass pull request requirements.

", + "items": { + "type": "string" + }, + "name": "teams", + "in": "body", + "rawType": "array", + "rawDescription": "The list of team `slug`s allowed to bypass pull request requirements.", + "childParamsGroups": [] + } + ] + } + ] }, { "type": "object or null", "description": "

Required. Restrict who can push to the protected branch. User, app, and team restrictions are only available for organization-owned repositories. Set to null to disable.

", "properties": { "users": { - "type": "array", - "description": "The list of user `login`s with push access", + "type": "array of strings", + "description": "

Required. The list of user logins with push access

", "items": { "type": "string" - } + }, + "name": "users", + "in": "body", + "rawType": "array", + "rawDescription": "The list of user `login`s with push access", + "childParamsGroups": [] }, "teams": { - "type": "array", - "description": "The list of team `slug`s with push access", + "type": "array of strings", + "description": "

Required. The list of team slugs with push access

", "items": { "type": "string" - } + }, + "name": "teams", + "in": "body", + "rawType": "array", + "rawDescription": "The list of team `slug`s with push access", + "childParamsGroups": [] }, "apps": { - "type": "array", - "description": "The list of app `slug`s with push access", + "type": "array of strings", + "description": "

The list of app slugs with push access

", "items": { "type": "string" - } + }, + "name": "apps", + "in": "body", + "rawType": "array", + "rawDescription": "The list of app `slug`s with push access", + "childParamsGroups": [] } }, "required": [ @@ -16157,7 +16679,51 @@ "null" ], "rawDescription": "Restrict who can push to the protected branch. User, app, and team `restrictions` are only available for organization-owned repositories. Set to `null` to disable.", - "childParamsGroups": [] + "childParamsGroups": [ + { + "parentName": "restrictions", + "parentType": "object", + "id": "restrictions-object", + "params": [ + { + "type": "array of strings", + "description": "

Required. The list of user logins with push access

", + "items": { + "type": "string" + }, + "name": "users", + "in": "body", + "rawType": "array", + "rawDescription": "The list of user `login`s with push access", + "childParamsGroups": [] + }, + { + "type": "array of strings", + "description": "

Required. The list of team slugs with push access

", + "items": { + "type": "string" + }, + "name": "teams", + "in": "body", + "rawType": "array", + "rawDescription": "The list of team `slug`s with push access", + "childParamsGroups": [] + }, + { + "type": "array of strings", + "description": "

The list of app slugs with push access

", + "items": { + "type": "string" + }, + "name": "apps", + "in": "body", + "rawType": "array", + "rawDescription": "The list of app `slug`s with push access", + "childParamsGroups": [] + } + ] + } + ] }, { "type": "boolean", @@ -31096,11 +31662,21 @@ "properties": { "protected_branches": { "type": "boolean", - "description": "Whether only branches with branch protection rules can deploy to this environment. If `protected_branches` is `true`, `custom_branch_policies` must be `false`; if `protected_branches` is `false`, `custom_branch_policies` must be `true`." + "description": "

Required. Whether only branches with branch protection rules can deploy to this environment. If protected_branches is true, custom_branch_policies must be false; if protected_branches is false, custom_branch_policies must be true.

", + "name": "protected_branches", + "in": "body", + "rawType": "boolean", + "rawDescription": "Whether only branches with branch protection rules can deploy to this environment. If `protected_branches` is `true`, `custom_branch_policies` must be `false`; if `protected_branches` is `false`, `custom_branch_policies` must be `true`.", + "childParamsGroups": [] }, "custom_branch_policies": { "type": "boolean", - "description": "Whether only branches that match the specified name patterns can deploy to this environment. If `custom_branch_policies` is `true`, `protected_branches` must be `false`; if `custom_branch_policies` is `false`, `protected_branches` must be `true`." + "description": "

Required. Whether only branches that match the specified name patterns can deploy to this environment. If custom_branch_policies is true, protected_branches must be false; if custom_branch_policies is false, protected_branches must be true.

", + "name": "custom_branch_policies", + "in": "body", + "rawType": "boolean", + "rawDescription": "Whether only branches that match the specified name patterns can deploy to this environment. If `custom_branch_policies` is `true`, `protected_branches` must be `false`; if `custom_branch_policies` is `false`, `protected_branches` must be `true`.", + "childParamsGroups": [] } }, "required": [ @@ -31114,7 +31690,33 @@ "null" ], "rawDescription": "The type of deployment branch policy for this environment. To allow all branches to deploy, set to `null`.", - "childParamsGroups": [] + "childParamsGroups": [ + { + "parentName": "deployment_branch_policy", + "parentType": "object", + "id": "deployment_branch_policy-object", + "params": [ + { + "type": "boolean", + "description": "

Required. Whether only branches with branch protection rules can deploy to this environment. If protected_branches is true, custom_branch_policies must be false; if protected_branches is false, custom_branch_policies must be true.

", + "name": "protected_branches", + "in": "body", + "rawType": "boolean", + "rawDescription": "Whether only branches with branch protection rules can deploy to this environment. If `protected_branches` is `true`, `custom_branch_policies` must be `false`; if `protected_branches` is `false`, `custom_branch_policies` must be `true`.", + "childParamsGroups": [] + }, + { + "type": "boolean", + "description": "

Required. Whether only branches that match the specified name patterns can deploy to this environment. If custom_branch_policies is true, protected_branches must be false; if custom_branch_policies is false, protected_branches must be true.

", + "name": "custom_branch_policies", + "in": "body", + "rawType": "boolean", + "rawDescription": "Whether only branches that match the specified name patterns can deploy to this environment. If `custom_branch_policies` is `true`, `protected_branches` must be `false`; if `custom_branch_policies` is `false`, `protected_branches` must be `true`.", + "childParamsGroups": [] + } + ] + } + ] } ], "enabledForGitHubApps": true, @@ -66766,33 +67368,114 @@ "properties": { "advanced_security": { "type": "object", - "description": "Use the `status` property to enable or disable GitHub Advanced Security for this repository. For more information, see \"[About GitHub Advanced Security](/github/getting-started-with-github/learning-about-github/about-github-advanced-security).\"", + "description": "

Use the status property to enable or disable GitHub Advanced Security for this repository. For more information, see \"About GitHub Advanced Security.\"

", "properties": { "status": { "type": "string", - "description": "Can be `enabled` or `disabled`." + "description": "

Can be enabled or disabled.

", + "name": "status", + "in": "body", + "rawType": "string", + "rawDescription": "Can be `enabled` or `disabled`.", + "childParamsGroups": [] } - } + }, + "name": "advanced_security", + "in": "body", + "rawType": "object", + "rawDescription": "Use the `status` property to enable or disable GitHub Advanced Security for this repository. For more information, see \"[About GitHub Advanced Security](/github/getting-started-with-github/learning-about-github/about-github-advanced-security).\"", + "childParamsGroups": [ + { + "parentName": "advanced_security", + "parentType": "object", + "id": "advanced_security-object", + "params": [ + { + "type": "string", + "description": "

Can be enabled or disabled.

", + "name": "status", + "in": "body", + "rawType": "string", + "rawDescription": "Can be `enabled` or `disabled`.", + "childParamsGroups": [] + } + ] + } + ] }, "secret_scanning": { "type": "object", - "description": "Use the `status` property to enable or disable secret scanning for this repository. For more information, see \"[About secret scanning](/code-security/secret-security/about-secret-scanning).\"", + "description": "

Use the status property to enable or disable secret scanning for this repository. For more information, see \"About secret scanning.\"

", "properties": { "status": { "type": "string", - "description": "Can be `enabled` or `disabled`." + "description": "

Can be enabled or disabled.

", + "name": "status", + "in": "body", + "rawType": "string", + "rawDescription": "Can be `enabled` or `disabled`.", + "childParamsGroups": [] } - } + }, + "name": "secret_scanning", + "in": "body", + "rawType": "object", + "rawDescription": "Use the `status` property to enable or disable secret scanning for this repository. For more information, see \"[About secret scanning](/code-security/secret-security/about-secret-scanning).\"", + "childParamsGroups": [ + { + "parentName": "secret_scanning", + "parentType": "object", + "id": "secret_scanning-object", + "params": [ + { + "type": "string", + "description": "

Can be enabled or disabled.

", + "name": "status", + "in": "body", + "rawType": "string", + "rawDescription": "Can be `enabled` or `disabled`.", + "childParamsGroups": [] + } + ] + } + ] }, "secret_scanning_push_protection": { "type": "object", - "description": "Use the `status` property to enable or disable secret scanning push protection for this repository. For more information, see \"[Protecting pushes with secret scanning](/enterprise-cloud@latest/code-security/secret-scanning/protecting-pushes-with-secret-scanning).\"", + "description": "

Use the status property to enable or disable secret scanning push protection for this repository. For more information, see \"Protecting pushes with secret scanning.\"

", "properties": { "status": { "type": "string", - "description": "Can be `enabled` or `disabled`." + "description": "

Can be enabled or disabled.

", + "name": "status", + "in": "body", + "rawType": "string", + "rawDescription": "Can be `enabled` or `disabled`.", + "childParamsGroups": [] } - } + }, + "name": "secret_scanning_push_protection", + "in": "body", + "rawType": "object", + "rawDescription": "Use the `status` property to enable or disable secret scanning push protection for this repository. For more information, see \"[Protecting pushes with secret scanning](/enterprise-cloud@latest/code-security/secret-scanning/protecting-pushes-with-secret-scanning).\"", + "childParamsGroups": [ + { + "parentName": "secret_scanning_push_protection", + "parentType": "object", + "id": "secret_scanning_push_protection-object", + "params": [ + { + "type": "string", + "description": "

Can be enabled or disabled.

", + "name": "status", + "in": "body", + "rawType": "string", + "rawDescription": "Can be `enabled` or `disabled`.", + "childParamsGroups": [] + } + ] + } + ] } }, "name": "security_and_analysis", @@ -66802,7 +67485,174 @@ "null" ], "rawDescription": "Specify which security and analysis features to enable or disable. For example, to enable GitHub Advanced Security, use this data in the body of the PATCH request: `{\"security_and_analysis\": {\"advanced_security\": {\"status\": \"enabled\"}}}`. If you have admin permissions for a private repository covered by an Advanced Security license, you can check which security and analysis features are currently enabled by using a `GET /repos/{owner}/{repo}` request.", - "childParamsGroups": [] + "childParamsGroups": [ + { + "parentName": "security_and_analysis", + "parentType": "object", + "id": "security_and_analysis-object", + "params": [ + { + "type": "object", + "description": "

Use the status property to enable or disable GitHub Advanced Security for this repository. For more information, see \"About GitHub Advanced Security.\"

", + "properties": { + "status": { + "type": "string", + "description": "

Can be enabled or disabled.

", + "name": "status", + "in": "body", + "rawType": "string", + "rawDescription": "Can be `enabled` or `disabled`.", + "childParamsGroups": [] + } + }, + "name": "advanced_security", + "in": "body", + "rawType": "object", + "rawDescription": "Use the `status` property to enable or disable GitHub Advanced Security for this repository. For more information, see \"[About GitHub Advanced Security](/github/getting-started-with-github/learning-about-github/about-github-advanced-security).\"", + "childParamsGroups": [ + { + "parentName": "advanced_security", + "parentType": "object", + "id": "advanced_security-object", + "params": [ + { + "type": "string", + "description": "

Can be enabled or disabled.

", + "name": "status", + "in": "body", + "rawType": "string", + "rawDescription": "Can be `enabled` or `disabled`.", + "childParamsGroups": [] + } + ] + } + ] + }, + { + "type": "object", + "description": "

Use the status property to enable or disable secret scanning for this repository. For more information, see \"About secret scanning.\"

", + "properties": { + "status": { + "type": "string", + "description": "

Can be enabled or disabled.

", + "name": "status", + "in": "body", + "rawType": "string", + "rawDescription": "Can be `enabled` or `disabled`.", + "childParamsGroups": [] + } + }, + "name": "secret_scanning", + "in": "body", + "rawType": "object", + "rawDescription": "Use the `status` property to enable or disable secret scanning for this repository. For more information, see \"[About secret scanning](/code-security/secret-security/about-secret-scanning).\"", + "childParamsGroups": [ + { + "parentName": "secret_scanning", + "parentType": "object", + "id": "secret_scanning-object", + "params": [ + { + "type": "string", + "description": "

Can be enabled or disabled.

", + "name": "status", + "in": "body", + "rawType": "string", + "rawDescription": "Can be `enabled` or `disabled`.", + "childParamsGroups": [] + } + ] + } + ] + }, + { + "type": "object", + "description": "

Use the status property to enable or disable secret scanning push protection for this repository. For more information, see \"Protecting pushes with secret scanning.\"

", + "properties": { + "status": { + "type": "string", + "description": "

Can be enabled or disabled.

", + "name": "status", + "in": "body", + "rawType": "string", + "rawDescription": "Can be `enabled` or `disabled`.", + "childParamsGroups": [] + } + }, + "name": "secret_scanning_push_protection", + "in": "body", + "rawType": "object", + "rawDescription": "Use the `status` property to enable or disable secret scanning push protection for this repository. For more information, see \"[Protecting pushes with secret scanning](/enterprise-cloud@latest/code-security/secret-scanning/protecting-pushes-with-secret-scanning).\"", + "childParamsGroups": [ + { + "parentName": "secret_scanning_push_protection", + "parentType": "object", + "id": "secret_scanning_push_protection-object", + "params": [ + { + "type": "string", + "description": "

Can be enabled or disabled.

", + "name": "status", + "in": "body", + "rawType": "string", + "rawDescription": "Can be `enabled` or `disabled`.", + "childParamsGroups": [] + } + ] + } + ] + } + ] + }, + { + "parentName": "advanced_security", + "parentType": "object", + "id": "advanced_security-object", + "params": [ + { + "type": "string", + "description": "

Can be enabled or disabled.

", + "name": "status", + "in": "body", + "rawType": "string", + "rawDescription": "Can be `enabled` or `disabled`.", + "childParamsGroups": [] + } + ] + }, + { + "parentName": "secret_scanning", + "parentType": "object", + "id": "secret_scanning-object", + "params": [ + { + "type": "string", + "description": "

Can be enabled or disabled.

", + "name": "status", + "in": "body", + "rawType": "string", + "rawDescription": "Can be `enabled` or `disabled`.", + "childParamsGroups": [] + } + ] + }, + { + "parentName": "secret_scanning_push_protection", + "parentType": "object", + "id": "secret_scanning_push_protection-object", + "params": [ + { + "type": "string", + "description": "

Can be enabled or disabled.

", + "name": "status", + "in": "body", + "rawType": "string", + "rawDescription": "Can be `enabled` or `disabled`.", + "childParamsGroups": [] + } + ] + } + ] }, { "type": "boolean", diff --git a/script/rest/utils/operation.js b/script/rest/utils/operation.js index 708cd72c1e..bf77b0c691 100644 --- a/script/rest/utils/operation.js +++ b/script/rest/utils/operation.js @@ -307,8 +307,12 @@ async function getBodyParams(paramsObject, requiredParams) { param.childParamsGroups.push(childParamsGroup) } - // if the param is an object, it may have child object params that have child params :/ - if (param.rawType === 'object') { + // If the param is an object, it may have child object params that have child params :/ + // Objects can potentially be null where the rawType is [ 'object', 'null' ]. + if ( + param.rawType === 'object' || + (Array.isArray(param.rawType) && param.rawType.includes('object')) + ) { param.childParamsGroups.push( ...flatten( childParamsGroup.params @@ -324,8 +328,18 @@ async function getBodyParams(paramsObject, requiredParams) { } async function getChildParamsGroup(param) { - // only objects, arrays of objects, anyOf, allOf, and oneOf have child params - if (!(param.rawType === 'array' || param.rawType === 'object' || param.oneOf)) return + // Only objects, arrays of objects, anyOf, allOf, and oneOf have child params. + // Objects can potentially be null where the rawType is [ 'object', 'null' ]. + if ( + !( + param.rawType === 'array' || + (Array.isArray(param.rawType) && param.rawType.includes('array')) || + param.rawType === 'object' || + (Array.isArray(param.rawType) && param.rawType.includes('object')) || + param.oneOf + ) + ) + return if ( param.oneOf && !param.oneOf.filter((param) => param.type === 'object' || param.type === 'array') @@ -338,7 +352,19 @@ async function getChildParamsGroup(param) { const childParams = await getBodyParams(childParamsObject, requiredParams) // adjust the type for easier readability in the child table - const parentType = param.rawType === 'array' ? 'items' : param.rawType + let parentType + + if (param.rawType === 'array') { + parentType = 'items' + } else if (Array.isArray(param.rawType) && param.rawType.includes('array')) { + // handle the case where rawType is [ 'array', 'null' ] + parentType = 'items' + } else if (Array.isArray(param.rawType) && param.rawType.includes('object')) { + // handle the case where rawType is [ 'object', 'null' ] + parentType = 'object' + } else { + parentType = param.rawType + } // add an ID to the child table so they can be linked to slugger.reset()