From 565948518b3efb23babc62fafab456ccbcbae0ff Mon Sep 17 00:00:00 2001 From: Murukesh Mohanan Date: Thu, 4 Mar 2021 18:02:01 +0900 Subject: [PATCH 1/2] Clarify access level needed for secrets in web interface (#2330) * Clarify access level needed for secrets in web interface Closes #1087 I considered changing the `permissions-statement-secrets-repository` reusable to include a reference to the API, but then I noticed that the other place using it (["Enabling debug logging"][1]) already mentioned the API, so instead I added a note. Including a mention of "web interface" lead to (IMO) too much duplication in text, so I rephrased it to be more like the `permissions-statement-secrets-api` reusable. [1]: https://docs.github.com/en/free-pro-team@latest/actions/managing-workflow-runs/enabling-debug-logging * Update data/reusables/github-actions/permissions-statement-secrets-repository.md I'm going to go ahead and change this back. Co-authored-by: hubwriter --- content/actions/reference/encrypted-secrets.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/content/actions/reference/encrypted-secrets.md b/content/actions/reference/encrypted-secrets.md index 6621cc6c53..c6dda65cfd 100644 --- a/content/actions/reference/encrypted-secrets.md +++ b/content/actions/reference/encrypted-secrets.md @@ -77,6 +77,12 @@ When generating credentials, we recommend that you grant the minimum permissions If your repository {% if currentVersion == "free-pro-team@latest" or currentVersion ver_gt "enterprise-server@3.0"or currentVersion == "github-ae@latest" %}has environment secrets or {% endif %}can access secrets from the parent organization, then those secrets are also listed on this page. +{% note %} + +**Note:** Users with collaborator access can use the REST API to manage secrets for a repository. For more information, see "[{% data variables.product.prodname_actions %} secrets API](/rest/reference/actions#secrets)." + +{% endnote %} + {% if currentVersion == "free-pro-team@latest" or currentVersion ver_gt "enterprise-server@3.0" or currentVersion == "github-ae@latest" } ### Creating encrypted secrets for an environment From d4df9b2b6eb97100ad488c5c0b7bac5bba1ac80b Mon Sep 17 00:00:00 2001 From: github-openapi-bot <69533958+github-openapi-bot@users.noreply.github.com> Date: Thu, 4 Mar 2021 06:17:44 -0500 Subject: [PATCH 2/2] Update OpenAPI Descriptions --- lib/rest/static/decorated/api.github.com.json | 248 ++++++++++++++++-- lib/rest/static/decorated/ghes-2.20.json | 9 +- lib/rest/static/decorated/ghes-2.21.json | 9 +- lib/rest/static/decorated/ghes-2.22.json | 17 +- lib/rest/static/decorated/ghes-3.0.json | 26 +- lib/rest/static/decorated/github.ae.json | 31 ++- .../dereferenced/api.github.com.deref.json | 65 ++++- .../static/dereferenced/ghes-2.20.deref.json | 5 +- .../static/dereferenced/ghes-2.21.deref.json | 5 +- .../static/dereferenced/ghes-2.22.deref.json | 15 +- .../static/dereferenced/ghes-3.0.deref.json | 20 +- .../static/dereferenced/github.ae.deref.json | 25 +- 12 files changed, 396 insertions(+), 79 deletions(-) diff --git a/lib/rest/static/decorated/api.github.com.json b/lib/rest/static/decorated/api.github.com.json index 5cc942da34..e71e5b02e2 100644 --- a/lib/rest/static/decorated/api.github.com.json +++ b/lib/rest/static/decorated/api.github.com.json @@ -3145,14 +3145,17 @@ "properties": { "access_token": { "type": "string", - "description": "

The OAuth access token used to authenticate to the GitHub API.

", + "description": "

Required. The OAuth access token used to authenticate to the GitHub API.

", "name": "access_token", "in": "body", "rawType": "string", "rawDescription": "The OAuth access token used to authenticate to the GitHub API.", "childParamsGroups": [] } - } + }, + "required": [ + "access_token" + ] }, "example": { "access_token": "e72e16c7e42f292c6912e7710c838347ae178b4a" @@ -3189,7 +3192,7 @@ "bodyParameters": [ { "type": "string", - "description": "

The OAuth access token used to authenticate to the GitHub API.

", + "description": "

Required. The OAuth access token used to authenticate to the GitHub API.

", "name": "access_token", "in": "body", "rawType": "string", @@ -3244,7 +3247,7 @@ "properties": { "access_token": { "type": "string", - "description": "

Required. The OAuth access token used to authenticate to the GitHub API.

", + "description": "

Required. Required. The OAuth access token used to authenticate to the GitHub API.

", "example": "e72e16c7e42f292c6912e7710c838347ae178b4a", "name": "access_token", "in": "body", @@ -4104,7 +4107,10 @@ } ] } - } + }, + "required": [ + "access_token" + ] } } } @@ -4154,7 +4160,7 @@ "bodyParameters": [ { "type": "string", - "description": "

Required. The OAuth access token used to authenticate to the GitHub API.

", + "description": "

Required. Required. The OAuth access token used to authenticate to the GitHub API.

", "example": "e72e16c7e42f292c6912e7710c838347ae178b4a", "name": "access_token", "in": "body", @@ -17116,6 +17122,7 @@ "encrypted_value": { "type": "string", "description": "

Value for your secret, encrypted with LibSodium using the public key retrieved from the Get an organization public key endpoint.

", + "pattern": "^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=|[A-Za-z0-9+/]{4})$", "name": "encrypted_value", "in": "body", "rawType": "string", @@ -17160,7 +17167,7 @@ } }, "example": { - "encrypted_value": "****************************************************************************************", + "encrypted_value": "c2VjcmV0", "key_id": "012345678912345678", "visibility": "selected", "selected_repository_ids": [ @@ -17201,6 +17208,7 @@ { "type": "string", "description": "

