diff --git a/lib/rest/static/decorated/api.github.com.json b/lib/rest/static/decorated/api.github.com.json
index 6d062535b2..6f647f016e 100644
--- a/lib/rest/static/decorated/api.github.com.json
+++ b/lib/rest/static/decorated/api.github.com.json
@@ -3240,7 +3240,7 @@
}
],
"summary": "Create a scoped access token",
- "description": "Exchanges a non-repository scoped user-to-server OAuth access token for a repository scoped user-to-server OAuth access token. You can specify which repositories the token can access and which permissions are granted to the token. You must use [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) when accessing this endpoint, using the OAuth application's `client_id` and `client_secret` as the username and password. Invalid tokens will return `404 NOT FOUND`.",
+ "description": "Use a non-scoped user-to-server OAuth access token to create a repository scoped and/or permission scoped user-to-server OAuth access token. You can specify which repositories the token can access and which permissions are granted to the token. You must use [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) when accessing this endpoint, using the OAuth application's `client_id` and `client_secret` as the username and password. Invalid tokens will return `404 NOT FOUND`.",
"tags": [
"apps"
],
@@ -3257,12 +3257,12 @@
"properties": {
"access_token": {
"type": "string",
- "description": "
Required. Required. The OAuth access token used to authenticate to the GitHub API.
",
+ "description": "Required. The OAuth access token used to authenticate to the GitHub API.
",
"example": "e72e16c7e42f292c6912e7710c838347ae178b4a",
"name": "access_token",
"in": "body",
"rawType": "string",
- "rawDescription": "**Required.** The OAuth access token used to authenticate to the GitHub API.",
+ "rawDescription": "The OAuth access token used to authenticate to the GitHub API.",
"childParamsGroups": []
},
"target": {
@@ -4138,13 +4138,13 @@
"subcategory": "oauth-applications",
"subcategoryLabel": "Oauth applications",
"notes": [],
- "descriptionHTML": "Exchanges a non-repository scoped user-to-server OAuth access token for a repository scoped user-to-server OAuth access token. You can specify which repositories the token can access and which permissions are granted to the token. You must use Basic Authentication when accessing this endpoint, using the OAuth application's client_id and client_secret as the username and password. Invalid tokens will return 404 NOT FOUND.
",
+ "descriptionHTML": "Use a non-scoped user-to-server OAuth access token to create a repository scoped and/or permission scoped user-to-server OAuth access token. You can specify which repositories the token can access and which permissions are granted to the token. You must use Basic Authentication when accessing this endpoint, using the OAuth application's client_id and client_secret as the username and password. Invalid tokens will return 404 NOT FOUND.
",
"responses": [
{
"httpStatusCode": "200",
"httpStatusMessage": "OK",
"description": "Response",
- "payload": "{\n \"id\": 1,\n \"url\": \"https://api.github.com/authorizations/1\",\n \"scopes\": [\n \"public_repo\"\n ],\n \"token\": \"abcdefgh12345678\",\n \"token_last_eight\": \"12345678\",\n \"hashed_token\": \"25f94a2a5c7fbaf499c665bc73d67c1c87e496da8985131633ee0a95819db2e8\",\n \"app\": {\n \"url\": \"http://my-github-app.com\",\n \"name\": \"my github app\",\n \"client_id\": \"abcde12345fghij67890\"\n },\n \"note\": \"optional note\",\n \"note_url\": \"http://optional/note/url\",\n \"updated_at\": \"2011-09-06T20:39:23Z\",\n \"created_at\": \"2011-09-06T17:26:27Z\",\n \"fingerprint\": \"jklmnop12345678\",\n \"user\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"installation\": {\n \"permissions\": {\n \"metadata\": \"read\",\n \"issues\": \"write\",\n \"contents\": \"read\"\n },\n \"repository_selection\": \"selected\",\n \"single_file_name\": \".github/workflow.yml\",\n \"repositories_url\": \"https://api.github.com/user/repos\",\n \"account\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"has_multiple_single_files\": false,\n \"single_file_paths\": []\n }\n}\n
"
+ "payload": "{\n \"id\": 1,\n \"url\": \"https://api.github.com/authorizations/1\",\n \"scopes\": [],\n \"token\": \"abcdefgh12345678\",\n \"token_last_eight\": \"12345678\",\n \"hashed_token\": \"25f94a2a5c7fbaf499c665bc73d67c1c87e496da8985131633ee0a95819db2e8\",\n \"app\": {\n \"url\": \"http://my-github-app.com\",\n \"name\": \"my github app\",\n \"client_id\": \"abcde12345fghij67890\"\n },\n \"note\": \"optional note\",\n \"note_url\": \"http://optional/note/url\",\n \"updated_at\": \"2011-09-06T20:39:23Z\",\n \"created_at\": \"2011-09-06T17:26:27Z\",\n \"fingerprint\": \"jklmnop12345678\",\n \"user\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"installation\": {\n \"permissions\": {\n \"metadata\": \"read\",\n \"issues\": \"write\",\n \"contents\": \"read\"\n },\n \"repository_selection\": \"selected\",\n \"single_file_name\": \".github/workflow.yml\",\n \"repositories_url\": \"https://api.github.com/user/repos\",\n \"account\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"has_multiple_single_files\": false,\n \"single_file_paths\": []\n }\n}\n
"
},
{
"httpStatusCode": "401",
@@ -4170,12 +4170,12 @@
"bodyParameters": [
{
"type": "string",
- "description": "Required. Required. The OAuth access token used to authenticate to the GitHub API.
",
+ "description": "Required. The OAuth access token used to authenticate to the GitHub API.
",
"example": "e72e16c7e42f292c6912e7710c838347ae178b4a",
"name": "access_token",
"in": "body",
"rawType": "string",
- "rawDescription": "**Required.** The OAuth access token used to authenticate to the GitHub API.",
+ "rawDescription": "The OAuth access token used to authenticate to the GitHub API.",
"childParamsGroups": []
},
{
diff --git a/lib/rest/static/decorated/ghes-3.0.json b/lib/rest/static/decorated/ghes-3.0.json
index b6d49f2d94..cec736b230 100644
--- a/lib/rest/static/decorated/ghes-3.0.json
+++ b/lib/rest/static/decorated/ghes-3.0.json
@@ -6788,7 +6788,7 @@
}
],
"summary": "Create a scoped access token",
- "description": "Exchanges a non-repository scoped user-to-server OAuth access token for a repository scoped user-to-server OAuth access token. You can specify which repositories the token can access and which permissions are granted to the token. You must use [Basic Authentication](https://docs.github.com/enterprise-server@3.0/rest/overview/other-authentication-methods#basic-authentication) when accessing this endpoint, using the OAuth application's `client_id` and `client_secret` as the username and password. Invalid tokens will return `404 NOT FOUND`.",
+ "description": "Use a non-scoped user-to-server OAuth access token to create a repository scoped and/or permission scoped user-to-server OAuth access token. You can specify which repositories the token can access and which permissions are granted to the token. You must use [Basic Authentication](https://docs.github.com/enterprise-server@3.0/rest/overview/other-authentication-methods#basic-authentication) when accessing this endpoint, using the OAuth application's `client_id` and `client_secret` as the username and password. Invalid tokens will return `404 NOT FOUND`.",
"tags": [
"apps"
],
@@ -6805,12 +6805,12 @@
"properties": {
"access_token": {
"type": "string",
- "description": "Required. Required. The OAuth access token used to authenticate to the GitHub API.
",
+ "description": "Required. The OAuth access token used to authenticate to the GitHub API.
",
"example": "e72e16c7e42f292c6912e7710c838347ae178b4a",
"name": "access_token",
"in": "body",
"rawType": "string",
- "rawDescription": "**Required.** The OAuth access token used to authenticate to the GitHub API.",
+ "rawDescription": "The OAuth access token used to authenticate to the GitHub API.",
"childParamsGroups": []
},
"target": {
@@ -7686,13 +7686,13 @@
"subcategory": "oauth-applications",
"subcategoryLabel": "Oauth applications",
"notes": [],
- "descriptionHTML": "Exchanges a non-repository scoped user-to-server OAuth access token for a repository scoped user-to-server OAuth access token. You can specify which repositories the token can access and which permissions are granted to the token. You must use Basic Authentication when accessing this endpoint, using the OAuth application's client_id and client_secret as the username and password. Invalid tokens will return 404 NOT FOUND.
",
+ "descriptionHTML": "Use a non-scoped user-to-server OAuth access token to create a repository scoped and/or permission scoped user-to-server OAuth access token. You can specify which repositories the token can access and which permissions are granted to the token. You must use Basic Authentication when accessing this endpoint, using the OAuth application's client_id and client_secret as the username and password. Invalid tokens will return 404 NOT FOUND.
",
"responses": [
{
"httpStatusCode": "200",
"httpStatusMessage": "OK",
"description": "Response",
- "payload": "{\n \"id\": 1,\n \"url\": \"https://api.github.com/authorizations/1\",\n \"scopes\": [\n \"public_repo\"\n ],\n \"token\": \"abcdefgh12345678\",\n \"token_last_eight\": \"12345678\",\n \"hashed_token\": \"25f94a2a5c7fbaf499c665bc73d67c1c87e496da8985131633ee0a95819db2e8\",\n \"app\": {\n \"url\": \"http://my-github-app.com\",\n \"name\": \"my github app\",\n \"client_id\": \"abcde12345fghij67890\"\n },\n \"note\": \"optional note\",\n \"note_url\": \"http://optional/note/url\",\n \"updated_at\": \"2011-09-06T20:39:23Z\",\n \"created_at\": \"2011-09-06T17:26:27Z\",\n \"fingerprint\": \"jklmnop12345678\",\n \"user\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"installation\": {\n \"permissions\": {\n \"metadata\": \"read\",\n \"issues\": \"write\",\n \"contents\": \"read\"\n },\n \"repository_selection\": \"selected\",\n \"single_file_name\": \".github/workflow.yml\",\n \"repositories_url\": \"https://api.github.com/user/repos\",\n \"account\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"has_multiple_single_files\": false,\n \"single_file_paths\": []\n }\n}\n
"
+ "payload": "{\n \"id\": 1,\n \"url\": \"https://api.github.com/authorizations/1\",\n \"scopes\": [],\n \"token\": \"abcdefgh12345678\",\n \"token_last_eight\": \"12345678\",\n \"hashed_token\": \"25f94a2a5c7fbaf499c665bc73d67c1c87e496da8985131633ee0a95819db2e8\",\n \"app\": {\n \"url\": \"http://my-github-app.com\",\n \"name\": \"my github app\",\n \"client_id\": \"abcde12345fghij67890\"\n },\n \"note\": \"optional note\",\n \"note_url\": \"http://optional/note/url\",\n \"updated_at\": \"2011-09-06T20:39:23Z\",\n \"created_at\": \"2011-09-06T17:26:27Z\",\n \"fingerprint\": \"jklmnop12345678\",\n \"user\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"installation\": {\n \"permissions\": {\n \"metadata\": \"read\",\n \"issues\": \"write\",\n \"contents\": \"read\"\n },\n \"repository_selection\": \"selected\",\n \"single_file_name\": \".github/workflow.yml\",\n \"repositories_url\": \"https://api.github.com/user/repos\",\n \"account\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"has_multiple_single_files\": false,\n \"single_file_paths\": []\n }\n}\n
"
},
{
"httpStatusCode": "401",
@@ -7718,12 +7718,12 @@
"bodyParameters": [
{
"type": "string",
- "description": "Required. Required. The OAuth access token used to authenticate to the GitHub API.
",
+ "description": "Required. The OAuth access token used to authenticate to the GitHub API.
",
"example": "e72e16c7e42f292c6912e7710c838347ae178b4a",
"name": "access_token",
"in": "body",
"rawType": "string",
- "rawDescription": "**Required.** The OAuth access token used to authenticate to the GitHub API.",
+ "rawDescription": "The OAuth access token used to authenticate to the GitHub API.",
"childParamsGroups": []
},
{
diff --git a/lib/rest/static/decorated/github.ae.json b/lib/rest/static/decorated/github.ae.json
index 30abda5e88..6b837115e0 100644
--- a/lib/rest/static/decorated/github.ae.json
+++ b/lib/rest/static/decorated/github.ae.json
@@ -26847,86 +26847,6 @@
"bodyParameters": [],
"descriptionHTML": "Delete a specific workflow run. Anyone with write access to the repository can use this endpoint. If the repository is\nprivate you must use an access token with the repo scope. GitHub Apps must have the actions:write permission to use\nthis endpoint.
"
},
- {
- "verb": "get",
- "requestPath": "/repos/{owner}/{repo}/actions/runs/{run_id}/approvals",
- "serverUrl": "http(s)://api.{hostname}",
- "parameters": [
- {
- "name": "owner",
- "in": "path",
- "required": true,
- "schema": {
- "type": "string"
- },
- "descriptionHTML": ""
- },
- {
- "name": "repo",
- "in": "path",
- "required": true,
- "schema": {
- "type": "string"
- },
- "descriptionHTML": ""
- },
- {
- "name": "run_id",
- "description": "The id of the workflow run",
- "in": "path",
- "required": true,
- "schema": {
- "type": "integer"
- },
- "descriptionHTML": "The id of the workflow run
"
- }
- ],
- "x-codeSamples": [
- {
- "lang": "Shell",
- "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n http(s)://api.{hostname}/repos/octocat/hello-world/actions/runs/42/approvals",
- "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n http(s)://api.{hostname}/repos/octocat/hello-world/actions/runs/42/approvals
"
- },
- {
- "lang": "JavaScript",
- "source": "await octokit.request('GET /repos/{owner}/{repo}/actions/runs/{run_id}/approvals', {\n owner: 'octocat',\n repo: 'hello-world',\n run_id: 42\n})",
- "html": "await octokit.request('GET /repos/{owner}/{repo}/actions/runs/{run_id}/approvals', {\n owner: 'octocat',\n repo: 'hello-world',\n run_id: 42\n})\n
"
- }
- ],
- "summary": "Get the review history for a workflow run",
- "description": "Anyone with read access to the repository can use this endpoint. If the repository is private, you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint.",
- "tags": [
- "actions"
- ],
- "operationId": "actions/get-reviews-for-run",
- "externalDocs": {
- "description": "API method documentation",
- "url": "https://docs.github.com/github-ae@latest/rest/reference/actions#get-the-review-history-for-a-workflow-run"
- },
- "x-github": {
- "githubCloudOnly": false,
- "enabledForGitHubApps": true,
- "previews": [],
- "category": "actions",
- "subcategory": "workflow-runs"
- },
- "slug": "get-the-review-history-for-a-workflow-run",
- "category": "actions",
- "categoryLabel": "Actions",
- "subcategory": "workflow-runs",
- "subcategoryLabel": "Workflow runs",
- "notes": [],
- "bodyParameters": [],
- "descriptionHTML": "Anyone with read access to the repository can use this endpoint. If the repository is private, you must use an access token with the repo scope. GitHub Apps must have the actions:read permission to use this endpoint.
",
- "responses": [
- {
- "httpStatusCode": "200",
- "httpStatusMessage": "OK",
- "description": "response",
- "payload": "[\n {\n \"state\": \"approved\",\n \"comment\": \"Ship it!\",\n \"environments\": [\n {\n \"id\": 161088068,\n \"node_id\": \"MDExOkVudmlyb25tZW50MTYxMDg4MDY4\",\n \"name\": \"staging\",\n \"url\": \"https://api.github.com/repos/github/hello-world/environments/staging\",\n \"html_url\": \"https://github.com/github/hello-world/deployments/activity_log?environments_filter=staging\",\n \"created_at\": \"2020-11-23T22:00:40Z\",\n \"updated_at\": \"2020-11-23T22:00:40Z\"\n }\n ],\n \"user\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n }\n }\n]\n
"
- }
- ]
- },
{
"verb": "get",
"requestPath": "/repos/{owner}/{repo}/actions/runs/{run_id}/artifacts",
@@ -27379,265 +27299,6 @@
"bodyParameters": [],
"descriptionHTML": "Deletes all logs for a workflow run. You must authenticate using an access token with the repo scope to use this endpoint. GitHub Apps must have the actions:write permission to use this endpoint.
"
},
- {
- "verb": "get",
- "requestPath": "/repos/{owner}/{repo}/actions/runs/{run_id}/pending_deployments",
- "serverUrl": "http(s)://api.{hostname}",
- "parameters": [
- {
- "name": "owner",
- "in": "path",
- "required": true,
- "schema": {
- "type": "string"
- },
- "descriptionHTML": ""
- },
- {
- "name": "repo",
- "in": "path",
- "required": true,
- "schema": {
- "type": "string"
- },
- "descriptionHTML": ""
- },
- {
- "name": "run_id",
- "description": "The id of the workflow run",
- "in": "path",
- "required": true,
- "schema": {
- "type": "integer"
- },
- "descriptionHTML": "The id of the workflow run
"
- }
- ],
- "x-codeSamples": [
- {
- "lang": "Shell",
- "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n http(s)://api.{hostname}/repos/octocat/hello-world/actions/runs/42/pending_deployments",
- "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n http(s)://api.{hostname}/repos/octocat/hello-world/actions/runs/42/pending_deployments
"
- },
- {
- "lang": "JavaScript",
- "source": "await octokit.request('GET /repos/{owner}/{repo}/actions/runs/{run_id}/pending_deployments', {\n owner: 'octocat',\n repo: 'hello-world',\n run_id: 42\n})",
- "html": "await octokit.request('GET /repos/{owner}/{repo}/actions/runs/{run_id}/pending_deployments', {\n owner: 'octocat',\n repo: 'hello-world',\n run_id: 42\n})\n
"
- }
- ],
- "summary": "Get pending deployments for a workflow run",
- "description": "Get all deployment environments for a workflow run that are waiting for protection rules to pass.\n\nAnyone with read access to the repository can use this endpoint. If the repository is private, you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint.",
- "tags": [
- "actions"
- ],
- "operationId": "actions/get-pending-deployments-for-run",
- "externalDocs": {
- "description": "API method documentation",
- "url": "https://docs.github.com/github-ae@latest/rest/reference/actions#get-pending-deployments-for-a-workflow-run"
- },
- "x-github": {
- "githubCloudOnly": false,
- "enabledForGitHubApps": true,
- "previews": [],
- "category": "actions",
- "subcategory": "workflow-runs"
- },
- "slug": "get-pending-deployments-for-a-workflow-run",
- "category": "actions",
- "categoryLabel": "Actions",
- "subcategory": "workflow-runs",
- "subcategoryLabel": "Workflow runs",
- "notes": [],
- "bodyParameters": [],
- "descriptionHTML": "Get all deployment environments for a workflow run that are waiting for protection rules to pass.
\nAnyone with read access to the repository can use this endpoint. If the repository is private, you must use an access token with the repo scope. GitHub Apps must have the actions:read permission to use this endpoint.
",
- "responses": [
- {
- "httpStatusCode": "200",
- "httpStatusMessage": "OK",
- "description": "response",
- "payload": "[\n {\n \"environment\": {\n \"id\": 161088068,\n \"node_id\": \"MDExOkVudmlyb25tZW50MTYxMDg4MDY4\",\n \"name\": \"staging\",\n \"url\": \"https://api.github.com/repos/github/hello-world/environments/staging\",\n \"html_url\": \"https://github.com/github/hello-world/deployments/activity_log?environments_filter=staging\"\n },\n \"wait_timer\": 30,\n \"wait_timer_started_at\": \"2020-11-23T22:00:40Z\",\n \"current_user_can_approve\": true,\n \"reviewers\": [\n {\n \"type\": \"User\",\n \"reviewer\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n }\n },\n {\n \"type\": \"Team\",\n \"reviewer\": {\n \"id\": 1,\n \"node_id\": \"MDQ6VGVhbTE=\",\n \"url\": \"https://api.github.com/teams/1\",\n \"html_url\": \"https://github.com/orgs/github/teams/justice-league\",\n \"name\": \"Justice League\",\n \"slug\": \"justice-league\",\n \"description\": \"A great team.\",\n \"privacy\": \"closed\",\n \"permission\": \"admin\",\n \"members_url\": \"https://api.github.com/teams/1/members{/member}\",\n \"repositories_url\": \"https://api.github.com/teams/1/repos\"\n }\n }\n ]\n }\n]\n
"
- }
- ]
- },
- {
- "verb": "post",
- "requestPath": "/repos/{owner}/{repo}/actions/runs/{run_id}/pending_deployments",
- "serverUrl": "http(s)://api.{hostname}",
- "parameters": [
- {
- "name": "owner",
- "in": "path",
- "required": true,
- "schema": {
- "type": "string"
- },
- "descriptionHTML": ""
- },
- {
- "name": "repo",
- "in": "path",
- "required": true,
- "schema": {
- "type": "string"
- },
- "descriptionHTML": ""
- },
- {
- "name": "run_id",
- "description": "The id of the workflow run",
- "in": "path",
- "required": true,
- "schema": {
- "type": "integer"
- },
- "descriptionHTML": "The id of the workflow run
"
- }
- ],
- "x-codeSamples": [
- {
- "lang": "Shell",
- "source": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n http(s)://api.{hostname}/repos/octocat/hello-world/actions/runs/42/pending_deployments \\\n -d '{\"environment_ids\":[42],\"state\":\"state\",\"comment\":\"comment\"}'",
- "html": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n http(s)://api.{hostname}/repos/octocat/hello-world/actions/runs/42/pending_deployments \\\n -d '{\"environment_ids\":[42],\"state\":\"state\",\"comment\":\"comment\"}'
"
- },
- {
- "lang": "JavaScript",
- "source": "await octokit.request('POST /repos/{owner}/{repo}/actions/runs/{run_id}/pending_deployments', {\n owner: 'octocat',\n repo: 'hello-world',\n run_id: 42,\n environment_ids: [\n 42\n ],\n state: 'state',\n comment: 'comment'\n})",
- "html": "await octokit.request('POST /repos/{owner}/{repo}/actions/runs/{run_id}/pending_deployments', {\n owner: 'octocat',\n repo: 'hello-world',\n run_id: 42,\n environment_ids: [\n 42\n ],\n state: 'state',\n comment: 'comment'\n})\n
"
- }
- ],
- "summary": "Review pending deployments for a workflow run",
- "description": "Approve or reject pending deployments that are waiting on approval by a required reviewer.\n\nAnyone with read access to the repository contents and deployments can use this endpoint.",
- "tags": [
- "actions"
- ],
- "operationId": "actions/review-pending-deployments-for-run",
- "externalDocs": {
- "description": "API method documentation",
- "url": "https://docs.github.com/github-ae@latest/rest/reference/actions#review-pending-deployments-for-a-workflow-run"
- },
- "requestBody": {
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "environment_ids": {
- "type": "array of integers",
- "description": "Required. The list of environment ids to approve or reject
",
- "example": [
- 161171787,
- 161171795
- ],
- "items": {
- "type": "integer",
- "example": 161171787
- },
- "name": "environment_ids",
- "in": "body",
- "rawType": "array",
- "rawDescription": "The list of environment ids to approve or reject",
- "childParamsGroups": []
- },
- "state": {
- "type": "string",
- "description": "Required. Whether to approve or reject deployment to the specified environments. Must be one of: approved or rejected
",
- "enum": [
- "approved",
- "rejected"
- ],
- "example": "approved",
- "name": "state",
- "in": "body",
- "rawType": "string",
- "rawDescription": "Whether to approve or reject deployment to the specified environments. Must be one of: `approved` or `rejected`",
- "childParamsGroups": []
- },
- "comment": {
- "type": "string",
- "description": "Required. A comment to accompany the deployment review
",
- "example": "Ship it!",
- "name": "comment",
- "in": "body",
- "rawType": "string",
- "rawDescription": "A comment to accompany the deployment review",
- "childParamsGroups": []
- }
- },
- "required": [
- "environment_ids",
- "state",
- "comment"
- ]
- }
- }
- }
- },
- "x-github": {
- "githubCloudOnly": false,
- "enabledForGitHubApps": true,
- "previews": [],
- "category": "actions",
- "subcategory": "workflow-runs"
- },
- "slug": "review-pending-deployments-for-a-workflow-run",
- "category": "actions",
- "categoryLabel": "Actions",
- "subcategory": "workflow-runs",
- "subcategoryLabel": "Workflow runs",
- "notes": [],
- "descriptionHTML": "Approve or reject pending deployments that are waiting on approval by a required reviewer.
\nAnyone with read access to the repository contents and deployments can use this endpoint.
",
- "bodyParameters": [
- {
- "type": "array of integers",
- "description": "Required. The list of environment ids to approve or reject
",
- "example": [
- 161171787,
- 161171795
- ],
- "items": {
- "type": "integer",
- "example": 161171787
- },
- "name": "environment_ids",
- "in": "body",
- "rawType": "array",
- "rawDescription": "The list of environment ids to approve or reject",
- "childParamsGroups": []
- },
- {
- "type": "string",
- "description": "Required. Whether to approve or reject deployment to the specified environments. Must be one of: approved or rejected
",
- "enum": [
- "approved",
- "rejected"
- ],
- "example": "approved",
- "name": "state",
- "in": "body",
- "rawType": "string",
- "rawDescription": "Whether to approve or reject deployment to the specified environments. Must be one of: `approved` or `rejected`",
- "childParamsGroups": []
- },
- {
- "type": "string",
- "description": "Required. A comment to accompany the deployment review
",
- "example": "Ship it!",
- "name": "comment",
- "in": "body",
- "rawType": "string",
- "rawDescription": "A comment to accompany the deployment review",
- "childParamsGroups": []
- }
- ],
- "responses": [
- {
- "httpStatusCode": "200",
- "httpStatusMessage": "OK",
- "description": "response",
- "payload": "[\n {\n \"url\": \"https://api.github.com/repos/octocat/example/deployments/1\",\n \"id\": 1,\n \"node_id\": \"MDEwOkRlcGxveW1lbnQx\",\n \"sha\": \"a84d88e7554fc1fa21bcbc4efae3c782a70d2b9d\",\n \"ref\": \"topic-branch\",\n \"task\": \"deploy\",\n \"payload\": {},\n \"original_environment\": \"staging\",\n \"environment\": \"production\",\n \"description\": \"Deploy request from hubot\",\n \"creator\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"created_at\": \"2012-07-20T01:19:13Z\",\n \"updated_at\": \"2012-07-20T01:19:13Z\",\n \"statuses_url\": \"https://api.github.com/repos/octocat/example/deployments/1/statuses\",\n \"repository_url\": \"https://api.github.com/repos/octocat/example\",\n \"transient_environment\": false,\n \"production_environment\": true\n }\n]\n
"
- }
- ]
- },
{
"verb": "post",
"requestPath": "/repos/{owner}/{repo}/actions/runs/{run_id}/rerun",
@@ -45088,616 +44749,6 @@
}
]
},
- {
- "verb": "get",
- "requestPath": "/repos/{owner}/{repo}/environments",
- "serverUrl": "http(s)://api.{hostname}",
- "parameters": [
- {
- "name": "owner",
- "in": "path",
- "required": true,
- "schema": {
- "type": "string"
- },
- "descriptionHTML": ""
- },
- {
- "name": "repo",
- "in": "path",
- "required": true,
- "schema": {
- "type": "string"
- },
- "descriptionHTML": ""
- }
- ],
- "x-codeSamples": [
- {
- "lang": "Shell",
- "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n http(s)://api.{hostname}/repos/octocat/hello-world/environments",
- "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n http(s)://api.{hostname}/repos/octocat/hello-world/environments
"
- },
- {
- "lang": "JavaScript",
- "source": "await octokit.request('GET /repos/{owner}/{repo}/environments', {\n owner: 'octocat',\n repo: 'hello-world'\n})",
- "html": "await octokit.request('GET /repos/{owner}/{repo}/environments', {\n owner: 'octocat',\n repo: 'hello-world'\n})\n
"
- }
- ],
- "summary": "Get all environments",
- "description": "Get all environments for a repository.\n\nAnyone with read access to the repository can use this endpoint. If the repository is private, you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint.",
- "tags": [
- "repos"
- ],
- "operationId": "repos/get-all-environments",
- "externalDocs": {
- "description": "API method documentation",
- "url": "https://docs.github.com/github-ae@latest/rest/reference/repos#get-all-environments"
- },
- "x-github": {
- "githubCloudOnly": false,
- "enabledForGitHubApps": true,
- "previews": [],
- "category": "repos",
- "subcategory": "environments"
- },
- "slug": "get-all-environments",
- "category": "repos",
- "categoryLabel": "Repos",
- "subcategory": "environments",
- "subcategoryLabel": "Environments",
- "notes": [],
- "bodyParameters": [],
- "descriptionHTML": "Get all environments for a repository.
\nAnyone with read access to the repository can use this endpoint. If the repository is private, you must use an access token with the repo scope. GitHub Apps must have the actions:read permission to use this endpoint.
",
- "responses": [
- {
- "httpStatusCode": "200",
- "httpStatusMessage": "OK",
- "description": "response",
- "payload": "{\n \"total_count\": 1,\n \"environments\": [\n {\n \"id\": 161088068,\n \"node_id\": \"MDExOkVudmlyb25tZW50MTYxMDg4MDY4\",\n \"name\": \"staging\",\n \"url\": \"https://api.github.com/repos/github/hello-world/environments/staging\",\n \"html_url\": \"https://github.com/github/hello-world/deployments/activity_log?environments_filter=staging\",\n \"created_at\": \"2020-11-23T22:00:40Z\",\n \"updated_at\": \"2020-11-23T22:00:40Z\",\n \"protection_rules\": [\n {\n \"id\": 3736,\n \"node_id\": \"MDQ6R2F0ZTM3MzY=\",\n \"type\": \"wait_timer\",\n \"wait_timer\": 30\n },\n {\n \"id\": 3755,\n \"node_id\": \"MDQ6R2F0ZTM3NTU=\",\n \"type\": \"required_reviewers\",\n \"reviewers\": [\n {\n \"type\": \"User\",\n \"reviewer\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n }\n },\n {\n \"type\": \"Team\",\n \"reviewer\": {\n \"id\": 1,\n \"node_id\": \"MDQ6VGVhbTE=\",\n \"url\": \"https://api.github.com/teams/1\",\n \"html_url\": \"https://github.com/orgs/github/teams/justice-league\",\n \"name\": \"Justice League\",\n \"slug\": \"justice-league\",\n \"description\": \"A great team.\",\n \"privacy\": \"closed\",\n \"permission\": \"admin\",\n \"members_url\": \"https://api.github.com/teams/1/members{/member}\",\n \"repositories_url\": \"https://api.github.com/teams/1/repos\"\n }\n }\n ]\n },\n {\n \"id\": 3756,\n \"node_id\": \"MDQ6R2F0ZTM3NTY=\",\n \"type\": \"branch_policy\"\n }\n ],\n \"deployment_branch_policy\": {\n \"protected_branches\": false,\n \"custom_branch_policies\": true\n }\n }\n ]\n}\n
"
- }
- ]
- },
- {
- "verb": "get",
- "requestPath": "/repos/{owner}/{repo}/environments/{environment_name}",
- "serverUrl": "http(s)://api.{hostname}",
- "parameters": [
- {
- "name": "owner",
- "in": "path",
- "required": true,
- "schema": {
- "type": "string"
- },
- "descriptionHTML": ""
- },
- {
- "name": "repo",
- "in": "path",
- "required": true,
- "schema": {
- "type": "string"
- },
- "descriptionHTML": ""
- },
- {
- "name": "environment_name",
- "in": "path",
- "required": true,
- "description": "The name of the environment",
- "schema": {
- "type": "string"
- },
- "descriptionHTML": "The name of the environment
"
- }
- ],
- "x-codeSamples": [
- {
- "lang": "Shell",
- "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n http(s)://api.{hostname}/repos/octocat/hello-world/environments/ENVIRONMENT_NAME",
- "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n http(s)://api.{hostname}/repos/octocat/hello-world/environments/ENVIRONMENT_NAME
"
- },
- {
- "lang": "JavaScript",
- "source": "await octokit.request('GET /repos/{owner}/{repo}/environments/{environment_name}', {\n owner: 'octocat',\n repo: 'hello-world',\n environment_name: 'environment_name'\n})",
- "html": "await octokit.request('GET /repos/{owner}/{repo}/environments/{environment_name}', {\n owner: 'octocat',\n repo: 'hello-world',\n environment_name: 'environment_name'\n})\n
"
- }
- ],
- "summary": "Get an environment",
- "description": "Anyone with read access to the repository can use this endpoint. If the repository is private, you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint.",
- "tags": [
- "repos"
- ],
- "operationId": "repos/get-environment",
- "externalDocs": {
- "description": "API method documentation",
- "url": "https://docs.github.com/github-ae@latest/rest/reference/repos#get-an-environment"
- },
- "x-github": {
- "githubCloudOnly": false,
- "enabledForGitHubApps": true,
- "previews": [],
- "category": "repos",
- "subcategory": "environments"
- },
- "slug": "get-an-environment",
- "category": "repos",
- "categoryLabel": "Repos",
- "subcategory": "environments",
- "subcategoryLabel": "Environments",
- "notes": [],
- "bodyParameters": [],
- "descriptionHTML": "Anyone with read access to the repository can use this endpoint. If the repository is private, you must use an access token with the repo scope. GitHub Apps must have the actions:read permission to use this endpoint.
",
- "responses": [
- {
- "httpStatusCode": "200",
- "httpStatusMessage": "OK",
- "description": "response",
- "payload": "{\n \"id\": 161088068,\n \"node_id\": \"MDExOkVudmlyb25tZW50MTYxMDg4MDY4\",\n \"name\": \"staging\",\n \"url\": \"https://api.github.com/repos/github/hello-world/environments/staging\",\n \"html_url\": \"https://github.com/github/hello-world/deployments/activity_log?environments_filter=staging\",\n \"created_at\": \"2020-11-23T22:00:40Z\",\n \"updated_at\": \"2020-11-23T22:00:40Z\",\n \"protection_rules\": [\n {\n \"id\": 3736,\n \"node_id\": \"MDQ6R2F0ZTM3MzY=\",\n \"type\": \"wait_timer\",\n \"wait_timer\": 30\n },\n {\n \"id\": 3755,\n \"node_id\": \"MDQ6R2F0ZTM3NTU=\",\n \"type\": \"required_reviewers\",\n \"reviewers\": [\n {\n \"type\": \"User\",\n \"reviewer\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n }\n },\n {\n \"type\": \"Team\",\n \"reviewer\": {\n \"id\": 1,\n \"node_id\": \"MDQ6VGVhbTE=\",\n \"url\": \"https://api.github.com/teams/1\",\n \"html_url\": \"https://github.com/orgs/github/teams/justice-league\",\n \"name\": \"Justice League\",\n \"slug\": \"justice-league\",\n \"description\": \"A great team.\",\n \"privacy\": \"closed\",\n \"permission\": \"admin\",\n \"members_url\": \"https://api.github.com/teams/1/members{/member}\",\n \"repositories_url\": \"https://api.github.com/teams/1/repos\"\n }\n }\n ]\n },\n {\n \"id\": 3756,\n \"node_id\": \"MDQ6R2F0ZTM3NTY=\",\n \"type\": \"branch_policy\"\n }\n ],\n \"deployment_branch_policy\": {\n \"protected_branches\": false,\n \"custom_branch_policies\": true\n }\n}\n
"
- }
- ]
- },
- {
- "verb": "put",
- "requestPath": "/repos/{owner}/{repo}/environments/{environment_name}",
- "serverUrl": "http(s)://api.{hostname}",
- "parameters": [
- {
- "name": "owner",
- "in": "path",
- "required": true,
- "schema": {
- "type": "string"
- },
- "descriptionHTML": ""
- },
- {
- "name": "repo",
- "in": "path",
- "required": true,
- "schema": {
- "type": "string"
- },
- "descriptionHTML": ""
- },
- {
- "name": "environment_name",
- "in": "path",
- "required": true,
- "description": "The name of the environment",
- "schema": {
- "type": "string"
- },
- "descriptionHTML": "The name of the environment
"
- }
- ],
- "x-codeSamples": [
- {
- "lang": "Shell",
- "source": "curl \\\n -X PUT \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n http(s)://api.{hostname}/repos/octocat/hello-world/environments/ENVIRONMENT_NAME \\\n -d '{\"wait_timer\":42}'",
- "html": "curl \\\n -X PUT \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n http(s)://api.{hostname}/repos/octocat/hello-world/environments/ENVIRONMENT_NAME \\\n -d '{\"wait_timer\":42}'
"
- },
- {
- "lang": "JavaScript",
- "source": "await octokit.request('PUT /repos/{owner}/{repo}/environments/{environment_name}', {\n owner: 'octocat',\n repo: 'hello-world',\n environment_name: 'environment_name',\n wait_timer: 42\n})",
- "html": "await octokit.request('PUT /repos/{owner}/{repo}/environments/{environment_name}', {\n owner: 'octocat',\n repo: 'hello-world',\n environment_name: 'environment_name',\n wait_timer: 42\n})\n
"
- }
- ],
- "summary": "Create or update an environment",
- "description": "Create or update an environment with protection rules, such as required reviewers. For more information about environment protection rules, see \"[Environments](/actions/reference/environments#environment-protection-rules).\"\n\n**Note:** Although you can use this operation to specify that only branches that match specified name patterns can deploy to this environment, you must use the UI to set the name patterns. For more information, see \"[Environments](/actions/reference/environments#deployment-branches).\"\n\n**Note:** To create or update secrets for an environment, see \"[Secrets](/rest/reference/actions#secrets).\"\n\nYou must authenticate using an access token with the repo scope to use this endpoint.",
- "tags": [
- "repos"
- ],
- "operationId": "repos/create-or-update-environment",
- "externalDocs": {
- "description": "API method documentation",
- "url": "https://docs.github.com/github-ae@latest/rest/reference/repos#create-or-update-an-environment"
- },
- "requestBody": {
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "nullable": true,
- "properties": {
- "wait_timer": {
- "type": "integer",
- "example": 30,
- "description": "The amount of time to delay a job after the job is initially triggered. The time (in minutes) must be an integer between 0 and 43,200 (30 days).
",
- "name": "wait_timer",
- "in": "body",
- "rawType": "integer",
- "rawDescription": "The amount of time to delay a job after the job is initially triggered. The time (in minutes) must be an integer between 0 and 43,200 (30 days).",
- "childParamsGroups": []
- },
- "reviewers": {
- "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",
- "properties": {
- "type": {
- "type": "string",
- "description": "The type of reviewer. Must be one of: User or Team
",
- "enum": [
- "User",
- "Team"
- ],
- "example": "User",
- "name": "type",
- "in": "body",
- "rawType": "string",
- "rawDescription": "The type of reviewer. Must be one of: `User` or `Team`",
- "childParamsGroups": []
- },
- "id": {
- "type": "integer",
- "description": "The id of the user or team who can review the deployment
",
- "example": 4532992,
- "name": "id",
- "in": "body",
- "rawType": "integer",
- "rawDescription": "The id of the user or team who can review the deployment",
- "childParamsGroups": []
- }
- }
- },
- "name": "reviewers",
- "in": "body",
- "rawType": "array",
- "rawDescription": "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.",
- "childParamsGroups": [
- {
- "parentName": "reviewers",
- "parentType": "items",
- "id": "reviewers-items",
- "params": [
- {
- "type": "string",
- "description": "The type of reviewer. Must be one of: User or Team
",
- "enum": [
- "User",
- "Team"
- ],
- "example": "User",
- "name": "type",
- "in": "body",
- "rawType": "string",
- "rawDescription": "The type of reviewer. Must be one of: `User` or `Team`",
- "childParamsGroups": []
- },
- {
- "type": "integer",
- "description": "The id of the user or team who can review the deployment
",
- "example": 4532992,
- "name": "id",
- "in": "body",
- "rawType": "integer",
- "rawDescription": "The id of the user or team who can review the deployment",
- "childParamsGroups": []
- }
- ]
- }
- ]
- },
- "deployment_branch_policy": {
- "type": "object or null",
- "description": "The type of deployment branch policy for this environment. To allow all branches to deploy, set to null.
",
- "properties": {
- "protected_branches": {
- "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": []
- },
- "custom_branch_policies": {
- "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": []
- }
- },
- "nullable": true,
- "required": [
- "protected_branches",
- "custom_branch_policies"
- ],
- "name": "deployment_branch_policy",
- "in": "body",
- "rawType": "object",
- "rawDescription": "The type of deployment branch policy for this environment. To allow all branches to deploy, set to `null`.",
- "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": []
- }
- ]
- }
- ]
- }
- },
- "additionalProperties": false
- }
- }
- }
- },
- "x-github": {
- "githubCloudOnly": false,
- "enabledForGitHubApps": true,
- "previews": [],
- "category": "repos",
- "subcategory": "environments"
- },
- "slug": "create-or-update-an-environment",
- "category": "repos",
- "categoryLabel": "Repos",
- "subcategory": "environments",
- "subcategoryLabel": "Environments",
- "notes": [],
- "descriptionHTML": "Create or update an environment with protection rules, such as required reviewers. For more information about environment protection rules, see \"Environments.\"
\nNote: Although you can use this operation to specify that only branches that match specified name patterns can deploy to this environment, you must use the UI to set the name patterns. For more information, see \"Environments.\"
\nNote: To create or update secrets for an environment, see \"Secrets.\"
\nYou must authenticate using an access token with the repo scope to use this endpoint.
",
- "responses": [
- {
- "httpStatusCode": "200",
- "httpStatusMessage": "OK",
- "description": "response",
- "payload": "{\n \"id\": 161088068,\n \"node_id\": \"MDExOkVudmlyb25tZW50MTYxMDg4MDY4\",\n \"name\": \"staging\",\n \"url\": \"https://api.github.com/repos/github/hello-world/environments/staging\",\n \"html_url\": \"https://github.com/github/hello-world/deployments/activity_log?environments_filter=staging\",\n \"created_at\": \"2020-11-23T22:00:40Z\",\n \"updated_at\": \"2020-11-23T22:00:40Z\",\n \"protection_rules\": [\n {\n \"id\": 3736,\n \"node_id\": \"MDQ6R2F0ZTM3MzY=\",\n \"type\": \"wait_timer\",\n \"wait_timer\": 30\n },\n {\n \"id\": 3755,\n \"node_id\": \"MDQ6R2F0ZTM3NTU=\",\n \"type\": \"required_reviewers\",\n \"reviewers\": [\n {\n \"type\": \"User\",\n \"reviewer\": {\n \"login\": \"octocat\",\n \"id\": 1,\n \"node_id\": \"MDQ6VXNlcjE=\",\n \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/octocat\",\n \"html_url\": \"https://github.com/octocat\",\n \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n }\n },\n {\n \"type\": \"Team\",\n \"reviewer\": {\n \"id\": 1,\n \"node_id\": \"MDQ6VGVhbTE=\",\n \"url\": \"https://api.github.com/teams/1\",\n \"html_url\": \"https://github.com/orgs/github/teams/justice-league\",\n \"name\": \"Justice League\",\n \"slug\": \"justice-league\",\n \"description\": \"A great team.\",\n \"privacy\": \"closed\",\n \"permission\": \"admin\",\n \"members_url\": \"https://api.github.com/teams/1/members{/member}\",\n \"repositories_url\": \"https://api.github.com/teams/1/repos\"\n }\n }\n ]\n },\n {\n \"id\": 3756,\n \"node_id\": \"MDQ6R2F0ZTM3NTY=\",\n \"type\": \"branch_policy\"\n }\n ],\n \"deployment_branch_policy\": {\n \"protected_branches\": false,\n \"custom_branch_policies\": true\n }\n}\n
"
- },
- {
- "httpStatusCode": "422",
- "httpStatusMessage": "Unprocessable Entity",
- "description": "Validation error when the environment name is invalid or when `protected_branches` and `custom_branch_policies` in `deployment_branch_policy` are set to the same value"
- }
- ],
- "bodyParameters": [
- {
- "type": "integer",
- "example": 30,
- "description": "The amount of time to delay a job after the job is initially triggered. The time (in minutes) must be an integer between 0 and 43,200 (30 days).
",
- "name": "wait_timer",
- "in": "body",
- "rawType": "integer",
- "rawDescription": "The amount of time to delay a job after the job is initially triggered. The time (in minutes) must be an integer between 0 and 43,200 (30 days).",
- "childParamsGroups": []
- },
- {
- "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",
- "properties": {
- "type": {
- "type": "string",
- "description": "The type of reviewer. Must be one of: User or Team
",
- "enum": [
- "User",
- "Team"
- ],
- "example": "User",
- "name": "type",
- "in": "body",
- "rawType": "string",
- "rawDescription": "The type of reviewer. Must be one of: `User` or `Team`",
- "childParamsGroups": []
- },
- "id": {
- "type": "integer",
- "description": "The id of the user or team who can review the deployment
",
- "example": 4532992,
- "name": "id",
- "in": "body",
- "rawType": "integer",
- "rawDescription": "The id of the user or team who can review the deployment",
- "childParamsGroups": []
- }
- }
- },
- "name": "reviewers",
- "in": "body",
- "rawType": "array",
- "rawDescription": "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.",
- "childParamsGroups": [
- {
- "parentName": "reviewers",
- "parentType": "items",
- "id": "reviewers-items",
- "params": [
- {
- "type": "string",
- "description": "The type of reviewer. Must be one of: User or Team
",
- "enum": [
- "User",
- "Team"
- ],
- "example": "User",
- "name": "type",
- "in": "body",
- "rawType": "string",
- "rawDescription": "The type of reviewer. Must be one of: `User` or `Team`",
- "childParamsGroups": []
- },
- {
- "type": "integer",
- "description": "The id of the user or team who can review the deployment
",
- "example": 4532992,
- "name": "id",
- "in": "body",
- "rawType": "integer",
- "rawDescription": "The id of the user or team who can review the deployment",
- "childParamsGroups": []
- }
- ]
- }
- ]
- },
- {
- "type": "object or null",
- "description": "The type of deployment branch policy for this environment. To allow all branches to deploy, set to null.
",
- "properties": {
- "protected_branches": {
- "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": []
- },
- "custom_branch_policies": {
- "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": []
- }
- },
- "nullable": true,
- "required": [
- "protected_branches",
- "custom_branch_policies"
- ],
- "name": "deployment_branch_policy",
- "in": "body",
- "rawType": "object",
- "rawDescription": "The type of deployment branch policy for this environment. To allow all branches to deploy, set to `null`.",
- "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": []
- }
- ]
- }
- ]
- }
- ]
- },
- {
- "verb": "delete",
- "requestPath": "/repos/{owner}/{repo}/environments/{environment_name}",
- "serverUrl": "http(s)://api.{hostname}",
- "parameters": [
- {
- "name": "owner",
- "in": "path",
- "required": true,
- "schema": {
- "type": "string"
- },
- "descriptionHTML": ""
- },
- {
- "name": "repo",
- "in": "path",
- "required": true,
- "schema": {
- "type": "string"
- },
- "descriptionHTML": ""
- },
- {
- "name": "environment_name",
- "in": "path",
- "required": true,
- "description": "The name of the environment",
- "schema": {
- "type": "string"
- },
- "descriptionHTML": "The name of the environment
"
- }
- ],
- "x-codeSamples": [
- {
- "lang": "Shell",
- "source": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n http(s)://api.{hostname}/repos/octocat/hello-world/environments/ENVIRONMENT_NAME",
- "html": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n http(s)://api.{hostname}/repos/octocat/hello-world/environments/ENVIRONMENT_NAME
"
- },
- {
- "lang": "JavaScript",
- "source": "await octokit.request('DELETE /repos/{owner}/{repo}/environments/{environment_name}', {\n owner: 'octocat',\n repo: 'hello-world',\n environment_name: 'environment_name'\n})",
- "html": "await octokit.request('DELETE /repos/{owner}/{repo}/environments/{environment_name}', {\n owner: 'octocat',\n repo: 'hello-world',\n environment_name: 'environment_name'\n})\n
"
- }
- ],
- "summary": "Delete an environment",
- "description": "You must authenticate using an access token with the repo scope to use this endpoint.",
- "tags": [
- "repos"
- ],
- "operationId": "repos/delete-an-environment",
- "externalDocs": {
- "description": "API method documentation",
- "url": "https://docs.github.com/github-ae@latest/rest/reference/repos#delete-an-environment"
- },
- "x-github": {
- "githubCloudOnly": false,
- "enabledForGitHubApps": true,
- "previews": [],
- "category": "repos",
- "subcategory": "environments"
- },
- "slug": "delete-an-environment",
- "category": "repos",
- "categoryLabel": "Repos",
- "subcategory": "environments",
- "subcategoryLabel": "Environments",
- "notes": [],
- "responses": [
- {
- "httpStatusCode": "204",
- "httpStatusMessage": "No Content",
- "description": "Default response"
- }
- ],
- "bodyParameters": [],
- "descriptionHTML": "You must authenticate using an access token with the repo scope to use this endpoint.
"
- },
{
"verb": "get",
"requestPath": "/repos/{owner}/{repo}/events",
@@ -65973,468 +65024,6 @@
}
]
},
- {
- "verb": "get",
- "requestPath": "/repositories/{repository_id}/environments/{environment_name}/secrets",
- "serverUrl": "http(s)://api.{hostname}",
- "parameters": [
- {
- "name": "repository_id",
- "in": "path",
- "required": true,
- "schema": {
- "type": "integer"
- },
- "descriptionHTML": ""
- },
- {
- "name": "environment_name",
- "in": "path",
- "required": true,
- "description": "The name of the environment",
- "schema": {
- "type": "string"
- },
- "descriptionHTML": "The name of the environment
"
- },
- {
- "name": "per_page",
- "description": "Results per page (max 100).",
- "in": "query",
- "schema": {
- "type": "integer",
- "default": 30
- },
- "descriptionHTML": "Results per page (max 100).
"
- },
- {
- "name": "page",
- "description": "Page number of the results to fetch.",
- "in": "query",
- "schema": {
- "type": "integer",
- "default": 1
- },
- "descriptionHTML": "Page number of the results to fetch.
"
- }
- ],
- "x-codeSamples": [
- {
- "lang": "Shell",
- "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n http(s)://api.{hostname}/repositories/42/environments/ENVIRONMENT_NAME/secrets",
- "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n http(s)://api.{hostname}/repositories/42/environments/ENVIRONMENT_NAME/secrets
"
- },
- {
- "lang": "JavaScript",
- "source": "await octokit.request('GET /repositories/{repository_id}/environments/{environment_name}/secrets', {\n repository_id: 42,\n environment_name: 'environment_name'\n})",
- "html": "await octokit.request('GET /repositories/{repository_id}/environments/{environment_name}/secrets', {\n repository_id: 42,\n environment_name: 'environment_name'\n})\n
"
- }
- ],
- "summary": "List environment secrets",
- "description": "Lists all secrets available in an environment without revealing their encrypted values. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use this endpoint.",
- "tags": [
- "actions"
- ],
- "operationId": "actions/list-environment-secrets",
- "externalDocs": {
- "description": "API method documentation",
- "url": "https://docs.github.com/github-ae@latest/rest/reference/actions#list-environment-secrets"
- },
- "x-github": {
- "githubCloudOnly": false,
- "enabledForGitHubApps": true,
- "previews": [],
- "category": "actions",
- "subcategory": "secrets"
- },
- "slug": "list-environment-secrets",
- "category": "actions",
- "categoryLabel": "Actions",
- "subcategory": "secrets",
- "subcategoryLabel": "Secrets",
- "notes": [],
- "bodyParameters": [],
- "descriptionHTML": "Lists all secrets available in an environment without revealing their encrypted values. You must authenticate using an access token with the repo scope to use this endpoint. GitHub Apps must have the secrets repository permission to use this endpoint.
",
- "responses": [
- {
- "httpStatusCode": "200",
- "httpStatusMessage": "OK",
- "description": "response",
- "payload": "{\n \"total_count\": 2,\n \"secrets\": [\n {\n \"name\": \"GH_TOKEN\",\n \"created_at\": \"2019-08-10T14:59:22Z\",\n \"updated_at\": \"2020-01-10T14:59:22Z\"\n },\n {\n \"name\": \"GIST_ID\",\n \"created_at\": \"2020-01-10T10:59:22Z\",\n \"updated_at\": \"2020-01-11T11:59:22Z\"\n }\n ]\n}\n
"
- }
- ]
- },
- {
- "verb": "get",
- "requestPath": "/repositories/{repository_id}/environments/{environment_name}/secrets/public-key",
- "serverUrl": "http(s)://api.{hostname}",
- "parameters": [
- {
- "name": "repository_id",
- "in": "path",
- "required": true,
- "schema": {
- "type": "integer"
- },
- "descriptionHTML": ""
- },
- {
- "name": "environment_name",
- "in": "path",
- "required": true,
- "description": "The name of the environment",
- "schema": {
- "type": "string"
- },
- "descriptionHTML": "The name of the environment
"
- }
- ],
- "x-codeSamples": [
- {
- "lang": "Shell",
- "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n http(s)://api.{hostname}/repositories/42/environments/ENVIRONMENT_NAME/secrets/public-key",
- "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n http(s)://api.{hostname}/repositories/42/environments/ENVIRONMENT_NAME/secrets/public-key
"
- },
- {
- "lang": "JavaScript",
- "source": "await octokit.request('GET /repositories/{repository_id}/environments/{environment_name}/secrets/public-key', {\n repository_id: 42,\n environment_name: 'environment_name'\n})",
- "html": "await octokit.request('GET /repositories/{repository_id}/environments/{environment_name}/secrets/public-key', {\n repository_id: 42,\n environment_name: 'environment_name'\n})\n
"
- }
- ],
- "summary": "Get an environment public key",
- "description": "Get the public key for an environment, which you need to encrypt environment secrets. You need to encrypt a secret before you can create or update secrets. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `secrets` repository permission to use this endpoint.",
- "tags": [
- "actions"
- ],
- "operationId": "actions/get-environment-public-key",
- "externalDocs": {
- "description": "API method documentation",
- "url": "https://docs.github.com/github-ae@latest/rest/reference/actions#get-an-environment-public-key"
- },
- "x-github": {
- "githubCloudOnly": false,
- "enabledForGitHubApps": true,
- "previews": [],
- "category": "actions",
- "subcategory": "secrets"
- },
- "slug": "get-an-environment-public-key",
- "category": "actions",
- "categoryLabel": "Actions",
- "subcategory": "secrets",
- "subcategoryLabel": "Secrets",
- "notes": [],
- "bodyParameters": [],
- "descriptionHTML": "Get the public key for an environment, which you need to encrypt environment secrets. You need to encrypt a secret before you can create or update secrets. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the repo scope. GitHub Apps must have the secrets repository permission to use this endpoint.
",
- "responses": [
- {
- "httpStatusCode": "200",
- "httpStatusMessage": "OK",
- "description": "response",
- "payload": "{\n \"key_id\": \"012345678912345678\",\n \"key\": \"2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvv1234\"\n}\n
"
- }
- ]
- },
- {
- "verb": "get",
- "requestPath": "/repositories/{repository_id}/environments/{environment_name}/secrets/{secret_name}",
- "serverUrl": "http(s)://api.{hostname}",
- "parameters": [
- {
- "name": "repository_id",
- "in": "path",
- "required": true,
- "schema": {
- "type": "integer"
- },
- "descriptionHTML": ""
- },
- {
- "name": "environment_name",
- "in": "path",
- "required": true,
- "description": "The name of the environment",
- "schema": {
- "type": "string"
- },
- "descriptionHTML": "The name of the environment
"
- },
- {
- "name": "secret_name",
- "description": "secret_name parameter",
- "in": "path",
- "required": true,
- "schema": {
- "type": "string"
- },
- "descriptionHTML": "secret_name parameter
"
- }
- ],
- "x-codeSamples": [
- {
- "lang": "Shell",
- "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n http(s)://api.{hostname}/repositories/42/environments/ENVIRONMENT_NAME/secrets/SECRET_NAME",
- "html": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n http(s)://api.{hostname}/repositories/42/environments/ENVIRONMENT_NAME/secrets/SECRET_NAME
"
- },
- {
- "lang": "JavaScript",
- "source": "await octokit.request('GET /repositories/{repository_id}/environments/{environment_name}/secrets/{secret_name}', {\n repository_id: 42,\n environment_name: 'environment_name',\n secret_name: 'secret_name'\n})",
- "html": "await octokit.request('GET /repositories/{repository_id}/environments/{environment_name}/secrets/{secret_name}', {\n repository_id: 42,\n environment_name: 'environment_name',\n secret_name: 'secret_name'\n})\n
"
- }
- ],
- "summary": "Get an environment secret",
- "description": "Gets a single environment secret without revealing its encrypted value. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use this endpoint.",
- "tags": [
- "actions"
- ],
- "operationId": "actions/get-environment-secret",
- "externalDocs": {
- "description": "API method documentation",
- "url": "https://docs.github.com/github-ae@latest/rest/reference/actions#get-an-environment-secret"
- },
- "x-github": {
- "githubCloudOnly": false,
- "enabledForGitHubApps": true,
- "previews": [],
- "category": "actions",
- "subcategory": "secrets"
- },
- "slug": "get-an-environment-secret",
- "category": "actions",
- "categoryLabel": "Actions",
- "subcategory": "secrets",
- "subcategoryLabel": "Secrets",
- "notes": [],
- "bodyParameters": [],
- "descriptionHTML": "Gets a single environment secret without revealing its encrypted value. You must authenticate using an access token with the repo scope to use this endpoint. GitHub Apps must have the secrets repository permission to use this endpoint.
",
- "responses": [
- {
- "httpStatusCode": "200",
- "httpStatusMessage": "OK",
- "description": "response",
- "payload": "{\n \"name\": \"GH_TOKEN\",\n \"created_at\": \"2019-08-10T14:59:22Z\",\n \"updated_at\": \"2020-01-10T14:59:22Z\"\n}\n
"
- }
- ]
- },
- {
- "verb": "put",
- "requestPath": "/repositories/{repository_id}/environments/{environment_name}/secrets/{secret_name}",
- "serverUrl": "http(s)://api.{hostname}",
- "parameters": [
- {
- "name": "repository_id",
- "in": "path",
- "required": true,
- "schema": {
- "type": "integer"
- },
- "descriptionHTML": ""
- },
- {
- "name": "environment_name",
- "in": "path",
- "required": true,
- "description": "The name of the environment",
- "schema": {
- "type": "string"
- },
- "descriptionHTML": "The name of the environment
"
- },
- {
- "name": "secret_name",
- "description": "secret_name parameter",
- "in": "path",
- "required": true,
- "schema": {
- "type": "string"
- },
- "descriptionHTML": "secret_name parameter
"
- }
- ],
- "x-codeSamples": [
- {
- "lang": "Shell",
- "source": "curl \\\n -X PUT \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n http(s)://api.{hostname}/repositories/42/environments/ENVIRONMENT_NAME/secrets/SECRET_NAME \\\n -d '{\"encrypted_value\":\"encrypted_value\"}'",
- "html": "curl \\\n -X PUT \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n http(s)://api.{hostname}/repositories/42/environments/ENVIRONMENT_NAME/secrets/SECRET_NAME \\\n -d '{\"encrypted_value\":\"encrypted_value\"}'
"
- },
- {
- "lang": "JavaScript",
- "source": "await octokit.request('PUT /repositories/{repository_id}/environments/{environment_name}/secrets/{secret_name}', {\n repository_id: 42,\n environment_name: 'environment_name',\n secret_name: 'secret_name',\n encrypted_value: 'encrypted_value'\n})",
- "html": "await octokit.request('PUT /repositories/{repository_id}/environments/{environment_name}/secrets/{secret_name}', {\n repository_id: 42,\n environment_name: 'environment_name',\n secret_name: 'secret_name',\n encrypted_value: 'encrypted_value'\n})\n
"
- }
- ],
- "summary": "Create or update an environment secret",
- "description": "Creates or updates an environment secret with an encrypted value. Encrypt your secret using\n[LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). You must authenticate using an access\ntoken with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use\nthis endpoint.\n\n#### Example encrypting a secret using Node.js\n\nEncrypt your secret using the [tweetsodium](https://github.com/github/tweetsodium) library.\n\n```\nconst sodium = require('tweetsodium');\n\nconst key = \"base64-encoded-public-key\";\nconst value = \"plain-text-secret\";\n\n// Convert the message and key to Uint8Array's (Buffer implements that interface)\nconst messageBytes = Buffer.from(value);\nconst keyBytes = Buffer.from(key, 'base64');\n\n// Encrypt using LibSodium.\nconst encryptedBytes = sodium.seal(messageBytes, keyBytes);\n\n// Base64 the encrypted secret\nconst encrypted = Buffer.from(encryptedBytes).toString('base64');\n\nconsole.log(encrypted);\n```\n\n\n#### Example encrypting a secret using Python\n\nEncrypt your secret using [pynacl](https://pynacl.readthedocs.io/en/stable/public/#nacl-public-sealedbox) with Python 3.\n\n```\nfrom base64 import b64encode\nfrom nacl import encoding, public\n\ndef encrypt(public_key: str, secret_value: str) -> str:\n \"\"\"Encrypt a Unicode string using the public key.\"\"\"\n public_key = public.PublicKey(public_key.encode(\"utf-8\"), encoding.Base64Encoder())\n sealed_box = public.SealedBox(public_key)\n encrypted = sealed_box.encrypt(secret_value.encode(\"utf-8\"))\n return b64encode(encrypted).decode(\"utf-8\")\n```\n\n#### Example encrypting a secret using C#\n\nEncrypt your secret using the [Sodium.Core](https://www.nuget.org/packages/Sodium.Core/) package.\n\n```\nvar secretValue = System.Text.Encoding.UTF8.GetBytes(\"mySecret\");\nvar publicKey = Convert.FromBase64String(\"2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU=\");\n\nvar sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey);\n\nConsole.WriteLine(Convert.ToBase64String(sealedPublicKeyBox));\n```\n\n#### Example encrypting a secret using Ruby\n\nEncrypt your secret using the [rbnacl](https://github.com/RubyCrypto/rbnacl) gem.\n\n```ruby\nrequire \"rbnacl\"\nrequire \"base64\"\n\nkey = Base64.decode64(\"+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=\")\npublic_key = RbNaCl::PublicKey.new(key)\n\nbox = RbNaCl::Boxes::Sealed.from_public_key(public_key)\nencrypted_secret = box.encrypt(\"my_secret\")\n\n# Print the base64 encoded secret\nputs Base64.strict_encode64(encrypted_secret)\n```",
- "tags": [
- "actions"
- ],
- "operationId": "actions/create-or-update-environment-secret",
- "externalDocs": {
- "description": "API method documentation",
- "url": "https://docs.github.com/github-ae@latest/rest/reference/actions#create-or-update-an-environment-secret"
- },
- "requestBody": {
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "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",
- "rawDescription": "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.",
- "childParamsGroups": []
- },
- "key_id": {
- "type": "string",
- "description": "ID of the key you used to encrypt the secret.
",
- "name": "key_id",
- "in": "body",
- "rawType": "string",
- "rawDescription": "ID of the key you used to encrypt the secret.",
- "childParamsGroups": []
- }
- }
- },
- "example": {
- "encrypted_value": "c2VjcmV0",
- "key_id": "012345678912345678"
- }
- }
- }
- },
- "x-github": {
- "githubCloudOnly": false,
- "enabledForGitHubApps": true,
- "previews": [],
- "category": "actions",
- "subcategory": "secrets"
- },
- "slug": "create-or-update-an-environment-secret",
- "category": "actions",
- "categoryLabel": "Actions",
- "subcategory": "secrets",
- "subcategoryLabel": "Secrets",
- "notes": [],
- "responses": [
- {
- "httpStatusCode": "201",
- "httpStatusMessage": "Created",
- "description": "Response when creating a secret"
- },
- {
- "httpStatusCode": "204",
- "httpStatusMessage": "No Content",
- "description": "Response when updating a secret"
- }
- ],
- "descriptionHTML": "Creates or updates an environment secret with an encrypted value. Encrypt your secret using\nLibSodium. You must authenticate using an access\ntoken with the repo scope to use this endpoint. GitHub Apps must have the secrets repository permission to use\nthis endpoint.
\n\nEncrypt your secret using the tweetsodium library.
\nconst sodium = require('tweetsodium');\n\nconst key = \"base64-encoded-public-key\";\nconst value = \"plain-text-secret\";\n\n// Convert the message and key to Uint8Array's (Buffer implements that interface)\nconst messageBytes = Buffer.from(value);\nconst keyBytes = Buffer.from(key, 'base64');\n\n// Encrypt using LibSodium.\nconst encryptedBytes = sodium.seal(messageBytes, keyBytes);\n\n// Base64 the encrypted secret\nconst encrypted = Buffer.from(encryptedBytes).toString('base64');\n\nconsole.log(encrypted);\n
\n\nEncrypt your secret using pynacl with Python 3.
\nfrom base64 import b64encode\nfrom nacl import encoding, public\n\ndef encrypt(public_key: str, secret_value: str) -> str:\n \"\"\"Encrypt a Unicode string using the public key.\"\"\"\n public_key = public.PublicKey(public_key.encode(\"utf-8\"), encoding.Base64Encoder())\n sealed_box = public.SealedBox(public_key)\n encrypted = sealed_box.encrypt(secret_value.encode(\"utf-8\"))\n return b64encode(encrypted).decode(\"utf-8\")\n
\n\nEncrypt your secret using the Sodium.Core package.
\nvar secretValue = System.Text.Encoding.UTF8.GetBytes(\"mySecret\");\nvar publicKey = Convert.FromBase64String(\"2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU=\");\n\nvar sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey);\n\nConsole.WriteLine(Convert.ToBase64String(sealedPublicKeyBox));\n
\n\nEncrypt your secret using the rbnacl gem.
\nrequire \"rbnacl\"\nrequire \"base64\"\n\nkey = Base64.decode64(\"+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=\")\npublic_key = RbNaCl::PublicKey.new(key)\n\nbox = RbNaCl::Boxes::Sealed.from_public_key(public_key)\nencrypted_secret = box.encrypt(\"my_secret\")\n\n\nputs Base64.strict_encode64(encrypted_secret)\n
",
- "bodyParameters": [
- {
- "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",
- "rawDescription": "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.",
- "childParamsGroups": []
- },
- {
- "type": "string",
- "description": "ID of the key you used to encrypt the secret.
",
- "name": "key_id",
- "in": "body",
- "rawType": "string",
- "rawDescription": "ID of the key you used to encrypt the secret.",
- "childParamsGroups": []
- }
- ]
- },
- {
- "verb": "delete",
- "requestPath": "/repositories/{repository_id}/environments/{environment_name}/secrets/{secret_name}",
- "serverUrl": "http(s)://api.{hostname}",
- "parameters": [
- {
- "name": "repository_id",
- "in": "path",
- "required": true,
- "schema": {
- "type": "integer"
- },
- "descriptionHTML": ""
- },
- {
- "name": "environment_name",
- "in": "path",
- "required": true,
- "description": "The name of the environment",
- "schema": {
- "type": "string"
- },
- "descriptionHTML": "The name of the environment
"
- },
- {
- "name": "secret_name",
- "description": "secret_name parameter",
- "in": "path",
- "required": true,
- "schema": {
- "type": "string"
- },
- "descriptionHTML": "secret_name parameter
"
- }
- ],
- "x-codeSamples": [
- {
- "lang": "Shell",
- "source": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n http(s)://api.{hostname}/repositories/42/environments/ENVIRONMENT_NAME/secrets/SECRET_NAME",
- "html": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n http(s)://api.{hostname}/repositories/42/environments/ENVIRONMENT_NAME/secrets/SECRET_NAME
"
- },
- {
- "lang": "JavaScript",
- "source": "await octokit.request('DELETE /repositories/{repository_id}/environments/{environment_name}/secrets/{secret_name}', {\n repository_id: 42,\n environment_name: 'environment_name',\n secret_name: 'secret_name'\n})",
- "html": "await octokit.request('DELETE /repositories/{repository_id}/environments/{environment_name}/secrets/{secret_name}', {\n repository_id: 42,\n environment_name: 'environment_name',\n secret_name: 'secret_name'\n})\n
"
- }
- ],
- "summary": "Delete an environment secret",
- "description": "Deletes a secret in an environment using the secret name. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use this endpoint.",
- "tags": [
- "actions"
- ],
- "operationId": "actions/delete-environment-secret",
- "externalDocs": {
- "description": "API method documentation",
- "url": "https://docs.github.com/github-ae@latest/rest/reference/actions#delete-an-environment-secret"
- },
- "x-github": {
- "githubCloudOnly": false,
- "enabledForGitHubApps": true,
- "previews": [],
- "category": "actions",
- "subcategory": "secrets"
- },
- "slug": "delete-an-environment-secret",
- "category": "actions",
- "categoryLabel": "Actions",
- "subcategory": "secrets",
- "subcategoryLabel": "Secrets",
- "notes": [],
- "responses": [
- {
- "httpStatusCode": "204",
- "httpStatusMessage": "No Content",
- "description": "Default response"
- }
- ],
- "bodyParameters": [],
- "descriptionHTML": "Deletes a secret in an environment using the secret name. You must authenticate using an access token with the repo scope to use this endpoint. GitHub Apps must have the secrets repository permission to use this endpoint.
"
- },
{
"verb": "get",
"requestPath": "/scim/v2/enterprises/{enterprise}/Groups",
diff --git a/lib/rest/static/dereferenced/api.github.com.deref.json b/lib/rest/static/dereferenced/api.github.com.deref.json
index dc7623c18b..eaa2302684 100644
--- a/lib/rest/static/dereferenced/api.github.com.deref.json
+++ b/lib/rest/static/dereferenced/api.github.com.deref.json
@@ -6847,7 +6847,7 @@
"/applications/{client_id}/token/scoped": {
"post": {
"summary": "Create a scoped access token",
- "description": "Exchanges a non-repository scoped user-to-server OAuth access token for a repository scoped user-to-server OAuth access token. You can specify which repositories the token can access and which permissions are granted to the token. You must use [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) when accessing this endpoint, using the OAuth application's `client_id` and `client_secret` as the username and password. Invalid tokens will return `404 NOT FOUND`.",
+ "description": "Use a non-scoped user-to-server OAuth access token to create a repository scoped and/or permission scoped user-to-server OAuth access token. You can specify which repositories the token can access and which permissions are granted to the token. You must use [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) when accessing this endpoint, using the OAuth application's `client_id` and `client_secret` as the username and password. Invalid tokens will return `404 NOT FOUND`.",
"tags": [
"apps"
],
@@ -6875,7 +6875,7 @@
"properties": {
"access_token": {
"type": "string",
- "description": "**Required.** The OAuth access token used to authenticate to the GitHub API.",
+ "description": "The OAuth access token used to authenticate to the GitHub API.",
"example": "e72e16c7e42f292c6912e7710c838347ae178b4a"
},
"target": {
@@ -7796,7 +7796,7 @@
"id": 1,
"url": "https://api.github.com/authorizations/1",
"scopes": [
- "public_repo"
+
],
"token": "abcdefgh12345678",
"token_last_eight": "12345678",
diff --git a/lib/rest/static/dereferenced/ghes-3.0.deref.json b/lib/rest/static/dereferenced/ghes-3.0.deref.json
index 30ccbf97c2..59b36193ed 100644
--- a/lib/rest/static/dereferenced/ghes-3.0.deref.json
+++ b/lib/rest/static/dereferenced/ghes-3.0.deref.json
@@ -11926,7 +11926,7 @@
"/applications/{client_id}/token/scoped": {
"post": {
"summary": "Create a scoped access token",
- "description": "Exchanges a non-repository scoped user-to-server OAuth access token for a repository scoped user-to-server OAuth access token. You can specify which repositories the token can access and which permissions are granted to the token. You must use [Basic Authentication](https://docs.github.com/enterprise-server@3.0/rest/overview/other-authentication-methods#basic-authentication) when accessing this endpoint, using the OAuth application's `client_id` and `client_secret` as the username and password. Invalid tokens will return `404 NOT FOUND`.",
+ "description": "Use a non-scoped user-to-server OAuth access token to create a repository scoped and/or permission scoped user-to-server OAuth access token. You can specify which repositories the token can access and which permissions are granted to the token. You must use [Basic Authentication](https://docs.github.com/enterprise-server@3.0/rest/overview/other-authentication-methods#basic-authentication) when accessing this endpoint, using the OAuth application's `client_id` and `client_secret` as the username and password. Invalid tokens will return `404 NOT FOUND`.",
"tags": [
"apps"
],
@@ -11954,7 +11954,7 @@
"properties": {
"access_token": {
"type": "string",
- "description": "**Required.** The OAuth access token used to authenticate to the GitHub API.",
+ "description": "The OAuth access token used to authenticate to the GitHub API.",
"example": "e72e16c7e42f292c6912e7710c838347ae178b4a"
},
"target": {
@@ -12875,7 +12875,7 @@
"id": 1,
"url": "https://api.github.com/authorizations/1",
"scopes": [
- "public_repo"
+
],
"token": "abcdefgh12345678",
"token_last_eight": "12345678",
diff --git a/lib/rest/static/dereferenced/github.ae.deref.json b/lib/rest/static/dereferenced/github.ae.deref.json
index fc0fd201f2..587075b043 100644
--- a/lib/rest/static/dereferenced/github.ae.deref.json
+++ b/lib/rest/static/dereferenced/github.ae.deref.json
@@ -90441,291 +90441,6 @@
}
}
},
- "/repos/{owner}/{repo}/actions/runs/{run_id}/approvals": {
- "get": {
- "summary": "Get the review history for a workflow run",
- "description": "Anyone with read access to the repository can use this endpoint. If the repository is private, you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint.",
- "tags": [
- "actions"
- ],
- "operationId": "actions/get-reviews-for-run",
- "externalDocs": {
- "description": "API method documentation",
- "url": "https://docs.github.com/github-ae@latest/rest/reference/actions#get-the-review-history-for-a-workflow-run"
- },
- "parameters": [
- {
- "name": "owner",
- "in": "path",
- "required": true,
- "schema": {
- "type": "string"
- }
- },
- {
- "name": "repo",
- "in": "path",
- "required": true,
- "schema": {
- "type": "string"
- }
- },
- {
- "name": "run_id",
- "description": "The id of the workflow run",
- "in": "path",
- "required": true,
- "schema": {
- "type": "integer"
- }
- }
- ],
- "responses": {
- "200": {
- "description": "response",
- "content": {
- "application/json": {
- "schema": {
- "type": "array",
- "items": {
- "title": "Environment Approval",
- "description": "An entry in the reviews log for environment deployments",
- "type": "object",
- "properties": {
- "environments": {
- "description": "The list of environments that were approved or rejected",
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "id": {
- "description": "The id of the environment.",
- "example": 56780428,
- "type": "integer"
- },
- "node_id": {
- "type": "string",
- "example": "MDExOkVudmlyb25tZW50NTY3ODA0Mjg="
- },
- "name": {
- "description": "The name of the environment.",
- "example": "staging",
- "type": "string"
- },
- "url": {
- "type": "string",
- "example": "https://api.github.com/repos/github/hello-world/environments/staging"
- },
- "html_url": {
- "type": "string",
- "example": "https://github.com/github/hello-world/deployments/activity_log?environments_filter=staging"
- },
- "created_at": {
- "description": "The time that the environment was created, in ISO 8601 format.",
- "example": "2020-11-23T22:00:40Z",
- "format": "date-time",
- "type": "string"
- },
- "updated_at": {
- "description": "The time that the environment was last updated, in ISO 8601 format.",
- "example": "2020-11-23T22:00:40Z",
- "format": "date-time",
- "type": "string"
- }
- }
- }
- },
- "state": {
- "description": "Whether deployment to the environment(s) was approved or rejected",
- "enum": [
- "approved",
- "rejected"
- ],
- "example": "approved",
- "type": "string"
- },
- "user": {
- "title": "Simple User",
- "description": "Simple User",
- "type": "object",
- "properties": {
- "login": {
- "type": "string",
- "example": "octocat"
- },
- "id": {
- "type": "integer",
- "example": 1
- },
- "node_id": {
- "type": "string",
- "example": "MDQ6VXNlcjE="
- },
- "avatar_url": {
- "type": "string",
- "format": "uri",
- "example": "https://github.com/images/error/octocat_happy.gif"
- },
- "gravatar_id": {
- "type": "string",
- "example": "41d064eb2195891e12d0413f63227ea7",
- "nullable": true
- },
- "url": {
- "type": "string",
- "format": "uri",
- "example": "https://api.github.com/users/octocat"
- },
- "html_url": {
- "type": "string",
- "format": "uri",
- "example": "https://github.com/octocat"
- },
- "followers_url": {
- "type": "string",
- "format": "uri",
- "example": "https://api.github.com/users/octocat/followers"
- },
- "following_url": {
- "type": "string",
- "example": "https://api.github.com/users/octocat/following{/other_user}"
- },
- "gists_url": {
- "type": "string",
- "example": "https://api.github.com/users/octocat/gists{/gist_id}"
- },
- "starred_url": {
- "type": "string",
- "example": "https://api.github.com/users/octocat/starred{/owner}{/repo}"
- },
- "subscriptions_url": {
- "type": "string",
- "format": "uri",
- "example": "https://api.github.com/users/octocat/subscriptions"
- },
- "organizations_url": {
- "type": "string",
- "format": "uri",
- "example": "https://api.github.com/users/octocat/orgs"
- },
- "repos_url": {
- "type": "string",
- "format": "uri",
- "example": "https://api.github.com/users/octocat/repos"
- },
- "events_url": {
- "type": "string",
- "example": "https://api.github.com/users/octocat/events{/privacy}"
- },
- "received_events_url": {
- "type": "string",
- "format": "uri",
- "example": "https://api.github.com/users/octocat/received_events"
- },
- "type": {
- "type": "string",
- "example": "User"
- },
- "site_admin": {
- "type": "boolean"
- },
- "starred_at": {
- "type": "string",
- "example": "\"2020-07-09T00:17:55Z\""
- }
- },
- "required": [
- "avatar_url",
- "events_url",
- "followers_url",
- "following_url",
- "gists_url",
- "gravatar_id",
- "html_url",
- "id",
- "node_id",
- "login",
- "organizations_url",
- "received_events_url",
- "repos_url",
- "site_admin",
- "starred_url",
- "subscriptions_url",
- "type",
- "url"
- ],
- "nullable": true
- },
- "comment": {
- "type": "string",
- "description": "The comment submitted with the deployment review",
- "example": "Ship it!"
- }
- },
- "required": [
- "environments",
- "state",
- "user",
- "comment"
- ]
- }
- },
- "examples": {
- "default": {
- "value": [
- {
- "state": "approved",
- "comment": "Ship it!",
- "environments": [
- {
- "id": 161088068,
- "node_id": "MDExOkVudmlyb25tZW50MTYxMDg4MDY4",
- "name": "staging",
- "url": "https://api.github.com/repos/github/hello-world/environments/staging",
- "html_url": "https://github.com/github/hello-world/deployments/activity_log?environments_filter=staging",
- "created_at": "2020-11-23T22:00:40Z",
- "updated_at": "2020-11-23T22:00:40Z"
- }
- ],
- "user": {
- "login": "octocat",
- "id": 1,
- "node_id": "MDQ6VXNlcjE=",
- "avatar_url": "https://github.com/images/error/octocat_happy.gif",
- "gravatar_id": "",
- "url": "https://api.github.com/users/octocat",
- "html_url": "https://github.com/octocat",
- "followers_url": "https://api.github.com/users/octocat/followers",
- "following_url": "https://api.github.com/users/octocat/following{/other_user}",
- "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}",
- "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}",
- "subscriptions_url": "https://api.github.com/users/octocat/subscriptions",
- "organizations_url": "https://api.github.com/users/octocat/orgs",
- "repos_url": "https://api.github.com/users/octocat/repos",
- "events_url": "https://api.github.com/users/octocat/events{/privacy}",
- "received_events_url": "https://api.github.com/users/octocat/received_events",
- "type": "User",
- "site_admin": false
- }
- }
- ]
- }
- }
- }
- }
- }
- },
- "x-github": {
- "githubCloudOnly": false,
- "enabledForGitHubApps": true,
- "previews": [
-
- ],
- "category": "actions",
- "subcategory": "workflow-runs"
- }
- }
- },
"/repos/{owner}/{repo}/actions/runs/{run_id}/artifacts": {
"get": {
"summary": "List workflow run artifacts",
@@ -91459,1009 +91174,6 @@
}
}
},
- "/repos/{owner}/{repo}/actions/runs/{run_id}/pending_deployments": {
- "get": {
- "summary": "Get pending deployments for a workflow run",
- "description": "Get all deployment environments for a workflow run that are waiting for protection rules to pass.\n\nAnyone with read access to the repository can use this endpoint. If the repository is private, you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint.",
- "tags": [
- "actions"
- ],
- "operationId": "actions/get-pending-deployments-for-run",
- "externalDocs": {
- "description": "API method documentation",
- "url": "https://docs.github.com/github-ae@latest/rest/reference/actions#get-pending-deployments-for-a-workflow-run"
- },
- "parameters": [
- {
- "name": "owner",
- "in": "path",
- "required": true,
- "schema": {
- "type": "string"
- }
- },
- {
- "name": "repo",
- "in": "path",
- "required": true,
- "schema": {
- "type": "string"
- }
- },
- {
- "name": "run_id",
- "description": "The id of the workflow run",
- "in": "path",
- "required": true,
- "schema": {
- "type": "integer"
- }
- }
- ],
- "responses": {
- "200": {
- "description": "response",
- "content": {
- "application/json": {
- "schema": {
- "type": "array",
- "items": {
- "title": "Pending Deployment",
- "description": "Details of a deployment that is waiting for protection rules to pass",
- "type": "object",
- "properties": {
- "environment": {
- "type": "object",
- "properties": {
- "id": {
- "description": "The id of the environment.",
- "example": 56780428,
- "type": "integer"
- },
- "node_id": {
- "type": "string",
- "example": "MDExOkVudmlyb25tZW50NTY3ODA0Mjg="
- },
- "name": {
- "description": "The name of the environment.",
- "example": "staging",
- "type": "string"
- },
- "url": {
- "type": "string",
- "example": "https://api.github.com/repos/github/hello-world/environments/staging"
- },
- "html_url": {
- "type": "string",
- "example": "https://github.com/github/hello-world/deployments/activity_log?environments_filter=staging"
- }
- }
- },
- "wait_timer": {
- "type": "integer",
- "description": "The set duration of the wait timer",
- "example": 30
- },
- "wait_timer_started_at": {
- "description": "The time that the wait timer began.",
- "example": "2020-11-23T22:00:40Z",
- "format": "date-time",
- "type": "string",
- "nullable": true
- },
- "current_user_can_approve": {
- "description": "Whether the currently authenticated user can approve the deployment",
- "type": "boolean",
- "example": true
- },
- "reviewers": {
- "type": "array",
- "description": "The people or teams that may approve 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",
- "properties": {
- "type": {
- "type": "string",
- "description": "The type of reviewer. Must be one of: `User` or `Team`",
- "enum": [
- "User",
- "Team"
- ],
- "example": "User"
- },
- "reviewer": {
- "anyOf": [
- {
- "title": "Simple User",
- "description": "Simple User",
- "type": "object",
- "properties": {
- "login": {
- "type": "string",
- "example": "octocat"
- },
- "id": {
- "type": "integer",
- "example": 1
- },
- "node_id": {
- "type": "string",
- "example": "MDQ6VXNlcjE="
- },
- "avatar_url": {
- "type": "string",
- "format": "uri",
- "example": "https://github.com/images/error/octocat_happy.gif"
- },
- "gravatar_id": {
- "type": "string",
- "example": "41d064eb2195891e12d0413f63227ea7",
- "nullable": true
- },
- "url": {
- "type": "string",
- "format": "uri",
- "example": "https://api.github.com/users/octocat"
- },
- "html_url": {
- "type": "string",
- "format": "uri",
- "example": "https://github.com/octocat"
- },
- "followers_url": {
- "type": "string",
- "format": "uri",
- "example": "https://api.github.com/users/octocat/followers"
- },
- "following_url": {
- "type": "string",
- "example": "https://api.github.com/users/octocat/following{/other_user}"
- },
- "gists_url": {
- "type": "string",
- "example": "https://api.github.com/users/octocat/gists{/gist_id}"
- },
- "starred_url": {
- "type": "string",
- "example": "https://api.github.com/users/octocat/starred{/owner}{/repo}"
- },
- "subscriptions_url": {
- "type": "string",
- "format": "uri",
- "example": "https://api.github.com/users/octocat/subscriptions"
- },
- "organizations_url": {
- "type": "string",
- "format": "uri",
- "example": "https://api.github.com/users/octocat/orgs"
- },
- "repos_url": {
- "type": "string",
- "format": "uri",
- "example": "https://api.github.com/users/octocat/repos"
- },
- "events_url": {
- "type": "string",
- "example": "https://api.github.com/users/octocat/events{/privacy}"
- },
- "received_events_url": {
- "type": "string",
- "format": "uri",
- "example": "https://api.github.com/users/octocat/received_events"
- },
- "type": {
- "type": "string",
- "example": "User"
- },
- "site_admin": {
- "type": "boolean"
- },
- "starred_at": {
- "type": "string",
- "example": "\"2020-07-09T00:17:55Z\""
- }
- },
- "required": [
- "avatar_url",
- "events_url",
- "followers_url",
- "following_url",
- "gists_url",
- "gravatar_id",
- "html_url",
- "id",
- "node_id",
- "login",
- "organizations_url",
- "received_events_url",
- "repos_url",
- "site_admin",
- "starred_url",
- "subscriptions_url",
- "type",
- "url"
- ],
- "nullable": true
- },
- {
- "title": "Team Simple",
- "description": "Groups of organization members that gives permissions on specified repositories.",
- "type": "object",
- "properties": {
- "id": {
- "description": "Unique identifier of the team",
- "type": "integer",
- "example": 1
- },
- "node_id": {
- "type": "string",
- "example": "MDQ6VGVhbTE="
- },
- "url": {
- "description": "URL for the team",
- "type": "string",
- "format": "uri",
- "example": "https://api.github.com/organizations/1/team/1"
- },
- "members_url": {
- "type": "string",
- "example": "https://api.github.com/organizations/1/team/1/members{/member}"
- },
- "name": {
- "description": "Name of the team",
- "type": "string",
- "example": "Justice League"
- },
- "description": {
- "description": "Description of the team",
- "type": "string",
- "nullable": true,
- "example": "A great team."
- },
- "permission": {
- "description": "Permission that the team will have for its repositories",
- "type": "string",
- "example": "admin"
- },
- "privacy": {
- "description": "The level of privacy this team should have",
- "type": "string",
- "example": "closed"
- },
- "html_url": {
- "type": "string",
- "format": "uri",
- "example": "https://github.com/orgs/rails/teams/core"
- },
- "repositories_url": {
- "type": "string",
- "format": "uri",
- "example": "https://api.github.com/organizations/1/team/1/repos"
- },
- "slug": {
- "type": "string",
- "example": "justice-league"
- },
- "ldap_dn": {
- "description": "Distinguished Name (DN) that team maps to within LDAP environment",
- "example": "uid=example,ou=users,dc=github,dc=com",
- "type": "string"
- }
- },
- "required": [
- "id",
- "node_id",
- "url",
- "members_url",
- "name",
- "description",
- "permission",
- "html_url",
- "repositories_url",
- "slug"
- ],
- "nullable": true
- }
- ]
- }
- }
- }
- }
- },
- "required": [
- "environment",
- "wait_timer",
- "wait_timer_started_at",
- "current_user_can_approve",
- "reviewers"
- ]
- }
- },
- "examples": {
- "default": {
- "value": [
- {
- "environment": {
- "id": 161088068,
- "node_id": "MDExOkVudmlyb25tZW50MTYxMDg4MDY4",
- "name": "staging",
- "url": "https://api.github.com/repos/github/hello-world/environments/staging",
- "html_url": "https://github.com/github/hello-world/deployments/activity_log?environments_filter=staging"
- },
- "wait_timer": 30,
- "wait_timer_started_at": "2020-11-23T22:00:40Z",
- "current_user_can_approve": true,
- "reviewers": [
- {
- "type": "User",
- "reviewer": {
- "login": "octocat",
- "id": 1,
- "node_id": "MDQ6VXNlcjE=",
- "avatar_url": "https://github.com/images/error/octocat_happy.gif",
- "gravatar_id": "",
- "url": "https://api.github.com/users/octocat",
- "html_url": "https://github.com/octocat",
- "followers_url": "https://api.github.com/users/octocat/followers",
- "following_url": "https://api.github.com/users/octocat/following{/other_user}",
- "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}",
- "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}",
- "subscriptions_url": "https://api.github.com/users/octocat/subscriptions",
- "organizations_url": "https://api.github.com/users/octocat/orgs",
- "repos_url": "https://api.github.com/users/octocat/repos",
- "events_url": "https://api.github.com/users/octocat/events{/privacy}",
- "received_events_url": "https://api.github.com/users/octocat/received_events",
- "type": "User",
- "site_admin": false
- }
- },
- {
- "type": "Team",
- "reviewer": {
- "id": 1,
- "node_id": "MDQ6VGVhbTE=",
- "url": "https://api.github.com/teams/1",
- "html_url": "https://github.com/orgs/github/teams/justice-league",
- "name": "Justice League",
- "slug": "justice-league",
- "description": "A great team.",
- "privacy": "closed",
- "permission": "admin",
- "members_url": "https://api.github.com/teams/1/members{/member}",
- "repositories_url": "https://api.github.com/teams/1/repos"
- }
- }
- ]
- }
- ]
- }
- }
- }
- }
- }
- },
- "x-github": {
- "githubCloudOnly": false,
- "enabledForGitHubApps": true,
- "previews": [
-
- ],
- "category": "actions",
- "subcategory": "workflow-runs"
- }
- },
- "post": {
- "summary": "Review pending deployments for a workflow run",
- "description": "Approve or reject pending deployments that are waiting on approval by a required reviewer.\n\nAnyone with read access to the repository contents and deployments can use this endpoint.",
- "tags": [
- "actions"
- ],
- "operationId": "actions/review-pending-deployments-for-run",
- "externalDocs": {
- "description": "API method documentation",
- "url": "https://docs.github.com/github-ae@latest/rest/reference/actions#review-pending-deployments-for-a-workflow-run"
- },
- "parameters": [
- {
- "name": "owner",
- "in": "path",
- "required": true,
- "schema": {
- "type": "string"
- }
- },
- {
- "name": "repo",
- "in": "path",
- "required": true,
- "schema": {
- "type": "string"
- }
- },
- {
- "name": "run_id",
- "description": "The id of the workflow run",
- "in": "path",
- "required": true,
- "schema": {
- "type": "integer"
- }
- }
- ],
- "requestBody": {
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "environment_ids": {
- "type": "array",
- "description": "The list of environment ids to approve or reject",
- "example": [
- 161171787,
- 161171795
- ],
- "items": {
- "type": "integer",
- "example": 161171787
- }
- },
- "state": {
- "type": "string",
- "description": "Whether to approve or reject deployment to the specified environments. Must be one of: `approved` or `rejected`",
- "enum": [
- "approved",
- "rejected"
- ],
- "example": "approved"
- },
- "comment": {
- "type": "string",
- "description": "A comment to accompany the deployment review",
- "example": "Ship it!"
- }
- },
- "required": [
- "environment_ids",
- "state",
- "comment"
- ]
- }
- }
- }
- },
- "responses": {
- "200": {
- "description": "response",
- "content": {
- "application/json": {
- "schema": {
- "type": "array",
- "items": {
- "title": "Deployment",
- "description": "A request for a specific ref(branch,sha,tag) to be deployed",
- "type": "object",
- "properties": {
- "url": {
- "type": "string",
- "format": "uri",
- "example": "https://api.github.com/repos/octocat/example/deployments/1"
- },
- "id": {
- "description": "Unique identifier of the deployment",
- "example": 42,
- "type": "integer"
- },
- "node_id": {
- "type": "string",
- "example": "MDEwOkRlcGxveW1lbnQx"
- },
- "sha": {
- "type": "string",
- "example": "a84d88e7554fc1fa21bcbc4efae3c782a70d2b9d"
- },
- "ref": {
- "description": "The ref to deploy. This can be a branch, tag, or sha.",
- "example": "topic-branch",
- "type": "string"
- },
- "task": {
- "description": "Parameter to specify a task to execute",
- "example": "deploy",
- "type": "string"
- },
- "payload": {
- "type": "object",
- "properties": {
- }
- },
- "original_environment": {
- "type": "string",
- "example": "staging"
- },
- "environment": {
- "description": "Name for the target deployment environment.",
- "example": "production",
- "type": "string"
- },
- "description": {
- "type": "string",
- "example": "Deploy request from hubot",
- "nullable": true
- },
- "creator": {
- "nullable": true,
- "allOf": [
- {
- "title": "Simple User",
- "description": "Simple User",
- "type": "object",
- "properties": {
- "login": {
- "type": "string",
- "example": "octocat"
- },
- "id": {
- "type": "integer",
- "example": 1
- },
- "node_id": {
- "type": "string",
- "example": "MDQ6VXNlcjE="
- },
- "avatar_url": {
- "type": "string",
- "format": "uri",
- "example": "https://github.com/images/error/octocat_happy.gif"
- },
- "gravatar_id": {
- "type": "string",
- "example": "41d064eb2195891e12d0413f63227ea7",
- "nullable": true
- },
- "url": {
- "type": "string",
- "format": "uri",
- "example": "https://api.github.com/users/octocat"
- },
- "html_url": {
- "type": "string",
- "format": "uri",
- "example": "https://github.com/octocat"
- },
- "followers_url": {
- "type": "string",
- "format": "uri",
- "example": "https://api.github.com/users/octocat/followers"
- },
- "following_url": {
- "type": "string",
- "example": "https://api.github.com/users/octocat/following{/other_user}"
- },
- "gists_url": {
- "type": "string",
- "example": "https://api.github.com/users/octocat/gists{/gist_id}"
- },
- "starred_url": {
- "type": "string",
- "example": "https://api.github.com/users/octocat/starred{/owner}{/repo}"
- },
- "subscriptions_url": {
- "type": "string",
- "format": "uri",
- "example": "https://api.github.com/users/octocat/subscriptions"
- },
- "organizations_url": {
- "type": "string",
- "format": "uri",
- "example": "https://api.github.com/users/octocat/orgs"
- },
- "repos_url": {
- "type": "string",
- "format": "uri",
- "example": "https://api.github.com/users/octocat/repos"
- },
- "events_url": {
- "type": "string",
- "example": "https://api.github.com/users/octocat/events{/privacy}"
- },
- "received_events_url": {
- "type": "string",
- "format": "uri",
- "example": "https://api.github.com/users/octocat/received_events"
- },
- "type": {
- "type": "string",
- "example": "User"
- },
- "site_admin": {
- "type": "boolean"
- },
- "starred_at": {
- "type": "string",
- "example": "\"2020-07-09T00:17:55Z\""
- }
- },
- "required": [
- "avatar_url",
- "events_url",
- "followers_url",
- "following_url",
- "gists_url",
- "gravatar_id",
- "html_url",
- "id",
- "node_id",
- "login",
- "organizations_url",
- "received_events_url",
- "repos_url",
- "site_admin",
- "starred_url",
- "subscriptions_url",
- "type",
- "url"
- ],
- "nullable": true
- }
- ]
- },
- "created_at": {
- "type": "string",
- "format": "date-time",
- "example": "2012-07-20T01:19:13Z"
- },
- "updated_at": {
- "type": "string",
- "format": "date-time",
- "example": "2012-07-20T01:19:13Z"
- },
- "statuses_url": {
- "type": "string",
- "format": "uri",
- "example": "https://api.github.com/repos/octocat/example/deployments/1/statuses"
- },
- "repository_url": {
- "type": "string",
- "format": "uri",
- "example": "https://api.github.com/repos/octocat/example"
- },
- "transient_environment": {
- "description": "Specifies if the given environment is will no longer exist at some point in the future. Default: false.",
- "example": true,
- "type": "boolean"
- },
- "production_environment": {
- "description": "Specifies if the given environment is one that end-users directly interact with. Default: false.",
- "example": true,
- "type": "boolean"
- },
- "performed_via_github_app": {
- "nullable": true,
- "allOf": [
- {
- "title": "GitHub app",
- "description": "GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub.",
- "type": "object",
- "properties": {
- "id": {
- "description": "Unique identifier of the GitHub app",
- "example": 37,
- "type": "integer"
- },
- "slug": {
- "description": "The slug name of the GitHub app",
- "example": "probot-owners",
- "type": "string"
- },
- "node_id": {
- "type": "string",
- "example": "MDExOkludGVncmF0aW9uMQ=="
- },
- "owner": {
- "nullable": true,
- "allOf": [
- {
- "title": "Simple User",
- "description": "Simple User",
- "type": "object",
- "properties": {
- "login": {
- "type": "string",
- "example": "octocat"
- },
- "id": {
- "type": "integer",
- "example": 1
- },
- "node_id": {
- "type": "string",
- "example": "MDQ6VXNlcjE="
- },
- "avatar_url": {
- "type": "string",
- "format": "uri",
- "example": "https://github.com/images/error/octocat_happy.gif"
- },
- "gravatar_id": {
- "type": "string",
- "example": "41d064eb2195891e12d0413f63227ea7",
- "nullable": true
- },
- "url": {
- "type": "string",
- "format": "uri",
- "example": "https://api.github.com/users/octocat"
- },
- "html_url": {
- "type": "string",
- "format": "uri",
- "example": "https://github.com/octocat"
- },
- "followers_url": {
- "type": "string",
- "format": "uri",
- "example": "https://api.github.com/users/octocat/followers"
- },
- "following_url": {
- "type": "string",
- "example": "https://api.github.com/users/octocat/following{/other_user}"
- },
- "gists_url": {
- "type": "string",
- "example": "https://api.github.com/users/octocat/gists{/gist_id}"
- },
- "starred_url": {
- "type": "string",
- "example": "https://api.github.com/users/octocat/starred{/owner}{/repo}"
- },
- "subscriptions_url": {
- "type": "string",
- "format": "uri",
- "example": "https://api.github.com/users/octocat/subscriptions"
- },
- "organizations_url": {
- "type": "string",
- "format": "uri",
- "example": "https://api.github.com/users/octocat/orgs"
- },
- "repos_url": {
- "type": "string",
- "format": "uri",
- "example": "https://api.github.com/users/octocat/repos"
- },
- "events_url": {
- "type": "string",
- "example": "https://api.github.com/users/octocat/events{/privacy}"
- },
- "received_events_url": {
- "type": "string",
- "format": "uri",
- "example": "https://api.github.com/users/octocat/received_events"
- },
- "type": {
- "type": "string",
- "example": "User"
- },
- "site_admin": {
- "type": "boolean"
- },
- "starred_at": {
- "type": "string",
- "example": "\"2020-07-09T00:17:55Z\""
- }
- },
- "required": [
- "avatar_url",
- "events_url",
- "followers_url",
- "following_url",
- "gists_url",
- "gravatar_id",
- "html_url",
- "id",
- "node_id",
- "login",
- "organizations_url",
- "received_events_url",
- "repos_url",
- "site_admin",
- "starred_url",
- "subscriptions_url",
- "type",
- "url"
- ],
- "nullable": true
- }
- ]
- },
- "name": {
- "description": "The name of the GitHub app",
- "example": "Probot Owners",
- "type": "string"
- },
- "description": {
- "type": "string",
- "example": "The description of the app.",
- "nullable": true
- },
- "external_url": {
- "type": "string",
- "format": "uri",
- "example": "https://example.com"
- },
- "html_url": {
- "type": "string",
- "format": "uri",
- "example": "https://github.com/apps/super-ci"
- },
- "created_at": {
- "type": "string",
- "format": "date-time",
- "example": "2017-07-08T16:18:44-04:00"
- },
- "updated_at": {
- "type": "string",
- "format": "date-time",
- "example": "2017-07-08T16:18:44-04:00"
- },
- "permissions": {
- "description": "The set of permissions for the GitHub app",
- "type": "object",
- "properties": {
- "issues": {
- "type": "string"
- },
- "checks": {
- "type": "string"
- },
- "metadata": {
- "type": "string"
- },
- "contents": {
- "type": "string"
- },
- "deployments": {
- "type": "string"
- }
- },
- "additionalProperties": {
- "type": "string"
- },
- "example": {
- "issues": "read",
- "deployments": "write"
- }
- },
- "events": {
- "description": "The list of events for the GitHub app",
- "example": [
- "label",
- "deployment"
- ],
- "type": "array",
- "items": {
- "type": "string"
- }
- },
- "installations_count": {
- "description": "The number of installations associated with the GitHub app",
- "example": 5,
- "type": "integer"
- },
- "client_id": {
- "type": "string",
- "example": "\"Iv1.25b5d1e65ffc4022\""
- },
- "client_secret": {
- "type": "string",
- "example": "\"1d4b2097ac622ba702d19de498f005747a8b21d3\""
- },
- "webhook_secret": {
- "type": "string",
- "example": "\"6fba8f2fc8a7e8f2cca5577eddd82ca7586b3b6b\""
- },
- "pem": {
- "type": "string",
- "example": "\"-----BEGIN RSA PRIVATE KEY-----\\nMIIEogIBAAKCAQEArYxrNYD/iT5CZVpRJu4rBKmmze3PVmT/gCo2ATUvDvZTPTey\\nxcGJ3vvrJXazKk06pN05TN29o98jrYz4cengG3YGsXPNEpKsIrEl8NhbnxapEnM9\\nJCMRe0P5JcPsfZlX6hmiT7136GRWiGOUba2X9+HKh8QJVLG5rM007TBER9/z9mWm\\nrJuNh+m5l320oBQY/Qq3A7wzdEfZw8qm/mIN0FCeoXH1L6B8xXWaAYBwhTEh6SSn\\nZHlO1Xu1JWDmAvBCi0RO5aRSKM8q9QEkvvHP4yweAtK3N8+aAbZ7ovaDhyGz8r6r\\nzhU1b8Uo0Z2ysf503WqzQgIajr7Fry7/kUwpgQIDAQABAoIBADwJp80Ko1xHPZDy\\nfcCKBDfIuPvkmSW6KumbsLMaQv1aGdHDwwTGv3t0ixSay8CGlxMRtRDyZPib6SvQ\\n6OH/lpfpbMdW2ErkksgtoIKBVrDilfrcAvrNZu7NxRNbhCSvN8q0s4ICecjbbVQh\\nnueSdlA6vGXbW58BHMq68uRbHkP+k+mM9U0mDJ1HMch67wlg5GbayVRt63H7R2+r\\nVxcna7B80J/lCEjIYZznawgiTvp3MSanTglqAYi+m1EcSsP14bJIB9vgaxS79kTu\\noiSo93leJbBvuGo8QEiUqTwMw4tDksmkLsoqNKQ1q9P7LZ9DGcujtPy4EZsamSJT\\ny8OJt0ECgYEA2lxOxJsQk2kI325JgKFjo92mQeUObIvPfSNWUIZQDTjniOI6Gv63\\nGLWVFrZcvQBWjMEQraJA9xjPbblV8PtfO87MiJGLWCHFxmPz2dzoedN+2Coxom8m\\nV95CLz8QUShuao6u/RYcvUaZEoYs5bHcTmy5sBK80JyEmafJPtCQVxMCgYEAy3ar\\nZr3yv4xRPEPMat4rseswmuMooSaK3SKub19WFI5IAtB/e7qR1Rj9JhOGcZz+OQrl\\nT78O2OFYlgOIkJPvRMrPpK5V9lslc7tz1FSh3BZMRGq5jSyD7ETSOQ0c8T2O/s7v\\nbeEPbVbDe4mwvM24XByH0GnWveVxaDl51ABD65sCgYB3ZAspUkOA5egVCh8kNpnd\\nSd6SnuQBE3ySRlT2WEnCwP9Ph6oPgn+oAfiPX4xbRqkL8q/k0BdHQ4h+zNwhk7+h\\nWtPYRAP1Xxnc/F+jGjb+DVaIaKGU18MWPg7f+FI6nampl3Q0KvfxwX0GdNhtio8T\\nTj1E+SnFwh56SRQuxSh2gwKBgHKjlIO5NtNSflsUYFM+hyQiPiqnHzddfhSG+/3o\\nm5nNaSmczJesUYreH5San7/YEy2UxAugvP7aSY2MxB+iGsiJ9WD2kZzTUlDZJ7RV\\nUzWsoqBR+eZfVJ2FUWWvy8TpSG6trh4dFxImNtKejCR1TREpSiTV3Zb1dmahK9GV\\nrK9NAoGAbBxRLoC01xfxCTgt5BDiBcFVh4fp5yYKwavJPLzHSpuDOrrI9jDn1oKN\\nonq5sDU1i391zfQvdrbX4Ova48BN+B7p63FocP/MK5tyyBoT8zQEk2+vWDOw7H/Z\\nu5dTCPxTIsoIwUw1I+7yIxqJzLPFgR2gVBwY1ra/8iAqCj+zeBw=\\n-----END RSA PRIVATE KEY-----\\n\""
- }
- },
- "required": [
- "id",
- "node_id",
- "owner",
- "name",
- "description",
- "external_url",
- "html_url",
- "created_at",
- "updated_at",
- "permissions",
- "events"
- ],
- "additionalProperties": true
- }
- ]
- }
- },
- "required": [
- "id",
- "node_id",
- "sha",
- "ref",
- "task",
- "environment",
- "creator",
- "payload",
- "description",
- "statuses_url",
- "repository_url",
- "url",
- "created_at",
- "updated_at"
- ]
- }
- },
- "examples": {
- "default": {
- "value": [
- {
- "url": "https://api.github.com/repos/octocat/example/deployments/1",
- "id": 1,
- "node_id": "MDEwOkRlcGxveW1lbnQx",
- "sha": "a84d88e7554fc1fa21bcbc4efae3c782a70d2b9d",
- "ref": "topic-branch",
- "task": "deploy",
- "payload": {
- },
- "original_environment": "staging",
- "environment": "production",
- "description": "Deploy request from hubot",
- "creator": {
- "login": "octocat",
- "id": 1,
- "node_id": "MDQ6VXNlcjE=",
- "avatar_url": "https://github.com/images/error/octocat_happy.gif",
- "gravatar_id": "",
- "url": "https://api.github.com/users/octocat",
- "html_url": "https://github.com/octocat",
- "followers_url": "https://api.github.com/users/octocat/followers",
- "following_url": "https://api.github.com/users/octocat/following{/other_user}",
- "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}",
- "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}",
- "subscriptions_url": "https://api.github.com/users/octocat/subscriptions",
- "organizations_url": "https://api.github.com/users/octocat/orgs",
- "repos_url": "https://api.github.com/users/octocat/repos",
- "events_url": "https://api.github.com/users/octocat/events{/privacy}",
- "received_events_url": "https://api.github.com/users/octocat/received_events",
- "type": "User",
- "site_admin": false
- },
- "created_at": "2012-07-20T01:19:13Z",
- "updated_at": "2012-07-20T01:19:13Z",
- "statuses_url": "https://api.github.com/repos/octocat/example/deployments/1/statuses",
- "repository_url": "https://api.github.com/repos/octocat/example",
- "transient_environment": false,
- "production_environment": true
- }
- ]
- }
- }
- }
- }
- }
- },
- "x-github": {
- "githubCloudOnly": false,
- "enabledForGitHubApps": true,
- "previews": [
-
- ],
- "category": "actions",
- "subcategory": "workflow-runs"
- }
- }
- },
"/repos/{owner}/{repo}/actions/runs/{run_id}/rerun": {
"post": {
"summary": "Re-run a workflow",
@@ -147791,1632 +146503,6 @@
}
}
},
- "/repos/{owner}/{repo}/environments": {
- "get": {
- "summary": "Get all environments",
- "description": "Get all environments for a repository.\n\nAnyone with read access to the repository can use this endpoint. If the repository is private, you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint.",
- "tags": [
- "repos"
- ],
- "operationId": "repos/get-all-environments",
- "externalDocs": {
- "description": "API method documentation",
- "url": "https://docs.github.com/github-ae@latest/rest/reference/repos#get-all-environments"
- },
- "parameters": [
- {
- "name": "owner",
- "in": "path",
- "required": true,
- "schema": {
- "type": "string"
- }
- },
- {
- "name": "repo",
- "in": "path",
- "required": true,
- "schema": {
- "type": "string"
- }
- }
- ],
- "responses": {
- "200": {
- "description": "response",
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "total_count": {
- "description": "The number of environments in this repository",
- "example": 5,
- "type": "integer"
- },
- "environments": {
- "type": "array",
- "items": {
- "title": "Environment",
- "description": "Details of a deployment environment",
- "type": "object",
- "properties": {
- "id": {
- "description": "The id of the environment.",
- "example": 56780428,
- "type": "integer"
- },
- "node_id": {
- "type": "string",
- "example": "MDExOkVudmlyb25tZW50NTY3ODA0Mjg="
- },
- "name": {
- "description": "The name of the environment.",
- "example": "staging",
- "type": "string"
- },
- "url": {
- "type": "string",
- "example": "https://api.github.com/repos/github/hello-world/environments/staging"
- },
- "html_url": {
- "type": "string",
- "example": "https://github.com/github/hello-world/deployments/activity_log?environments_filter=staging"
- },
- "created_at": {
- "description": "The time that the environment was created, in ISO 8601 format.",
- "example": "2020-11-23T22:00:40Z",
- "format": "date-time",
- "type": "string"
- },
- "updated_at": {
- "description": "The time that the environment was last updated, in ISO 8601 format.",
- "example": "2020-11-23T22:00:40Z",
- "format": "date-time",
- "type": "string"
- },
- "protection_rules": {
- "type": "array",
- "items": {
- "anyOf": [
- {
- "type": "object",
- "properties": {
- "id": {
- "type": "integer",
- "example": 3515
- },
- "node_id": {
- "type": "string",
- "example": "MDQ6R2F0ZTM1MTU="
- },
- "type": {
- "type": "string",
- "example": "wait_timer"
- },
- "wait_timer": {
- "type": "integer",
- "example": 30,
- "description": "The amount of time to delay a job after the job is initially triggered. The time (in minutes) must be an integer between 0 and 43,200 (30 days)."
- }
- },
- "required": [
- "id",
- "node_id",
- "type"
- ]
- },
- {
- "type": "object",
- "properties": {
- "id": {
- "type": "integer",
- "example": 3755
- },
- "node_id": {
- "type": "string",
- "example": "MDQ6R2F0ZTM3NTU="
- },
- "type": {
- "type": "string",
- "example": "required_reviewers"
- },
- "reviewers": {
- "type": "array",
- "description": "The people or teams that may approve 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",
- "properties": {
- "type": {
- "type": "string",
- "description": "The type of reviewer. Must be one of: `User` or `Team`",
- "enum": [
- "User",
- "Team"
- ],
- "example": "User"
- },
- "reviewer": {
- "anyOf": [
- {
- "title": "Simple User",
- "description": "Simple User",
- "type": "object",
- "properties": {
- "login": {
- "type": "string",
- "example": "octocat"
- },
- "id": {
- "type": "integer",
- "example": 1
- },
- "node_id": {
- "type": "string",
- "example": "MDQ6VXNlcjE="
- },
- "avatar_url": {
- "type": "string",
- "format": "uri",
- "example": "https://github.com/images/error/octocat_happy.gif"
- },
- "gravatar_id": {
- "type": "string",
- "example": "41d064eb2195891e12d0413f63227ea7",
- "nullable": true
- },
- "url": {
- "type": "string",
- "format": "uri",
- "example": "https://api.github.com/users/octocat"
- },
- "html_url": {
- "type": "string",
- "format": "uri",
- "example": "https://github.com/octocat"
- },
- "followers_url": {
- "type": "string",
- "format": "uri",
- "example": "https://api.github.com/users/octocat/followers"
- },
- "following_url": {
- "type": "string",
- "example": "https://api.github.com/users/octocat/following{/other_user}"
- },
- "gists_url": {
- "type": "string",
- "example": "https://api.github.com/users/octocat/gists{/gist_id}"
- },
- "starred_url": {
- "type": "string",
- "example": "https://api.github.com/users/octocat/starred{/owner}{/repo}"
- },
- "subscriptions_url": {
- "type": "string",
- "format": "uri",
- "example": "https://api.github.com/users/octocat/subscriptions"
- },
- "organizations_url": {
- "type": "string",
- "format": "uri",
- "example": "https://api.github.com/users/octocat/orgs"
- },
- "repos_url": {
- "type": "string",
- "format": "uri",
- "example": "https://api.github.com/users/octocat/repos"
- },
- "events_url": {
- "type": "string",
- "example": "https://api.github.com/users/octocat/events{/privacy}"
- },
- "received_events_url": {
- "type": "string",
- "format": "uri",
- "example": "https://api.github.com/users/octocat/received_events"
- },
- "type": {
- "type": "string",
- "example": "User"
- },
- "site_admin": {
- "type": "boolean"
- },
- "starred_at": {
- "type": "string",
- "example": "\"2020-07-09T00:17:55Z\""
- }
- },
- "required": [
- "avatar_url",
- "events_url",
- "followers_url",
- "following_url",
- "gists_url",
- "gravatar_id",
- "html_url",
- "id",
- "node_id",
- "login",
- "organizations_url",
- "received_events_url",
- "repos_url",
- "site_admin",
- "starred_url",
- "subscriptions_url",
- "type",
- "url"
- ],
- "nullable": true
- },
- {
- "title": "Team Simple",
- "description": "Groups of organization members that gives permissions on specified repositories.",
- "type": "object",
- "properties": {
- "id": {
- "description": "Unique identifier of the team",
- "type": "integer",
- "example": 1
- },
- "node_id": {
- "type": "string",
- "example": "MDQ6VGVhbTE="
- },
- "url": {
- "description": "URL for the team",
- "type": "string",
- "format": "uri",
- "example": "https://api.github.com/organizations/1/team/1"
- },
- "members_url": {
- "type": "string",
- "example": "https://api.github.com/organizations/1/team/1/members{/member}"
- },
- "name": {
- "description": "Name of the team",
- "type": "string",
- "example": "Justice League"
- },
- "description": {
- "description": "Description of the team",
- "type": "string",
- "nullable": true,
- "example": "A great team."
- },
- "permission": {
- "description": "Permission that the team will have for its repositories",
- "type": "string",
- "example": "admin"
- },
- "privacy": {
- "description": "The level of privacy this team should have",
- "type": "string",
- "example": "closed"
- },
- "html_url": {
- "type": "string",
- "format": "uri",
- "example": "https://github.com/orgs/rails/teams/core"
- },
- "repositories_url": {
- "type": "string",
- "format": "uri",
- "example": "https://api.github.com/organizations/1/team/1/repos"
- },
- "slug": {
- "type": "string",
- "example": "justice-league"
- },
- "ldap_dn": {
- "description": "Distinguished Name (DN) that team maps to within LDAP environment",
- "example": "uid=example,ou=users,dc=github,dc=com",
- "type": "string"
- }
- },
- "required": [
- "id",
- "node_id",
- "url",
- "members_url",
- "name",
- "description",
- "permission",
- "html_url",
- "repositories_url",
- "slug"
- ],
- "nullable": true
- }
- ]
- }
- }
- }
- }
- },
- "required": [
- "id",
- "node_id",
- "type"
- ]
- },
- {
- "type": "object",
- "properties": {
- "id": {
- "type": "integer",
- "example": 3515
- },
- "node_id": {
- "type": "string",
- "example": "MDQ6R2F0ZTM1MTU="
- },
- "type": {
- "type": "string",
- "example": "branch_policy"
- }
- },
- "required": [
- "id",
- "node_id",
- "type"
- ]
- }
- ]
- }
- },
- "deployment_branch_policy": {
- "type": "object",
- "description": "The type of deployment branch policy for this environment. To allow all branches to deploy, set to `null`.",
- "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`."
- },
- "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`."
- }
- },
- "nullable": true,
- "required": [
- "protected_branches",
- "custom_branch_policies"
- ]
- }
- },
- "required": [
- "id",
- "node_id",
- "name",
- "url",
- "html_url",
- "created_at",
- "updated_at"
- ]
- }
- }
- }
- },
- "examples": {
- "default": {
- "value": {
- "total_count": 1,
- "environments": [
- {
- "id": 161088068,
- "node_id": "MDExOkVudmlyb25tZW50MTYxMDg4MDY4",
- "name": "staging",
- "url": "https://api.github.com/repos/github/hello-world/environments/staging",
- "html_url": "https://github.com/github/hello-world/deployments/activity_log?environments_filter=staging",
- "created_at": "2020-11-23T22:00:40Z",
- "updated_at": "2020-11-23T22:00:40Z",
- "protection_rules": [
- {
- "id": 3736,
- "node_id": "MDQ6R2F0ZTM3MzY=",
- "type": "wait_timer",
- "wait_timer": 30
- },
- {
- "id": 3755,
- "node_id": "MDQ6R2F0ZTM3NTU=",
- "type": "required_reviewers",
- "reviewers": [
- {
- "type": "User",
- "reviewer": {
- "login": "octocat",
- "id": 1,
- "node_id": "MDQ6VXNlcjE=",
- "avatar_url": "https://github.com/images/error/octocat_happy.gif",
- "gravatar_id": "",
- "url": "https://api.github.com/users/octocat",
- "html_url": "https://github.com/octocat",
- "followers_url": "https://api.github.com/users/octocat/followers",
- "following_url": "https://api.github.com/users/octocat/following{/other_user}",
- "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}",
- "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}",
- "subscriptions_url": "https://api.github.com/users/octocat/subscriptions",
- "organizations_url": "https://api.github.com/users/octocat/orgs",
- "repos_url": "https://api.github.com/users/octocat/repos",
- "events_url": "https://api.github.com/users/octocat/events{/privacy}",
- "received_events_url": "https://api.github.com/users/octocat/received_events",
- "type": "User",
- "site_admin": false
- }
- },
- {
- "type": "Team",
- "reviewer": {
- "id": 1,
- "node_id": "MDQ6VGVhbTE=",
- "url": "https://api.github.com/teams/1",
- "html_url": "https://github.com/orgs/github/teams/justice-league",
- "name": "Justice League",
- "slug": "justice-league",
- "description": "A great team.",
- "privacy": "closed",
- "permission": "admin",
- "members_url": "https://api.github.com/teams/1/members{/member}",
- "repositories_url": "https://api.github.com/teams/1/repos"
- }
- }
- ]
- },
- {
- "id": 3756,
- "node_id": "MDQ6R2F0ZTM3NTY=",
- "type": "branch_policy"
- }
- ],
- "deployment_branch_policy": {
- "protected_branches": false,
- "custom_branch_policies": true
- }
- }
- ]
- }
- }
- }
- }
- }
- }
- },
- "x-github": {
- "githubCloudOnly": false,
- "enabledForGitHubApps": true,
- "previews": [
-
- ],
- "category": "repos",
- "subcategory": "environments"
- }
- }
- },
- "/repos/{owner}/{repo}/environments/{environment_name}": {
- "get": {
- "summary": "Get an environment",
- "description": "Anyone with read access to the repository can use this endpoint. If the repository is private, you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint.",
- "tags": [
- "repos"
- ],
- "operationId": "repos/get-environment",
- "externalDocs": {
- "description": "API method documentation",
- "url": "https://docs.github.com/github-ae@latest/rest/reference/repos#get-an-environment"
- },
- "parameters": [
- {
- "name": "owner",
- "in": "path",
- "required": true,
- "schema": {
- "type": "string"
- }
- },
- {
- "name": "repo",
- "in": "path",
- "required": true,
- "schema": {
- "type": "string"
- }
- },
- {
- "name": "environment_name",
- "in": "path",
- "required": true,
- "description": "The name of the environment",
- "schema": {
- "type": "string"
- }
- }
- ],
- "responses": {
- "200": {
- "description": "response",
- "content": {
- "application/json": {
- "schema": {
- "title": "Environment",
- "description": "Details of a deployment environment",
- "type": "object",
- "properties": {
- "id": {
- "description": "The id of the environment.",
- "example": 56780428,
- "type": "integer"
- },
- "node_id": {
- "type": "string",
- "example": "MDExOkVudmlyb25tZW50NTY3ODA0Mjg="
- },
- "name": {
- "description": "The name of the environment.",
- "example": "staging",
- "type": "string"
- },
- "url": {
- "type": "string",
- "example": "https://api.github.com/repos/github/hello-world/environments/staging"
- },
- "html_url": {
- "type": "string",
- "example": "https://github.com/github/hello-world/deployments/activity_log?environments_filter=staging"
- },
- "created_at": {
- "description": "The time that the environment was created, in ISO 8601 format.",
- "example": "2020-11-23T22:00:40Z",
- "format": "date-time",
- "type": "string"
- },
- "updated_at": {
- "description": "The time that the environment was last updated, in ISO 8601 format.",
- "example": "2020-11-23T22:00:40Z",
- "format": "date-time",
- "type": "string"
- },
- "protection_rules": {
- "type": "array",
- "items": {
- "anyOf": [
- {
- "type": "object",
- "properties": {
- "id": {
- "type": "integer",
- "example": 3515
- },
- "node_id": {
- "type": "string",
- "example": "MDQ6R2F0ZTM1MTU="
- },
- "type": {
- "type": "string",
- "example": "wait_timer"
- },
- "wait_timer": {
- "type": "integer",
- "example": 30,
- "description": "The amount of time to delay a job after the job is initially triggered. The time (in minutes) must be an integer between 0 and 43,200 (30 days)."
- }
- },
- "required": [
- "id",
- "node_id",
- "type"
- ]
- },
- {
- "type": "object",
- "properties": {
- "id": {
- "type": "integer",
- "example": 3755
- },
- "node_id": {
- "type": "string",
- "example": "MDQ6R2F0ZTM3NTU="
- },
- "type": {
- "type": "string",
- "example": "required_reviewers"
- },
- "reviewers": {
- "type": "array",
- "description": "The people or teams that may approve 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",
- "properties": {
- "type": {
- "type": "string",
- "description": "The type of reviewer. Must be one of: `User` or `Team`",
- "enum": [
- "User",
- "Team"
- ],
- "example": "User"
- },
- "reviewer": {
- "anyOf": [
- {
- "title": "Simple User",
- "description": "Simple User",
- "type": "object",
- "properties": {
- "login": {
- "type": "string",
- "example": "octocat"
- },
- "id": {
- "type": "integer",
- "example": 1
- },
- "node_id": {
- "type": "string",
- "example": "MDQ6VXNlcjE="
- },
- "avatar_url": {
- "type": "string",
- "format": "uri",
- "example": "https://github.com/images/error/octocat_happy.gif"
- },
- "gravatar_id": {
- "type": "string",
- "example": "41d064eb2195891e12d0413f63227ea7",
- "nullable": true
- },
- "url": {
- "type": "string",
- "format": "uri",
- "example": "https://api.github.com/users/octocat"
- },
- "html_url": {
- "type": "string",
- "format": "uri",
- "example": "https://github.com/octocat"
- },
- "followers_url": {
- "type": "string",
- "format": "uri",
- "example": "https://api.github.com/users/octocat/followers"
- },
- "following_url": {
- "type": "string",
- "example": "https://api.github.com/users/octocat/following{/other_user}"
- },
- "gists_url": {
- "type": "string",
- "example": "https://api.github.com/users/octocat/gists{/gist_id}"
- },
- "starred_url": {
- "type": "string",
- "example": "https://api.github.com/users/octocat/starred{/owner}{/repo}"
- },
- "subscriptions_url": {
- "type": "string",
- "format": "uri",
- "example": "https://api.github.com/users/octocat/subscriptions"
- },
- "organizations_url": {
- "type": "string",
- "format": "uri",
- "example": "https://api.github.com/users/octocat/orgs"
- },
- "repos_url": {
- "type": "string",
- "format": "uri",
- "example": "https://api.github.com/users/octocat/repos"
- },
- "events_url": {
- "type": "string",
- "example": "https://api.github.com/users/octocat/events{/privacy}"
- },
- "received_events_url": {
- "type": "string",
- "format": "uri",
- "example": "https://api.github.com/users/octocat/received_events"
- },
- "type": {
- "type": "string",
- "example": "User"
- },
- "site_admin": {
- "type": "boolean"
- },
- "starred_at": {
- "type": "string",
- "example": "\"2020-07-09T00:17:55Z\""
- }
- },
- "required": [
- "avatar_url",
- "events_url",
- "followers_url",
- "following_url",
- "gists_url",
- "gravatar_id",
- "html_url",
- "id",
- "node_id",
- "login",
- "organizations_url",
- "received_events_url",
- "repos_url",
- "site_admin",
- "starred_url",
- "subscriptions_url",
- "type",
- "url"
- ],
- "nullable": true
- },
- {
- "title": "Team Simple",
- "description": "Groups of organization members that gives permissions on specified repositories.",
- "type": "object",
- "properties": {
- "id": {
- "description": "Unique identifier of the team",
- "type": "integer",
- "example": 1
- },
- "node_id": {
- "type": "string",
- "example": "MDQ6VGVhbTE="
- },
- "url": {
- "description": "URL for the team",
- "type": "string",
- "format": "uri",
- "example": "https://api.github.com/organizations/1/team/1"
- },
- "members_url": {
- "type": "string",
- "example": "https://api.github.com/organizations/1/team/1/members{/member}"
- },
- "name": {
- "description": "Name of the team",
- "type": "string",
- "example": "Justice League"
- },
- "description": {
- "description": "Description of the team",
- "type": "string",
- "nullable": true,
- "example": "A great team."
- },
- "permission": {
- "description": "Permission that the team will have for its repositories",
- "type": "string",
- "example": "admin"
- },
- "privacy": {
- "description": "The level of privacy this team should have",
- "type": "string",
- "example": "closed"
- },
- "html_url": {
- "type": "string",
- "format": "uri",
- "example": "https://github.com/orgs/rails/teams/core"
- },
- "repositories_url": {
- "type": "string",
- "format": "uri",
- "example": "https://api.github.com/organizations/1/team/1/repos"
- },
- "slug": {
- "type": "string",
- "example": "justice-league"
- },
- "ldap_dn": {
- "description": "Distinguished Name (DN) that team maps to within LDAP environment",
- "example": "uid=example,ou=users,dc=github,dc=com",
- "type": "string"
- }
- },
- "required": [
- "id",
- "node_id",
- "url",
- "members_url",
- "name",
- "description",
- "permission",
- "html_url",
- "repositories_url",
- "slug"
- ],
- "nullable": true
- }
- ]
- }
- }
- }
- }
- },
- "required": [
- "id",
- "node_id",
- "type"
- ]
- },
- {
- "type": "object",
- "properties": {
- "id": {
- "type": "integer",
- "example": 3515
- },
- "node_id": {
- "type": "string",
- "example": "MDQ6R2F0ZTM1MTU="
- },
- "type": {
- "type": "string",
- "example": "branch_policy"
- }
- },
- "required": [
- "id",
- "node_id",
- "type"
- ]
- }
- ]
- }
- },
- "deployment_branch_policy": {
- "type": "object",
- "description": "The type of deployment branch policy for this environment. To allow all branches to deploy, set to `null`.",
- "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`."
- },
- "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`."
- }
- },
- "nullable": true,
- "required": [
- "protected_branches",
- "custom_branch_policies"
- ]
- }
- },
- "required": [
- "id",
- "node_id",
- "name",
- "url",
- "html_url",
- "created_at",
- "updated_at"
- ]
- },
- "examples": {
- "default": {
- "value": {
- "id": 161088068,
- "node_id": "MDExOkVudmlyb25tZW50MTYxMDg4MDY4",
- "name": "staging",
- "url": "https://api.github.com/repos/github/hello-world/environments/staging",
- "html_url": "https://github.com/github/hello-world/deployments/activity_log?environments_filter=staging",
- "created_at": "2020-11-23T22:00:40Z",
- "updated_at": "2020-11-23T22:00:40Z",
- "protection_rules": [
- {
- "id": 3736,
- "node_id": "MDQ6R2F0ZTM3MzY=",
- "type": "wait_timer",
- "wait_timer": 30
- },
- {
- "id": 3755,
- "node_id": "MDQ6R2F0ZTM3NTU=",
- "type": "required_reviewers",
- "reviewers": [
- {
- "type": "User",
- "reviewer": {
- "login": "octocat",
- "id": 1,
- "node_id": "MDQ6VXNlcjE=",
- "avatar_url": "https://github.com/images/error/octocat_happy.gif",
- "gravatar_id": "",
- "url": "https://api.github.com/users/octocat",
- "html_url": "https://github.com/octocat",
- "followers_url": "https://api.github.com/users/octocat/followers",
- "following_url": "https://api.github.com/users/octocat/following{/other_user}",
- "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}",
- "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}",
- "subscriptions_url": "https://api.github.com/users/octocat/subscriptions",
- "organizations_url": "https://api.github.com/users/octocat/orgs",
- "repos_url": "https://api.github.com/users/octocat/repos",
- "events_url": "https://api.github.com/users/octocat/events{/privacy}",
- "received_events_url": "https://api.github.com/users/octocat/received_events",
- "type": "User",
- "site_admin": false
- }
- },
- {
- "type": "Team",
- "reviewer": {
- "id": 1,
- "node_id": "MDQ6VGVhbTE=",
- "url": "https://api.github.com/teams/1",
- "html_url": "https://github.com/orgs/github/teams/justice-league",
- "name": "Justice League",
- "slug": "justice-league",
- "description": "A great team.",
- "privacy": "closed",
- "permission": "admin",
- "members_url": "https://api.github.com/teams/1/members{/member}",
- "repositories_url": "https://api.github.com/teams/1/repos"
- }
- }
- ]
- },
- {
- "id": 3756,
- "node_id": "MDQ6R2F0ZTM3NTY=",
- "type": "branch_policy"
- }
- ],
- "deployment_branch_policy": {
- "protected_branches": false,
- "custom_branch_policies": true
- }
- }
- }
- }
- }
- }
- }
- },
- "x-github": {
- "githubCloudOnly": false,
- "enabledForGitHubApps": true,
- "previews": [
-
- ],
- "category": "repos",
- "subcategory": "environments"
- }
- },
- "put": {
- "summary": "Create or update an environment",
- "description": "Create or update an environment with protection rules, such as required reviewers. For more information about environment protection rules, see \"[Environments](/actions/reference/environments#environment-protection-rules).\"\n\n**Note:** Although you can use this operation to specify that only branches that match specified name patterns can deploy to this environment, you must use the UI to set the name patterns. For more information, see \"[Environments](/actions/reference/environments#deployment-branches).\"\n\n**Note:** To create or update secrets for an environment, see \"[Secrets](/rest/reference/actions#secrets).\"\n\nYou must authenticate using an access token with the repo scope to use this endpoint.",
- "tags": [
- "repos"
- ],
- "operationId": "repos/create-or-update-environment",
- "externalDocs": {
- "description": "API method documentation",
- "url": "https://docs.github.com/github-ae@latest/rest/reference/repos#create-or-update-an-environment"
- },
- "parameters": [
- {
- "name": "owner",
- "in": "path",
- "required": true,
- "schema": {
- "type": "string"
- }
- },
- {
- "name": "repo",
- "in": "path",
- "required": true,
- "schema": {
- "type": "string"
- }
- },
- {
- "name": "environment_name",
- "in": "path",
- "required": true,
- "description": "The name of the environment",
- "schema": {
- "type": "string"
- }
- }
- ],
- "requestBody": {
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "nullable": true,
- "properties": {
- "wait_timer": {
- "type": "integer",
- "example": 30,
- "description": "The amount of time to delay a job after the job is initially triggered. The time (in minutes) must be an integer between 0 and 43,200 (30 days)."
- },
- "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",
- "properties": {
- "type": {
- "type": "string",
- "description": "The type of reviewer. Must be one of: `User` or `Team`",
- "enum": [
- "User",
- "Team"
- ],
- "example": "User"
- },
- "id": {
- "type": "integer",
- "description": "The id of the user or team who can review the deployment",
- "example": 4532992
- }
- }
- }
- },
- "deployment_branch_policy": {
- "type": "object",
- "description": "The type of deployment branch policy for this environment. To allow all branches to deploy, set to `null`.",
- "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`."
- },
- "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`."
- }
- },
- "nullable": true,
- "required": [
- "protected_branches",
- "custom_branch_policies"
- ]
- }
- },
- "additionalProperties": false
- }
- }
- }
- },
- "responses": {
- "200": {
- "description": "response",
- "content": {
- "application/json": {
- "schema": {
- "title": "Environment",
- "description": "Details of a deployment environment",
- "type": "object",
- "properties": {
- "id": {
- "description": "The id of the environment.",
- "example": 56780428,
- "type": "integer"
- },
- "node_id": {
- "type": "string",
- "example": "MDExOkVudmlyb25tZW50NTY3ODA0Mjg="
- },
- "name": {
- "description": "The name of the environment.",
- "example": "staging",
- "type": "string"
- },
- "url": {
- "type": "string",
- "example": "https://api.github.com/repos/github/hello-world/environments/staging"
- },
- "html_url": {
- "type": "string",
- "example": "https://github.com/github/hello-world/deployments/activity_log?environments_filter=staging"
- },
- "created_at": {
- "description": "The time that the environment was created, in ISO 8601 format.",
- "example": "2020-11-23T22:00:40Z",
- "format": "date-time",
- "type": "string"
- },
- "updated_at": {
- "description": "The time that the environment was last updated, in ISO 8601 format.",
- "example": "2020-11-23T22:00:40Z",
- "format": "date-time",
- "type": "string"
- },
- "protection_rules": {
- "type": "array",
- "items": {
- "anyOf": [
- {
- "type": "object",
- "properties": {
- "id": {
- "type": "integer",
- "example": 3515
- },
- "node_id": {
- "type": "string",
- "example": "MDQ6R2F0ZTM1MTU="
- },
- "type": {
- "type": "string",
- "example": "wait_timer"
- },
- "wait_timer": {
- "type": "integer",
- "example": 30,
- "description": "The amount of time to delay a job after the job is initially triggered. The time (in minutes) must be an integer between 0 and 43,200 (30 days)."
- }
- },
- "required": [
- "id",
- "node_id",
- "type"
- ]
- },
- {
- "type": "object",
- "properties": {
- "id": {
- "type": "integer",
- "example": 3755
- },
- "node_id": {
- "type": "string",
- "example": "MDQ6R2F0ZTM3NTU="
- },
- "type": {
- "type": "string",
- "example": "required_reviewers"
- },
- "reviewers": {
- "type": "array",
- "description": "The people or teams that may approve 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",
- "properties": {
- "type": {
- "type": "string",
- "description": "The type of reviewer. Must be one of: `User` or `Team`",
- "enum": [
- "User",
- "Team"
- ],
- "example": "User"
- },
- "reviewer": {
- "anyOf": [
- {
- "title": "Simple User",
- "description": "Simple User",
- "type": "object",
- "properties": {
- "login": {
- "type": "string",
- "example": "octocat"
- },
- "id": {
- "type": "integer",
- "example": 1
- },
- "node_id": {
- "type": "string",
- "example": "MDQ6VXNlcjE="
- },
- "avatar_url": {
- "type": "string",
- "format": "uri",
- "example": "https://github.com/images/error/octocat_happy.gif"
- },
- "gravatar_id": {
- "type": "string",
- "example": "41d064eb2195891e12d0413f63227ea7",
- "nullable": true
- },
- "url": {
- "type": "string",
- "format": "uri",
- "example": "https://api.github.com/users/octocat"
- },
- "html_url": {
- "type": "string",
- "format": "uri",
- "example": "https://github.com/octocat"
- },
- "followers_url": {
- "type": "string",
- "format": "uri",
- "example": "https://api.github.com/users/octocat/followers"
- },
- "following_url": {
- "type": "string",
- "example": "https://api.github.com/users/octocat/following{/other_user}"
- },
- "gists_url": {
- "type": "string",
- "example": "https://api.github.com/users/octocat/gists{/gist_id}"
- },
- "starred_url": {
- "type": "string",
- "example": "https://api.github.com/users/octocat/starred{/owner}{/repo}"
- },
- "subscriptions_url": {
- "type": "string",
- "format": "uri",
- "example": "https://api.github.com/users/octocat/subscriptions"
- },
- "organizations_url": {
- "type": "string",
- "format": "uri",
- "example": "https://api.github.com/users/octocat/orgs"
- },
- "repos_url": {
- "type": "string",
- "format": "uri",
- "example": "https://api.github.com/users/octocat/repos"
- },
- "events_url": {
- "type": "string",
- "example": "https://api.github.com/users/octocat/events{/privacy}"
- },
- "received_events_url": {
- "type": "string",
- "format": "uri",
- "example": "https://api.github.com/users/octocat/received_events"
- },
- "type": {
- "type": "string",
- "example": "User"
- },
- "site_admin": {
- "type": "boolean"
- },
- "starred_at": {
- "type": "string",
- "example": "\"2020-07-09T00:17:55Z\""
- }
- },
- "required": [
- "avatar_url",
- "events_url",
- "followers_url",
- "following_url",
- "gists_url",
- "gravatar_id",
- "html_url",
- "id",
- "node_id",
- "login",
- "organizations_url",
- "received_events_url",
- "repos_url",
- "site_admin",
- "starred_url",
- "subscriptions_url",
- "type",
- "url"
- ],
- "nullable": true
- },
- {
- "title": "Team Simple",
- "description": "Groups of organization members that gives permissions on specified repositories.",
- "type": "object",
- "properties": {
- "id": {
- "description": "Unique identifier of the team",
- "type": "integer",
- "example": 1
- },
- "node_id": {
- "type": "string",
- "example": "MDQ6VGVhbTE="
- },
- "url": {
- "description": "URL for the team",
- "type": "string",
- "format": "uri",
- "example": "https://api.github.com/organizations/1/team/1"
- },
- "members_url": {
- "type": "string",
- "example": "https://api.github.com/organizations/1/team/1/members{/member}"
- },
- "name": {
- "description": "Name of the team",
- "type": "string",
- "example": "Justice League"
- },
- "description": {
- "description": "Description of the team",
- "type": "string",
- "nullable": true,
- "example": "A great team."
- },
- "permission": {
- "description": "Permission that the team will have for its repositories",
- "type": "string",
- "example": "admin"
- },
- "privacy": {
- "description": "The level of privacy this team should have",
- "type": "string",
- "example": "closed"
- },
- "html_url": {
- "type": "string",
- "format": "uri",
- "example": "https://github.com/orgs/rails/teams/core"
- },
- "repositories_url": {
- "type": "string",
- "format": "uri",
- "example": "https://api.github.com/organizations/1/team/1/repos"
- },
- "slug": {
- "type": "string",
- "example": "justice-league"
- },
- "ldap_dn": {
- "description": "Distinguished Name (DN) that team maps to within LDAP environment",
- "example": "uid=example,ou=users,dc=github,dc=com",
- "type": "string"
- }
- },
- "required": [
- "id",
- "node_id",
- "url",
- "members_url",
- "name",
- "description",
- "permission",
- "html_url",
- "repositories_url",
- "slug"
- ],
- "nullable": true
- }
- ]
- }
- }
- }
- }
- },
- "required": [
- "id",
- "node_id",
- "type"
- ]
- },
- {
- "type": "object",
- "properties": {
- "id": {
- "type": "integer",
- "example": 3515
- },
- "node_id": {
- "type": "string",
- "example": "MDQ6R2F0ZTM1MTU="
- },
- "type": {
- "type": "string",
- "example": "branch_policy"
- }
- },
- "required": [
- "id",
- "node_id",
- "type"
- ]
- }
- ]
- }
- },
- "deployment_branch_policy": {
- "type": "object",
- "description": "The type of deployment branch policy for this environment. To allow all branches to deploy, set to `null`.",
- "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`."
- },
- "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`."
- }
- },
- "nullable": true,
- "required": [
- "protected_branches",
- "custom_branch_policies"
- ]
- }
- },
- "required": [
- "id",
- "node_id",
- "name",
- "url",
- "html_url",
- "created_at",
- "updated_at"
- ]
- },
- "examples": {
- "default": {
- "value": {
- "id": 161088068,
- "node_id": "MDExOkVudmlyb25tZW50MTYxMDg4MDY4",
- "name": "staging",
- "url": "https://api.github.com/repos/github/hello-world/environments/staging",
- "html_url": "https://github.com/github/hello-world/deployments/activity_log?environments_filter=staging",
- "created_at": "2020-11-23T22:00:40Z",
- "updated_at": "2020-11-23T22:00:40Z",
- "protection_rules": [
- {
- "id": 3736,
- "node_id": "MDQ6R2F0ZTM3MzY=",
- "type": "wait_timer",
- "wait_timer": 30
- },
- {
- "id": 3755,
- "node_id": "MDQ6R2F0ZTM3NTU=",
- "type": "required_reviewers",
- "reviewers": [
- {
- "type": "User",
- "reviewer": {
- "login": "octocat",
- "id": 1,
- "node_id": "MDQ6VXNlcjE=",
- "avatar_url": "https://github.com/images/error/octocat_happy.gif",
- "gravatar_id": "",
- "url": "https://api.github.com/users/octocat",
- "html_url": "https://github.com/octocat",
- "followers_url": "https://api.github.com/users/octocat/followers",
- "following_url": "https://api.github.com/users/octocat/following{/other_user}",
- "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}",
- "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}",
- "subscriptions_url": "https://api.github.com/users/octocat/subscriptions",
- "organizations_url": "https://api.github.com/users/octocat/orgs",
- "repos_url": "https://api.github.com/users/octocat/repos",
- "events_url": "https://api.github.com/users/octocat/events{/privacy}",
- "received_events_url": "https://api.github.com/users/octocat/received_events",
- "type": "User",
- "site_admin": false
- }
- },
- {
- "type": "Team",
- "reviewer": {
- "id": 1,
- "node_id": "MDQ6VGVhbTE=",
- "url": "https://api.github.com/teams/1",
- "html_url": "https://github.com/orgs/github/teams/justice-league",
- "name": "Justice League",
- "slug": "justice-league",
- "description": "A great team.",
- "privacy": "closed",
- "permission": "admin",
- "members_url": "https://api.github.com/teams/1/members{/member}",
- "repositories_url": "https://api.github.com/teams/1/repos"
- }
- }
- ]
- },
- {
- "id": 3756,
- "node_id": "MDQ6R2F0ZTM3NTY=",
- "type": "branch_policy"
- }
- ],
- "deployment_branch_policy": {
- "protected_branches": false,
- "custom_branch_policies": true
- }
- }
- }
- }
- }
- }
- },
- "422": {
- "description": "Validation error when the environment name is invalid or when `protected_branches` and `custom_branch_policies` in `deployment_branch_policy` are set to the same value",
- "content": {
- "application/json": {
- "schema": {
- "title": "Basic Error",
- "description": "Basic Error",
- "type": "object",
- "properties": {
- "message": {
- "type": "string"
- },
- "documentation_url": {
- "type": "string"
- }
- }
- }
- }
- }
- }
- },
- "x-github": {
- "githubCloudOnly": false,
- "enabledForGitHubApps": true,
- "previews": [
-
- ],
- "category": "repos",
- "subcategory": "environments"
- }
- },
- "delete": {
- "summary": "Delete an environment",
- "description": "You must authenticate using an access token with the repo scope to use this endpoint.",
- "tags": [
- "repos"
- ],
- "operationId": "repos/delete-an-environment",
- "externalDocs": {
- "description": "API method documentation",
- "url": "https://docs.github.com/github-ae@latest/rest/reference/repos#delete-an-environment"
- },
- "parameters": [
- {
- "name": "owner",
- "in": "path",
- "required": true,
- "schema": {
- "type": "string"
- }
- },
- {
- "name": "repo",
- "in": "path",
- "required": true,
- "schema": {
- "type": "string"
- }
- },
- {
- "name": "environment_name",
- "in": "path",
- "required": true,
- "description": "The name of the environment",
- "schema": {
- "type": "string"
- }
- }
- ],
- "responses": {
- "204": {
- "description": "Default response"
- }
- },
- "x-github": {
- "githubCloudOnly": false,
- "enabledForGitHubApps": true,
- "previews": [
-
- ],
- "category": "repos",
- "subcategory": "environments"
- }
- }
- },
"/repos/{owner}/{repo}/events": {
"get": {
"summary": "List repository events",
@@ -241971,467 +239057,6 @@
}
}
},
- "/repositories/{repository_id}/environments/{environment_name}/secrets": {
- "get": {
- "summary": "List environment secrets",
- "description": "Lists all secrets available in an environment without revealing their encrypted values. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use this endpoint.",
- "tags": [
- "actions"
- ],
- "operationId": "actions/list-environment-secrets",
- "externalDocs": {
- "description": "API method documentation",
- "url": "https://docs.github.com/github-ae@latest/rest/reference/actions#list-environment-secrets"
- },
- "parameters": [
- {
- "name": "repository_id",
- "in": "path",
- "required": true,
- "schema": {
- "type": "integer"
- }
- },
- {
- "name": "environment_name",
- "in": "path",
- "required": true,
- "description": "The name of the environment",
- "schema": {
- "type": "string"
- }
- },
- {
- "name": "per_page",
- "description": "Results per page (max 100).",
- "in": "query",
- "schema": {
- "type": "integer",
- "default": 30
- }
- },
- {
- "name": "page",
- "description": "Page number of the results to fetch.",
- "in": "query",
- "schema": {
- "type": "integer",
- "default": 1
- }
- }
- ],
- "responses": {
- "200": {
- "description": "response",
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "required": [
- "total_count",
- "secrets"
- ],
- "properties": {
- "total_count": {
- "type": "integer"
- },
- "secrets": {
- "type": "array",
- "items": {
- "title": "Actions Secret",
- "description": "Set secrets for GitHub Actions.",
- "type": "object",
- "properties": {
- "name": {
- "description": "The name of the secret.",
- "example": "SECRET_TOKEN",
- "type": "string"
- },
- "created_at": {
- "type": "string",
- "format": "date-time"
- },
- "updated_at": {
- "type": "string",
- "format": "date-time"
- }
- },
- "required": [
- "name",
- "created_at",
- "updated_at"
- ]
- }
- }
- }
- },
- "examples": {
- "default": {
- "value": {
- "total_count": 2,
- "secrets": [
- {
- "name": "GH_TOKEN",
- "created_at": "2019-08-10T14:59:22Z",
- "updated_at": "2020-01-10T14:59:22Z"
- },
- {
- "name": "GIST_ID",
- "created_at": "2020-01-10T10:59:22Z",
- "updated_at": "2020-01-11T11:59:22Z"
- }
- ]
- }
- }
- }
- }
- },
- "headers": {
- "Link": {
- "example": "; rel=\"next\", ; rel=\"last\"",
- "schema": {
- "type": "string"
- }
- }
- }
- }
- },
- "x-github": {
- "githubCloudOnly": false,
- "enabledForGitHubApps": true,
- "previews": [
-
- ],
- "category": "actions",
- "subcategory": "secrets"
- }
- }
- },
- "/repositories/{repository_id}/environments/{environment_name}/secrets/public-key": {
- "get": {
- "summary": "Get an environment public key",
- "description": "Get the public key for an environment, which you need to encrypt environment secrets. You need to encrypt a secret before you can create or update secrets. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `secrets` repository permission to use this endpoint.",
- "tags": [
- "actions"
- ],
- "operationId": "actions/get-environment-public-key",
- "externalDocs": {
- "description": "API method documentation",
- "url": "https://docs.github.com/github-ae@latest/rest/reference/actions#get-an-environment-public-key"
- },
- "parameters": [
- {
- "name": "repository_id",
- "in": "path",
- "required": true,
- "schema": {
- "type": "integer"
- }
- },
- {
- "name": "environment_name",
- "in": "path",
- "required": true,
- "description": "The name of the environment",
- "schema": {
- "type": "string"
- }
- }
- ],
- "responses": {
- "200": {
- "description": "response",
- "content": {
- "application/json": {
- "schema": {
- "title": "ActionsPublicKey",
- "description": "The public key used for setting Actions Secrets.",
- "type": "object",
- "properties": {
- "key_id": {
- "description": "The identifier for the key.",
- "type": "string",
- "example": "1234567"
- },
- "key": {
- "description": "The Base64 encoded public key.",
- "type": "string",
- "example": "hBT5WZEj8ZoOv6TYJsfWq7MxTEQopZO5/IT3ZCVQPzs="
- },
- "id": {
- "type": "integer",
- "example": 2
- },
- "url": {
- "type": "string",
- "example": "https://api.github.com/user/keys/2"
- },
- "title": {
- "type": "string",
- "example": "ssh-rsa AAAAB3NzaC1yc2EAAA"
- },
- "created_at": {
- "type": "string",
- "example": "2011-01-26T19:01:12Z"
- }
- },
- "required": [
- "key_id",
- "key"
- ]
- },
- "examples": {
- "default": {
- "value": {
- "key_id": "012345678912345678",
- "key": "2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvv1234"
- }
- }
- }
- }
- }
- }
- },
- "x-github": {
- "githubCloudOnly": false,
- "enabledForGitHubApps": true,
- "previews": [
-
- ],
- "category": "actions",
- "subcategory": "secrets"
- }
- }
- },
- "/repositories/{repository_id}/environments/{environment_name}/secrets/{secret_name}": {
- "get": {
- "summary": "Get an environment secret",
- "description": "Gets a single environment secret without revealing its encrypted value. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use this endpoint.",
- "tags": [
- "actions"
- ],
- "operationId": "actions/get-environment-secret",
- "externalDocs": {
- "description": "API method documentation",
- "url": "https://docs.github.com/github-ae@latest/rest/reference/actions#get-an-environment-secret"
- },
- "parameters": [
- {
- "name": "repository_id",
- "in": "path",
- "required": true,
- "schema": {
- "type": "integer"
- }
- },
- {
- "name": "environment_name",
- "in": "path",
- "required": true,
- "description": "The name of the environment",
- "schema": {
- "type": "string"
- }
- },
- {
- "name": "secret_name",
- "description": "secret_name parameter",
- "in": "path",
- "required": true,
- "schema": {
- "type": "string"
- }
- }
- ],
- "responses": {
- "200": {
- "description": "response",
- "content": {
- "application/json": {
- "schema": {
- "title": "Actions Secret",
- "description": "Set secrets for GitHub Actions.",
- "type": "object",
- "properties": {
- "name": {
- "description": "The name of the secret.",
- "example": "SECRET_TOKEN",
- "type": "string"
- },
- "created_at": {
- "type": "string",
- "format": "date-time"
- },
- "updated_at": {
- "type": "string",
- "format": "date-time"
- }
- },
- "required": [
- "name",
- "created_at",
- "updated_at"
- ]
- },
- "examples": {
- "default": {
- "value": {
- "name": "GH_TOKEN",
- "created_at": "2019-08-10T14:59:22Z",
- "updated_at": "2020-01-10T14:59:22Z"
- }
- }
- }
- }
- }
- }
- },
- "x-github": {
- "githubCloudOnly": false,
- "enabledForGitHubApps": true,
- "previews": [
-
- ],
- "category": "actions",
- "subcategory": "secrets"
- }
- },
- "put": {
- "summary": "Create or update an environment secret",
- "description": "Creates or updates an environment secret with an encrypted value. Encrypt your secret using\n[LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). You must authenticate using an access\ntoken with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use\nthis endpoint.\n\n#### Example encrypting a secret using Node.js\n\nEncrypt your secret using the [tweetsodium](https://github.com/github/tweetsodium) library.\n\n```\nconst sodium = require('tweetsodium');\n\nconst key = \"base64-encoded-public-key\";\nconst value = \"plain-text-secret\";\n\n// Convert the message and key to Uint8Array's (Buffer implements that interface)\nconst messageBytes = Buffer.from(value);\nconst keyBytes = Buffer.from(key, 'base64');\n\n// Encrypt using LibSodium.\nconst encryptedBytes = sodium.seal(messageBytes, keyBytes);\n\n// Base64 the encrypted secret\nconst encrypted = Buffer.from(encryptedBytes).toString('base64');\n\nconsole.log(encrypted);\n```\n\n\n#### Example encrypting a secret using Python\n\nEncrypt your secret using [pynacl](https://pynacl.readthedocs.io/en/stable/public/#nacl-public-sealedbox) with Python 3.\n\n```\nfrom base64 import b64encode\nfrom nacl import encoding, public\n\ndef encrypt(public_key: str, secret_value: str) -> str:\n \"\"\"Encrypt a Unicode string using the public key.\"\"\"\n public_key = public.PublicKey(public_key.encode(\"utf-8\"), encoding.Base64Encoder())\n sealed_box = public.SealedBox(public_key)\n encrypted = sealed_box.encrypt(secret_value.encode(\"utf-8\"))\n return b64encode(encrypted).decode(\"utf-8\")\n```\n\n#### Example encrypting a secret using C#\n\nEncrypt your secret using the [Sodium.Core](https://www.nuget.org/packages/Sodium.Core/) package.\n\n```\nvar secretValue = System.Text.Encoding.UTF8.GetBytes(\"mySecret\");\nvar publicKey = Convert.FromBase64String(\"2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU=\");\n\nvar sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey);\n\nConsole.WriteLine(Convert.ToBase64String(sealedPublicKeyBox));\n```\n\n#### Example encrypting a secret using Ruby\n\nEncrypt your secret using the [rbnacl](https://github.com/RubyCrypto/rbnacl) gem.\n\n```ruby\nrequire \"rbnacl\"\nrequire \"base64\"\n\nkey = Base64.decode64(\"+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=\")\npublic_key = RbNaCl::PublicKey.new(key)\n\nbox = RbNaCl::Boxes::Sealed.from_public_key(public_key)\nencrypted_secret = box.encrypt(\"my_secret\")\n\n# Print the base64 encoded secret\nputs Base64.strict_encode64(encrypted_secret)\n```",
- "tags": [
- "actions"
- ],
- "operationId": "actions/create-or-update-environment-secret",
- "externalDocs": {
- "description": "API method documentation",
- "url": "https://docs.github.com/github-ae@latest/rest/reference/actions#create-or-update-an-environment-secret"
- },
- "parameters": [
- {
- "name": "repository_id",
- "in": "path",
- "required": true,
- "schema": {
- "type": "integer"
- }
- },
- {
- "name": "environment_name",
- "in": "path",
- "required": true,
- "description": "The name of the environment",
- "schema": {
- "type": "string"
- }
- },
- {
- "name": "secret_name",
- "description": "secret_name parameter",
- "in": "path",
- "required": true,
- "schema": {
- "type": "string"
- }
- }
- ],
- "requestBody": {
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "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.",
- "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",
- "description": "ID of the key you used to encrypt the secret."
- }
- }
- },
- "example": {
- "encrypted_value": "c2VjcmV0",
- "key_id": "012345678912345678"
- }
- }
- }
- },
- "responses": {
- "201": {
- "description": "Response when creating a secret"
- },
- "204": {
- "description": "Response when updating a secret"
- }
- },
- "x-github": {
- "githubCloudOnly": false,
- "enabledForGitHubApps": true,
- "previews": [
-
- ],
- "category": "actions",
- "subcategory": "secrets"
- }
- },
- "delete": {
- "summary": "Delete an environment secret",
- "description": "Deletes a secret in an environment using the secret name. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use this endpoint.",
- "tags": [
- "actions"
- ],
- "operationId": "actions/delete-environment-secret",
- "externalDocs": {
- "description": "API method documentation",
- "url": "https://docs.github.com/github-ae@latest/rest/reference/actions#delete-an-environment-secret"
- },
- "parameters": [
- {
- "name": "repository_id",
- "in": "path",
- "required": true,
- "schema": {
- "type": "integer"
- }
- },
- {
- "name": "environment_name",
- "in": "path",
- "required": true,
- "description": "The name of the environment",
- "schema": {
- "type": "string"
- }
- },
- {
- "name": "secret_name",
- "description": "secret_name parameter",
- "in": "path",
- "required": true,
- "schema": {
- "type": "string"
- }
- }
- ],
- "responses": {
- "204": {
- "description": "Default response"
- }
- },
- "x-github": {
- "githubCloudOnly": false,
- "enabledForGitHubApps": true,
- "previews": [
-
- ],
- "category": "actions",
- "subcategory": "secrets"
- }
- }
- },
"/scim/v2/enterprises/{enterprise}/Groups": {
"get": {
"summary": "List provisioned SCIM groups for an enterprise",