Value for your secret, encrypted with LibSodium using the public key retrieved from the Get an organization public key endpoint.

", + "pattern": "^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=|[A-Za-z0-9+/]{4})$", "name": "encrypted_value", "in": "body", "rawType": "string", @@ -34652,6 +34660,7 @@ "encrypted_value": { "type": "string", "description": "

Value for your secret, encrypted with LibSodium using the public key retrieved from the Get a repository public key endpoint.

", + "pattern": "^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=|[A-Za-z0-9+/]{4})$", "name": "encrypted_value", "in": "body", "rawType": "string", @@ -34670,7 +34679,7 @@ } }, "example": { - "encrypted_value": "****************************************************************************************", + "encrypted_value": "c2VjcmV0", "key_id": "012345678912345678" } } @@ -34706,6 +34715,7 @@ { "type": "string", "description": "

Value for your secret, encrypted with LibSodium using the public key retrieved from the Get a repository public key endpoint.

", + "pattern": "^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=|[A-Za-z0-9+/]{4})$", "name": "encrypted_value", "in": "body", "rawType": "string", @@ -52441,6 +52451,7 @@ "application/json": { "schema": { "type": "object", + "nullable": true, "properties": { "wait_timer": { "type": "integer", @@ -52453,7 +52464,8 @@ "childParamsGroups": [] }, "reviewers": { - "type": "array of objects", + "type": "array of objects or null", + "nullable": true, "description": "

The people or teams that may review jobs that reference the environment. You can list up to six users or teams as reviewers. The reviewers must have at least read access to the repository. Only one of the required reviewers needs to approve the job for it to proceed.

", "items": { "type": "object", @@ -52582,7 +52594,8 @@ } ] } - } + }, + "additionalProperties": false } } } @@ -52626,7 +52639,8 @@ "childParamsGroups": [] }, { - "type": "array of objects", + "type": "array of objects or null", + "nullable": true, "description": "

The people or teams that may review jobs that reference the environment. You can list up to six users or teams as reviewers. The reviewers must have at least read access to the repository. Only one of the required reviewers needs to approve the job for it to proceed.

", "items": { "type": "object", @@ -75318,6 +75332,7 @@ "encrypted_value": { "type": "string", "description": "

Value for your secret, encrypted with LibSodium using the public key retrieved from the Get an environment public key endpoint.

", + "pattern": "^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=|[A-Za-z0-9+/]{4})$", "name": "encrypted_value", "in": "body", "rawType": "string", @@ -75336,7 +75351,7 @@ } }, "example": { - "encrypted_value": "****************************************************************************************", + "encrypted_value": "c2VjcmV0", "key_id": "012345678912345678" } } @@ -75372,6 +75387,7 @@ { "type": "string", "description": "

Value for your secret, encrypted with LibSodium using the public key retrieved from the Get an environment public key endpoint.

", + "pattern": "^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=|[A-Za-z0-9+/]{4})$", "name": "encrypted_value", "in": "body", "rawType": "string", @@ -76098,13 +76114,13 @@ "x-codeSamples": [ { "lang": "Shell", - "source": "curl \\\n -X PATCH \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/scim/v2/enterprises/ENTERPRISE/Groups/SCIM_GROUP_ID \\\n -d '{\"schemas\":[\"schemas\"],\"Operations\":[{}]}'", - "html": "
curl \\\n  -X PATCH \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/scim/v2/enterprises/ENTERPRISE/Groups/SCIM_GROUP_ID \\\n  -d '{\"schemas\":[\"schemas\"],\"Operations\":[{}]}'
" + "source": "curl \\\n -X PATCH \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/scim/v2/enterprises/ENTERPRISE/Groups/SCIM_GROUP_ID \\\n -d '{\"schemas\":[\"schemas\"],\"Operations\":[{\"op\":\"op\",\"path\":\"path\",\"value\":\"value\"}]}'", + "html": "
curl \\\n  -X PATCH \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/scim/v2/enterprises/ENTERPRISE/Groups/SCIM_GROUP_ID \\\n  -d '{\"schemas\":[\"schemas\"],\"Operations\":[{\"op\":\"op\",\"path\":\"path\",\"value\":\"value\"}]}'
" }, { "lang": "JavaScript", - "source": "await octokit.request('PATCH /scim/v2/enterprises/{enterprise}/Groups/{scim_group_id}', {\n enterprise: 'enterprise',\n scim_group_id: 'scim_group_id',\n schemas: [\n 'schemas'\n ],\n Operations: [\n {}\n ]\n})", - "html": "
await octokit.request('PATCH /scim/v2/enterprises/{enterprise}/Groups/{scim_group_id}', {\n  enterprise: 'enterprise',\n  scim_group_id: 'scim_group_id',\n  schemas: [\n    'schemas'\n  ],\n  Operations: [\n    {}\n  ]\n})\n
" + "source": "await octokit.request('PATCH /scim/v2/enterprises/{enterprise}/Groups/{scim_group_id}', {\n enterprise: 'enterprise',\n scim_group_id: 'scim_group_id',\n schemas: [\n 'schemas'\n ],\n Operations: [\n {\n op: 'op',\n path: 'path',\n value: 'value'\n }\n ]\n})", + "html": "
await octokit.request('PATCH /scim/v2/enterprises/{enterprise}/Groups/{scim_group_id}', {\n  enterprise: 'enterprise',\n  scim_group_id: 'scim_group_id',\n  schemas: [\n    'schemas'\n  ],\n  Operations: [\n    {\n      op: 'op',\n      path: 'path',\n      value: 'value'\n    }\n  ]\n})\n
" } ], "summary": "Update an attribute for a SCIM enterprise group", @@ -76138,14 +76154,110 @@ "Operations": { "type": "array of objects", "description": "

Required. Array of SCIM operations.

", + "minItems": 1, "items": { - "type": "object" + "type": "object", + "properties": { + "op": { + "type": "string", + "enum": [ + "add", + "Add", + "remove", + "Remove", + "replace", + "Replace" + ], + "name": "op", + "in": "body", + "rawType": "string", + "description": "

Required. undefined

", + "childParamsGroups": [] + }, + "path": { + "type": "string", + "name": "path", + "in": "body", + "rawType": "string", + "description": "

undefined

", + "childParamsGroups": [] + }, + "value": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "object" + }, + { + "type": "array" + } + ], + "name": "value", + "in": "body", + "description": "

undefined

", + "childParamsGroups": [] + } + }, + "required": [ + "op" + ] }, "name": "Operations", "in": "body", "rawType": "array", "rawDescription": "Array of [SCIM operations](https://tools.ietf.org/html/rfc7644#section-3.5.2).", - "childParamsGroups": [] + "childParamsGroups": [ + { + "parentName": "Operations", + "parentType": "items", + "id": "operations-items", + "params": [ + { + "type": "string", + "enum": [ + "add", + "Add", + "remove", + "Remove", + "replace", + "Replace" + ], + "name": "op", + "in": "body", + "rawType": "string", + "description": "

Required. undefined

", + "childParamsGroups": [] + }, + { + "type": "string", + "name": "path", + "in": "body", + "rawType": "string", + "description": "

undefined

", + "childParamsGroups": [] + }, + { + "oneOf": [ + { + "type": "string" + }, + { + "type": "object" + }, + { + "type": "array" + } + ], + "name": "value", + "in": "body", + "description": "

undefined

", + "childParamsGroups": [] + } + ] + } + ] } }, "required": [ @@ -76210,14 +76322,110 @@ { "type": "array of objects", "description": "

Required. Array of SCIM operations.

", + "minItems": 1, "items": { - "type": "object" + "type": "object", + "properties": { + "op": { + "type": "string", + "enum": [ + "add", + "Add", + "remove", + "Remove", + "replace", + "Replace" + ], + "name": "op", + "in": "body", + "rawType": "string", + "description": "

Required. undefined

", + "childParamsGroups": [] + }, + "path": { + "type": "string", + "name": "path", + "in": "body", + "rawType": "string", + "description": "

undefined

", + "childParamsGroups": [] + }, + "value": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "object" + }, + { + "type": "array" + } + ], + "name": "value", + "in": "body", + "description": "

undefined

", + "childParamsGroups": [] + } + }, + "required": [ + "op" + ] }, "name": "Operations", "in": "body", "rawType": "array", "rawDescription": "Array of [SCIM operations](https://tools.ietf.org/html/rfc7644#section-3.5.2).", - "childParamsGroups": [] + "childParamsGroups": [ + { + "parentName": "Operations", + "parentType": "items", + "id": "operations-items", + "params": [ + { + "type": "string", + "enum": [ + "add", + "Add", + "remove", + "Remove", + "replace", + "Replace" + ], + "name": "op", + "in": "body", + "rawType": "string", + "description": "

Required. undefined

", + "childParamsGroups": [] + }, + { + "type": "string", + "name": "path", + "in": "body", + "rawType": "string", + "description": "

undefined

", + "childParamsGroups": [] + }, + { + "oneOf": [ + { + "type": "string" + }, + { + "type": "object" + }, + { + "type": "array" + } + ], + "name": "value", + "in": "body", + "description": "

undefined

", + "childParamsGroups": [] + } + ] + } + ] } ] }, diff --git a/lib/rest/static/decorated/ghes-2.20.json b/lib/rest/static/decorated/ghes-2.20.json index aa9d494403..f577efb584 100644 --- a/lib/rest/static/decorated/ghes-2.20.json +++ b/lib/rest/static/decorated/ghes-2.20.json @@ -6316,14 +6316,17 @@ "properties": { "access_token": { "type": "string", - "description": "

The OAuth access token used to authenticate to the GitHub API.

", + "description": "

Required. The OAuth access token used to authenticate to the GitHub API.

", "name": "access_token", "in": "body", "rawType": "string", "rawDescription": "The OAuth access token used to authenticate to the GitHub API.", "childParamsGroups": [] } - } + }, + "required": [ + "access_token" + ] }, "example": { "access_token": "e72e16c7e42f292c6912e7710c838347ae178b4a" @@ -6360,7 +6363,7 @@ "bodyParameters": [ { "type": "string", - "description": "

The OAuth access token used to authenticate to the GitHub API.

", + "description": "

Required. The OAuth access token used to authenticate to the GitHub API.

", "name": "access_token", "in": "body", "rawType": "string", diff --git a/lib/rest/static/decorated/ghes-2.21.json b/lib/rest/static/decorated/ghes-2.21.json index 28d3a02486..3c95181390 100644 --- a/lib/rest/static/decorated/ghes-2.21.json +++ b/lib/rest/static/decorated/ghes-2.21.json @@ -6310,14 +6310,17 @@ "properties": { "access_token": { "type": "string", - "description": "

The OAuth access token used to authenticate to the GitHub API.

", + "description": "

Required. The OAuth access token used to authenticate to the GitHub API.

", "name": "access_token", "in": "body", "rawType": "string", "rawDescription": "The OAuth access token used to authenticate to the GitHub API.", "childParamsGroups": [] } - } + }, + "required": [ + "access_token" + ] }, "example": { "access_token": "e72e16c7e42f292c6912e7710c838347ae178b4a" @@ -6354,7 +6357,7 @@ "bodyParameters": [ { "type": "string", - "description": "

The OAuth access token used to authenticate to the GitHub API.

", + "description": "

Required. The OAuth access token used to authenticate to the GitHub API.

", "name": "access_token", "in": "body", "rawType": "string", diff --git a/lib/rest/static/decorated/ghes-2.22.json b/lib/rest/static/decorated/ghes-2.22.json index 191b8a41d7..23c6a94413 100644 --- a/lib/rest/static/decorated/ghes-2.22.json +++ b/lib/rest/static/decorated/ghes-2.22.json @@ -6390,14 +6390,17 @@ "properties": { "access_token": { "type": "string", - "description": "

The OAuth access token used to authenticate to the GitHub API.

", + "description": "

Required. The OAuth access token used to authenticate to the GitHub API.

", "name": "access_token", "in": "body", "rawType": "string", "rawDescription": "The OAuth access token used to authenticate to the GitHub API.", "childParamsGroups": [] } - } + }, + "required": [ + "access_token" + ] }, "example": { "access_token": "e72e16c7e42f292c6912e7710c838347ae178b4a" @@ -6434,7 +6437,7 @@ "bodyParameters": [ { "type": "string", - "description": "

The OAuth access token used to authenticate to the GitHub API.

", + "description": "

Required. The OAuth access token used to authenticate to the GitHub API.

", "name": "access_token", "in": "body", "rawType": "string", @@ -16259,6 +16262,7 @@ "encrypted_value": { "type": "string", "description": "

Value for your secret, encrypted with LibSodium using the public key retrieved from the Get an organization public key endpoint.

", + "pattern": "^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=|[A-Za-z0-9+/]{4})$", "name": "encrypted_value", "in": "body", "rawType": "string", @@ -16303,7 +16307,7 @@ } }, "example": { - "encrypted_value": "****************************************************************************************", + "encrypted_value": "c2VjcmV0", "key_id": "012345678912345678", "visibility": "selected", "selected_repository_ids": [ @@ -16344,6 +16348,7 @@ { "type": "string", "description": "

Value for your secret, encrypted with LibSodium using the public key retrieved from the Get an organization public key endpoint.

", + "pattern": "^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=|[A-Za-z0-9+/]{4})$", "name": "encrypted_value", "in": "body", "rawType": "string", @@ -29639,6 +29644,7 @@ "encrypted_value": { "type": "string", "description": "

Value for your secret, encrypted with LibSodium using the public key retrieved from the Get a repository public key endpoint.

", + "pattern": "^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=|[A-Za-z0-9+/]{4})$", "name": "encrypted_value", "in": "body", "rawType": "string", @@ -29657,7 +29663,7 @@ } }, "example": { - "encrypted_value": "****************************************************************************************", + "encrypted_value": "c2VjcmV0", "key_id": "012345678912345678" } } @@ -29693,6 +29699,7 @@ { "type": "string", "description": "

Value for your secret, encrypted with LibSodium using the public key retrieved from the Get a repository public key endpoint.

", + "pattern": "^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=|[A-Za-z0-9+/]{4})$", "name": "encrypted_value", "in": "body", "rawType": "string", diff --git a/lib/rest/static/decorated/ghes-3.0.json b/lib/rest/static/decorated/ghes-3.0.json index c0348d9aa7..1bf6c63efc 100644 --- a/lib/rest/static/decorated/ghes-3.0.json +++ b/lib/rest/static/decorated/ghes-3.0.json @@ -6592,14 +6592,17 @@ "properties": { "access_token": { "type": "string", - "description": "

The OAuth access token used to authenticate to the GitHub API.

", + "description": "

Required. The OAuth access token used to authenticate to the GitHub API.

", "name": "access_token", "in": "body", "rawType": "string", "rawDescription": "The OAuth access token used to authenticate to the GitHub API.", "childParamsGroups": [] } - } + }, + "required": [ + "access_token" + ] }, "example": { "access_token": "e72e16c7e42f292c6912e7710c838347ae178b4a" @@ -6636,7 +6639,7 @@ "bodyParameters": [ { "type": "string", - "description": "

The OAuth access token used to authenticate to the GitHub API.

", + "description": "

Required. The OAuth access token used to authenticate to the GitHub API.

", "name": "access_token", "in": "body", "rawType": "string", @@ -6691,7 +6694,7 @@ "properties": { "access_token": { "type": "string", - "description": "

Required. The OAuth access token used to authenticate to the GitHub API.

", + "description": "

Required. Required. The OAuth access token used to authenticate to the GitHub API.

", "example": "e72e16c7e42f292c6912e7710c838347ae178b4a", "name": "access_token", "in": "body", @@ -7551,7 +7554,10 @@ } ] } - } + }, + "required": [ + "access_token" + ] } } } @@ -7601,7 +7607,7 @@ "bodyParameters": [ { "type": "string", - "description": "

Required. The OAuth access token used to authenticate to the GitHub API.

", + "description": "

Required. Required. The OAuth access token used to authenticate to the GitHub API.

", "example": "e72e16c7e42f292c6912e7710c838347ae178b4a", "name": "access_token", "in": "body", @@ -19946,6 +19952,7 @@ "encrypted_value": { "type": "string", "description": "

Value for your secret, encrypted with LibSodium using the public key retrieved from the Get an organization public key endpoint.

", + "pattern": "^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=|[A-Za-z0-9+/]{4})$", "name": "encrypted_value", "in": "body", "rawType": "string", @@ -19990,7 +19997,7 @@ } }, "example": { - "encrypted_value": "****************************************************************************************", + "encrypted_value": "c2VjcmV0", "key_id": "012345678912345678", "visibility": "selected", "selected_repository_ids": [ @@ -20031,6 +20038,7 @@ { "type": "string", "description": "

Value for your secret, encrypted with LibSodium using the public key retrieved from the Get an organization public key endpoint.

", + "pattern": "^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=|[A-Za-z0-9+/]{4})$", "name": "encrypted_value", "in": "body", "rawType": "string", @@ -33979,6 +33987,7 @@ "encrypted_value": { "type": "string", "description": "

Value for your secret, encrypted with LibSodium using the public key retrieved from the Get a repository public key endpoint.

", + "pattern": "^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=|[A-Za-z0-9+/]{4})$", "name": "encrypted_value", "in": "body", "rawType": "string", @@ -33997,7 +34006,7 @@ } }, "example": { - "encrypted_value": "****************************************************************************************", + "encrypted_value": "c2VjcmV0", "key_id": "012345678912345678" } } @@ -34033,6 +34042,7 @@ { "type": "string", "description": "

Value for your secret, encrypted with LibSodium using the public key retrieved from the Get a repository public key endpoint.

", + "pattern": "^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=|[A-Za-z0-9+/]{4})$", "name": "encrypted_value", "in": "body", "rawType": "string", diff --git a/lib/rest/static/decorated/github.ae.json b/lib/rest/static/decorated/github.ae.json index 0e57994c31..714b4662e6 100644 --- a/lib/rest/static/decorated/github.ae.json +++ b/lib/rest/static/decorated/github.ae.json @@ -5203,14 +5203,17 @@ "properties": { "access_token": { "type": "string", - "description": "

The OAuth access token used to authenticate to the GitHub API.

", + "description": "

Required. The OAuth access token used to authenticate to the GitHub API.

", "name": "access_token", "in": "body", "rawType": "string", "rawDescription": "The OAuth access token used to authenticate to the GitHub API.", "childParamsGroups": [] } - } + }, + "required": [ + "access_token" + ] }, "example": { "access_token": "e72e16c7e42f292c6912e7710c838347ae178b4a" @@ -5247,7 +5250,7 @@ "bodyParameters": [ { "type": "string", - "description": "

The OAuth access token used to authenticate to the GitHub API.

", + "description": "

Required. The OAuth access token used to authenticate to the GitHub API.

", "name": "access_token", "in": "body", "rawType": "string", @@ -14225,6 +14228,7 @@ "encrypted_value": { "type": "string", "description": "

Value for your secret, encrypted with LibSodium using the public key retrieved from the Get an organization public key endpoint.

", + "pattern": "^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=|[A-Za-z0-9+/]{4})$", "name": "encrypted_value", "in": "body", "rawType": "string", @@ -14269,7 +14273,7 @@ } }, "example": { - "encrypted_value": "****************************************************************************************", + "encrypted_value": "c2VjcmV0", "key_id": "012345678912345678", "visibility": "selected", "selected_repository_ids": [ @@ -14310,6 +14314,7 @@ { "type": "string", "description": "

Value for your secret, encrypted with LibSodium using the public key retrieved from the Get an organization public key endpoint.

", + "pattern": "^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=|[A-Za-z0-9+/]{4})$", "name": "encrypted_value", "in": "body", "rawType": "string", @@ -28035,6 +28040,7 @@ "encrypted_value": { "type": "string", "description": "

Value for your secret, encrypted with LibSodium using the public key retrieved from the Get a repository public key endpoint.

", + "pattern": "^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=|[A-Za-z0-9+/]{4})$", "name": "encrypted_value", "in": "body", "rawType": "string", @@ -28053,7 +28059,7 @@ } }, "example": { - "encrypted_value": "****************************************************************************************", + "encrypted_value": "c2VjcmV0", "key_id": "012345678912345678" } } @@ -28089,6 +28095,7 @@ { "type": "string", "description": "

Value for your secret, encrypted with LibSodium using the public key retrieved from the Get a repository public key endpoint.

", + "pattern": "^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=|[A-Za-z0-9+/]{4})$", "name": "encrypted_value", "in": "body", "rawType": "string", @@ -45161,6 +45168,7 @@ "application/json": { "schema": { "type": "object", + "nullable": true, "properties": { "wait_timer": { "type": "integer", @@ -45173,7 +45181,8 @@ "childParamsGroups": [] }, "reviewers": { - "type": "array of objects", + "type": "array of objects or null", + "nullable": true, "description": "

The people or teams that may review jobs that reference the environment. You can list up to six users or teams as reviewers. The reviewers must have at least read access to the repository. Only one of the required reviewers needs to approve the job for it to proceed.

", "items": { "type": "object", @@ -45302,7 +45311,8 @@ } ] } - } + }, + "additionalProperties": false } } } @@ -45346,7 +45356,8 @@ "childParamsGroups": [] }, { - "type": "array of objects", + "type": "array of objects or null", + "nullable": true, "description": "

The people or teams that may review jobs that reference the environment. You can list up to six users or teams as reviewers. The reviewers must have at least read access to the repository. Only one of the required reviewers needs to approve the job for it to proceed.

", "items": { "type": "object", @@ -65981,6 +65992,7 @@ "encrypted_value": { "type": "string", "description": "

Value for your secret, encrypted with LibSodium using the public key retrieved from the Get an environment public key endpoint.

", + "pattern": "^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=|[A-Za-z0-9+/]{4})$", "name": "encrypted_value", "in": "body", "rawType": "string", @@ -65999,7 +66011,7 @@ } }, "example": { - "encrypted_value": "****************************************************************************************", + "encrypted_value": "c2VjcmV0", "key_id": "012345678912345678" } } @@ -66035,6 +66047,7 @@ { "type": "string", "description": "

Value for your secret, encrypted with LibSodium using the public key retrieved from the Get an environment public key endpoint.

", + "pattern": "^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=|[A-Za-z0-9+/]{4})$", "name": "encrypted_value", "in": "body", "rawType": "string", diff --git a/lib/rest/static/dereferenced/api.github.com.deref.json b/lib/rest/static/dereferenced/api.github.com.deref.json index daceeb2720..26dad9edd4 100644 --- a/lib/rest/static/dereferenced/api.github.com.deref.json +++ b/lib/rest/static/dereferenced/api.github.com.deref.json @@ -6739,7 +6739,10 @@ "type": "string", "description": "The OAuth access token used to authenticate to the GitHub API." } - } + }, + "required": [ + "access_token" + ] }, "example": { "access_token": "e72e16c7e42f292c6912e7710c838347ae178b4a" @@ -7146,7 +7149,10 @@ "single_file": "read" } } - } + }, + "required": [ + "access_token" + ] } } } @@ -52790,7 +52796,8 @@ "properties": { "encrypted_value": { "type": "string", - "description": "Value for your secret, encrypted with [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages) using the public key retrieved from the [Get an organization public key](https://docs.github.com/rest/reference/actions#get-an-organization-public-key) endpoint." + "description": "Value for your secret, encrypted with [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages) using the public key retrieved from the [Get an organization public key](https://docs.github.com/rest/reference/actions#get-an-organization-public-key) endpoint.", + "pattern": "^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=|[A-Za-z0-9+/]{4})$" }, "key_id": { "type": "string", @@ -52815,7 +52822,7 @@ } }, "example": { - "encrypted_value": "****************************************************************************************", + "encrypted_value": "c2VjcmV0", "key_id": "012345678912345678", "visibility": "selected", "selected_repository_ids": [ @@ -121715,7 +121722,8 @@ "properties": { "encrypted_value": { "type": "string", - "description": "Value for your secret, encrypted with [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages) using the public key retrieved from the [Get a repository public key](https://docs.github.com/rest/reference/actions#get-a-repository-public-key) endpoint." + "description": "Value for your secret, encrypted with [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages) using the public key retrieved from the [Get a repository public key](https://docs.github.com/rest/reference/actions#get-a-repository-public-key) endpoint.", + "pattern": "^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=|[A-Za-z0-9+/]{4})$" }, "key_id": { "type": "string", @@ -121724,7 +121732,7 @@ } }, "example": { - "encrypted_value": "****************************************************************************************", + "encrypted_value": "c2VjcmV0", "key_id": "012345678912345678" } } @@ -179976,6 +179984,7 @@ "application/json": { "schema": { "type": "object", + "nullable": true, "properties": { "wait_timer": { "type": "integer", @@ -179984,6 +179993,7 @@ }, "reviewers": { "type": "array", + "nullable": true, "description": "The people or teams that may review jobs that reference the environment. You can list up to six users or teams as reviewers. The reviewers must have at least read access to the repository. Only one of the required reviewers needs to approve the job for it to proceed.", "items": { "type": "object", @@ -180024,7 +180034,8 @@ "custom_branch_policies" ] } - } + }, + "additionalProperties": false } } } @@ -276869,7 +276880,8 @@ "properties": { "encrypted_value": { "type": "string", - "description": "Value for your secret, encrypted with [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages) using the public key retrieved from the [Get an environment public key](https://docs.github.com/rest/reference/actions#get-an-environment-public-key) endpoint." + "description": "Value for your secret, encrypted with [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages) using the public key retrieved from the [Get an environment public key](https://docs.github.com/rest/reference/actions#get-an-environment-public-key) endpoint.", + "pattern": "^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=|[A-Za-z0-9+/]{4})$" }, "key_id": { "type": "string", @@ -276878,7 +276890,7 @@ } }, "example": { - "encrypted_value": "****************************************************************************************", + "encrypted_value": "c2VjcmV0", "key_id": "012345678912345678" } } @@ -277734,8 +277746,41 @@ "Operations": { "type": "array", "description": "Array of [SCIM operations](https://tools.ietf.org/html/rfc7644#section-3.5.2).", + "minItems": 1, "items": { - "type": "object" + "type": "object", + "properties": { + "op": { + "type": "string", + "enum": [ + "add", + "Add", + "remove", + "Remove", + "replace", + "Replace" + ] + }, + "path": { + "type": "string" + }, + "value": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "object" + }, + { + "type": "array" + } + ] + } + }, + "required": [ + "op" + ] } } }, diff --git a/lib/rest/static/dereferenced/ghes-2.20.deref.json b/lib/rest/static/dereferenced/ghes-2.20.deref.json index 9f3bd5a355..89f1d6ceca 100644 --- a/lib/rest/static/dereferenced/ghes-2.20.deref.json +++ b/lib/rest/static/dereferenced/ghes-2.20.deref.json @@ -11412,7 +11412,10 @@ "type": "string", "description": "The OAuth access token used to authenticate to the GitHub API." } - } + }, + "required": [ + "access_token" + ] }, "example": { "access_token": "e72e16c7e42f292c6912e7710c838347ae178b4a" diff --git a/lib/rest/static/dereferenced/ghes-2.21.deref.json b/lib/rest/static/dereferenced/ghes-2.21.deref.json index 023000e1a4..a67d1a6ad7 100644 --- a/lib/rest/static/dereferenced/ghes-2.21.deref.json +++ b/lib/rest/static/dereferenced/ghes-2.21.deref.json @@ -11417,7 +11417,10 @@ "type": "string", "description": "The OAuth access token used to authenticate to the GitHub API." } - } + }, + "required": [ + "access_token" + ] }, "example": { "access_token": "e72e16c7e42f292c6912e7710c838347ae178b4a" diff --git a/lib/rest/static/dereferenced/ghes-2.22.deref.json b/lib/rest/static/dereferenced/ghes-2.22.deref.json index b6920c8035..cba6256f39 100644 --- a/lib/rest/static/dereferenced/ghes-2.22.deref.json +++ b/lib/rest/static/dereferenced/ghes-2.22.deref.json @@ -11510,7 +11510,10 @@ "type": "string", "description": "The OAuth access token used to authenticate to the GitHub API." } - } + }, + "required": [ + "access_token" + ] }, "example": { "access_token": "e72e16c7e42f292c6912e7710c838347ae178b4a" @@ -51279,7 +51282,8 @@ "properties": { "encrypted_value": { "type": "string", - "description": "Value for your secret, encrypted with [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages) using the public key retrieved from the [Get an organization public key](https://docs.github.com/enterprise-server@2.22/rest/reference/actions#get-an-organization-public-key) endpoint." + "description": "Value for your secret, encrypted with [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages) using the public key retrieved from the [Get an organization public key](https://docs.github.com/enterprise-server@2.22/rest/reference/actions#get-an-organization-public-key) endpoint.", + "pattern": "^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=|[A-Za-z0-9+/]{4})$" }, "key_id": { "type": "string", @@ -51304,7 +51308,7 @@ } }, "example": { - "encrypted_value": "****************************************************************************************", + "encrypted_value": "c2VjcmV0", "key_id": "012345678912345678", "visibility": "selected", "selected_repository_ids": [ @@ -105823,7 +105827,8 @@ "properties": { "encrypted_value": { "type": "string", - "description": "Value for your secret, encrypted with [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages) using the public key retrieved from the [Get a repository public key](https://docs.github.com/enterprise-server@2.22/rest/reference/actions#get-a-repository-public-key) endpoint." + "description": "Value for your secret, encrypted with [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages) using the public key retrieved from the [Get a repository public key](https://docs.github.com/enterprise-server@2.22/rest/reference/actions#get-a-repository-public-key) endpoint.", + "pattern": "^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=|[A-Za-z0-9+/]{4})$" }, "key_id": { "type": "string", @@ -105832,7 +105837,7 @@ } }, "example": { - "encrypted_value": "****************************************************************************************", + "encrypted_value": "c2VjcmV0", "key_id": "012345678912345678" } } diff --git a/lib/rest/static/dereferenced/ghes-3.0.deref.json b/lib/rest/static/dereferenced/ghes-3.0.deref.json index 73908fe3f9..43df848cff 100644 --- a/lib/rest/static/dereferenced/ghes-3.0.deref.json +++ b/lib/rest/static/dereferenced/ghes-3.0.deref.json @@ -11724,7 +11724,10 @@ "type": "string", "description": "The OAuth access token used to authenticate to the GitHub API." } - } + }, + "required": [ + "access_token" + ] }, "example": { "access_token": "e72e16c7e42f292c6912e7710c838347ae178b4a" @@ -12131,7 +12134,10 @@ "single_file": "read" } } - } + }, + "required": [ + "access_token" + ] } } } @@ -55559,7 +55565,8 @@ "properties": { "encrypted_value": { "type": "string", - "description": "Value for your secret, encrypted with [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages) using the public key retrieved from the [Get an organization public key](https://docs.github.com/enterprise-server@3.0/rest/reference/actions#get-an-organization-public-key) endpoint." + "description": "Value for your secret, encrypted with [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages) using the public key retrieved from the [Get an organization public key](https://docs.github.com/enterprise-server@3.0/rest/reference/actions#get-an-organization-public-key) endpoint.", + "pattern": "^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=|[A-Za-z0-9+/]{4})$" }, "key_id": { "type": "string", @@ -55584,7 +55591,7 @@ } }, "example": { - "encrypted_value": "****************************************************************************************", + "encrypted_value": "c2VjcmV0", "key_id": "012345678912345678", "visibility": "selected", "selected_repository_ids": [ @@ -110822,7 +110829,8 @@ "properties": { "encrypted_value": { "type": "string", - "description": "Value for your secret, encrypted with [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages) using the public key retrieved from the [Get a repository public key](https://docs.github.com/enterprise-server@3.0/rest/reference/actions#get-a-repository-public-key) endpoint." + "description": "Value for your secret, encrypted with [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages) using the public key retrieved from the [Get a repository public key](https://docs.github.com/enterprise-server@3.0/rest/reference/actions#get-a-repository-public-key) endpoint.", + "pattern": "^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=|[A-Za-z0-9+/]{4})$" }, "key_id": { "type": "string", @@ -110831,7 +110839,7 @@ } }, "example": { - "encrypted_value": "****************************************************************************************", + "encrypted_value": "c2VjcmV0", "key_id": "012345678912345678" } } diff --git a/lib/rest/static/dereferenced/github.ae.deref.json b/lib/rest/static/dereferenced/github.ae.deref.json index e5f7910638..dadb4965e6 100644 --- a/lib/rest/static/dereferenced/github.ae.deref.json +++ b/lib/rest/static/dereferenced/github.ae.deref.json @@ -9559,7 +9559,10 @@ "type": "string", "description": "The OAuth access token used to authenticate to the GitHub API." } - } + }, + "required": [ + "access_token" + ] }, "example": { "access_token": "e72e16c7e42f292c6912e7710c838347ae178b4a" @@ -39222,7 +39225,8 @@ "properties": { "encrypted_value": { "type": "string", - "description": "Value for your secret, encrypted with [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages) using the public key retrieved from the [Get an organization public key](https://docs.github.com/github-ae@latest/rest/reference/actions#get-an-organization-public-key) endpoint." + "description": "Value for your secret, encrypted with [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages) using the public key retrieved from the [Get an organization public key](https://docs.github.com/github-ae@latest/rest/reference/actions#get-an-organization-public-key) endpoint.", + "pattern": "^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=|[A-Za-z0-9+/]{4})$" }, "key_id": { "type": "string", @@ -39247,7 +39251,7 @@ } }, "example": { - "encrypted_value": "****************************************************************************************", + "encrypted_value": "c2VjcmV0", "key_id": "012345678912345678", "visibility": "selected", "selected_repository_ids": [ @@ -93158,7 +93162,8 @@ "properties": { "encrypted_value": { "type": "string", - "description": "Value for your secret, encrypted with [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages) using the public key retrieved from the [Get a repository public key](https://docs.github.com/github-ae@latest/rest/reference/actions#get-a-repository-public-key) endpoint." + "description": "Value for your secret, encrypted with [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages) using the public key retrieved from the [Get a repository public key](https://docs.github.com/github-ae@latest/rest/reference/actions#get-a-repository-public-key) endpoint.", + "pattern": "^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=|[A-Za-z0-9+/]{4})$" }, "key_id": { "type": "string", @@ -93167,7 +93172,7 @@ } }, "example": { - "encrypted_value": "****************************************************************************************", + "encrypted_value": "c2VjcmV0", "key_id": "012345678912345678" } } @@ -149045,6 +149050,7 @@ "application/json": { "schema": { "type": "object", + "nullable": true, "properties": { "wait_timer": { "type": "integer", @@ -149053,6 +149059,7 @@ }, "reviewers": { "type": "array", + "nullable": true, "description": "The people or teams that may review jobs that reference the environment. You can list up to six users or teams as reviewers. The reviewers must have at least read access to the repository. Only one of the required reviewers needs to approve the job for it to proceed.", "items": { "type": "object", @@ -149093,7 +149100,8 @@ "custom_branch_policies" ] } - } + }, + "additionalProperties": false } } } @@ -242273,7 +242281,8 @@ "properties": { "encrypted_value": { "type": "string", - "description": "Value for your secret, encrypted with [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages) using the public key retrieved from the [Get an environment public key](https://docs.github.com/github-ae@latest/rest/reference/actions#get-an-environment-public-key) endpoint." + "description": "Value for your secret, encrypted with [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages) using the public key retrieved from the [Get an environment public key](https://docs.github.com/github-ae@latest/rest/reference/actions#get-an-environment-public-key) endpoint.", + "pattern": "^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=|[A-Za-z0-9+/]{4})$" }, "key_id": { "type": "string", @@ -242282,7 +242291,7 @@ } }, "example": { - "encrypted_value": "****************************************************************************************", + "encrypted_value": "c2VjcmV0", "key_id": "012345678912345678" } }