diff --git a/assets/images/help/desktop/local-config-email.png b/assets/images/help/desktop/local-config-email.png index b153c3a2bb15..34a2a5fe73c5 100644 Binary files a/assets/images/help/desktop/local-config-email.png and b/assets/images/help/desktop/local-config-email.png differ diff --git a/assets/images/help/desktop/local-config-name.png b/assets/images/help/desktop/local-config-name.png index 10978676b108..2936fae29d99 100644 Binary files a/assets/images/help/desktop/local-config-name.png and b/assets/images/help/desktop/local-config-name.png differ diff --git a/assets/images/help/desktop/mac-email-git-config.png b/assets/images/help/desktop/mac-email-git-config.png index 80c32d996e29..b4122a28b31d 100644 Binary files a/assets/images/help/desktop/mac-email-git-config.png and b/assets/images/help/desktop/mac-email-git-config.png differ diff --git a/assets/images/help/desktop/mac-name-git-config.png b/assets/images/help/desktop/mac-name-git-config.png index d1baf9c7e6fe..6f9a25661f3b 100644 Binary files a/assets/images/help/desktop/mac-name-git-config.png and b/assets/images/help/desktop/mac-name-git-config.png differ diff --git a/assets/images/help/desktop/mac-save-git-config.png b/assets/images/help/desktop/mac-save-git-config.png index 7c97630d7938..9f529e5acbda 100644 Binary files a/assets/images/help/desktop/mac-save-git-config.png and b/assets/images/help/desktop/mac-save-git-config.png differ diff --git a/assets/images/help/desktop/mac-select-default-branch-name.png b/assets/images/help/desktop/mac-select-default-branch-name.png index 51c05532f806..3c78d42d5d75 100644 Binary files a/assets/images/help/desktop/mac-select-default-branch-name.png and b/assets/images/help/desktop/mac-select-default-branch-name.png differ diff --git a/assets/images/help/desktop/repository-settings-git-config-save.png b/assets/images/help/desktop/repository-settings-git-config-save.png index 49c712d3c65c..8f4753c3fcfd 100644 Binary files a/assets/images/help/desktop/repository-settings-git-config-save.png and b/assets/images/help/desktop/repository-settings-git-config-save.png differ diff --git a/assets/images/help/desktop/repository-settings-remote.png b/assets/images/help/desktop/repository-settings-remote.png index 56bc7d89a5ba..feb45b4c3f6d 100644 Binary files a/assets/images/help/desktop/repository-settings-remote.png and b/assets/images/help/desktop/repository-settings-remote.png differ diff --git a/assets/images/help/desktop/repository-settings-save.png b/assets/images/help/desktop/repository-settings-save.png index e0ae08a71d46..393544c76a0e 100644 Binary files a/assets/images/help/desktop/repository-settings-save.png and b/assets/images/help/desktop/repository-settings-save.png differ diff --git a/assets/images/help/desktop/select-git-config.png b/assets/images/help/desktop/select-git-config.png index a31fcd9e769b..fb9e651e319e 100644 Binary files a/assets/images/help/desktop/select-git-config.png and b/assets/images/help/desktop/select-git-config.png differ diff --git a/assets/images/help/desktop/use-local-git-config.png b/assets/images/help/desktop/use-local-git-config.png index ec6b53c6e256..42f94f160243 100644 Binary files a/assets/images/help/desktop/use-local-git-config.png and b/assets/images/help/desktop/use-local-git-config.png differ diff --git a/assets/images/help/desktop/windows-email-git-config.png b/assets/images/help/desktop/windows-email-git-config.png index 5becfbf9baa9..fd4f0a4c627e 100644 Binary files a/assets/images/help/desktop/windows-email-git-config.png and b/assets/images/help/desktop/windows-email-git-config.png differ diff --git a/assets/images/help/desktop/windows-name-git-config.png b/assets/images/help/desktop/windows-name-git-config.png index 808451bf1c56..14050088dcba 100644 Binary files a/assets/images/help/desktop/windows-name-git-config.png and b/assets/images/help/desktop/windows-name-git-config.png differ diff --git a/assets/images/help/desktop/windows-save-git-config.png b/assets/images/help/desktop/windows-save-git-config.png index 44bc4752238a..2b65c68606c0 100644 Binary files a/assets/images/help/desktop/windows-save-git-config.png and b/assets/images/help/desktop/windows-save-git-config.png differ diff --git a/assets/images/help/desktop/windows-select-default-branch-name.png b/assets/images/help/desktop/windows-select-default-branch-name.png index 22ef710a5e9b..7372ee3c0762 100644 Binary files a/assets/images/help/desktop/windows-select-default-branch-name.png and b/assets/images/help/desktop/windows-select-default-branch-name.png differ diff --git a/content/repositories/working-with-files/using-files/viewing-a-file.md b/content/repositories/working-with-files/using-files/viewing-a-file.md index f32c7c5cf141..2999db2fd379 100644 --- a/content/repositories/working-with-files/using-files/viewing-a-file.md +++ b/content/repositories/working-with-files/using-files/viewing-a-file.md @@ -53,11 +53,6 @@ In a file or pull request, you can also use the {% octicon "kebab-horizontal" ar {% if blame-ignore-revs %} ## Ignore commits in the blame view -{% note %} - -**Note:** Ignoring commits in the blame view is currently in public beta and subject to change. - -{% endnote %} All revisions specified in the `.git-blame-ignore-revs` file, which must be in the root directory of your repository, are hidden from the blame view using Git's `git blame --ignore-revs-file` configuration setting. For more information, see [`git blame --ignore-revs-file`](https://git-scm.com/docs/git-blame#Documentation/git-blame.txt---ignore-revs-fileltfilegt) in the Git documentation. diff --git a/lib/hydro.js b/lib/hydro.js index 06cd8067c679..60c43700c678 100644 --- a/lib/hydro.js +++ b/lib/hydro.js @@ -8,6 +8,9 @@ import FailBot from '../lib/failbot.js' const TIME_OUT_TEXT = 'ms has passed since batch creation' +const MOCK_HYDRO_POST = + process.env.NODE_ENV === 'test' || JSON.parse(process.env.MOCK_HYDRO_POST || 'false') + // If the request to Hydro took an age, it could be either our // network or that Hydro is just slow to respond. (Event possibly // too slow to respond with a 422 code) @@ -31,16 +34,28 @@ function getHttpsAgent() { } export default class Hydro { - constructor({ secret, endpoint } = {}) { - this.secret = secret || process.env.HYDRO_SECRET + constructor({ secret, endpoint, forceDisableMock } = {}) { + // When mocking, the secret isn't important because nothing's actually + // password protected in terms of HTTP authorization. But, the + // secret is used for creating an HMAC payload so it has to be + // a string. + this.secret = secret || process.env.HYDRO_SECRET || (MOCK_HYDRO_POST && '') this.endpoint = endpoint || process.env.HYDRO_ENDPOINT + // This class is involved in 2 types of jest tests: + // 1. end-to-end tests where jest talks to localhost:4000 (with NODE_ENV===test) + // 2. literal unit tests that might mock the socket stuff + // Because `MOCK_HYDRO_POST = process.env.NODE_ENV === 'test'` gets set + // for either type of jest tests, this additional setting makes it + // possible to override `process.env.NODE_ENV === 'test'` from + // mocking the HTTP calls. + this.forceDisableMock = forceDisableMock } /** * Can check if it can actually send to Hydro */ maySend() { - return Boolean(this.secret && this.endpoint && process.env.NODE_ENV !== 'test') + return Boolean(this.secret && this.endpoint) || MOCK_HYDRO_POST } /** @@ -71,8 +86,16 @@ export default class Hydro { const agent = getHttpsAgent() - const doPost = () => - got(this.endpoint, { + const doPost = async () => { + // We *could* exit early on this whole `publish()` method if we know + // we're going to "mock" Hydro anyway, but injecting here, before + // the actual network operation, we make most of this method's code + // execute without actually depending on real network. This is + // good for any functional tests that depend on this, e.g. jest tests. + if (MOCK_HYDRO_POST && !this.forceDisableMock) { + return { statusCode: 200 } + } + return got(this.endpoint, { method: 'POST', body, headers: { @@ -90,6 +113,7 @@ export default class Hydro { https: agent, }, }) + } const res = await statsd.asyncTimer(doPost, 'hydro.response_time')() diff --git a/lib/rest/static/decorated/api.github.com.json b/lib/rest/static/decorated/api.github.com.json index 02793dee3c91..aba2a66f09f2 100644 --- a/lib/rest/static/decorated/api.github.com.json +++ b/lib/rest/static/decorated/api.github.com.json @@ -76,19 +76,33 @@ "expired": false, "created_at": "2020-01-10T14:59:22Z", "expires_at": "2020-03-21T14:59:22Z", - "updated_at": "2020-02-21T14:59:22Z" + "updated_at": "2020-02-21T14:59:22Z", + "workflow_run": { + "id": 2332938, + "repository_id": 1296269, + "head_repository_id": 1296269, + "head_branch": "main", + "head_sha": "328faa0536e6fef19753d9d91dc96a9931694ce3" + } }, { "id": 13, "node_id": "MDg6QXJ0aWZhY3QxMw==", - "name": "", + "name": "Test output", "size_in_bytes": 453, "url": "https://api.github.com/repos/octo-org/octo-docs/actions/artifacts/13", "archive_download_url": "https://api.github.com/repos/octo-org/octo-docs/actions/artifacts/13/zip", "expired": false, "created_at": "2020-01-10T14:59:22Z", "expires_at": "2020-03-21T14:59:22Z", - "updated_at": "2020-02-21T14:59:22Z" + "updated_at": "2020-02-21T14:59:22Z", + "workflow_run": { + "id": 2332942, + "repository_id": 1296269, + "head_repository_id": 1296269, + "head_branch": "main", + "head_sha": "178f4f6090b3fccad4a65b3e83d076a622d59652" + } } ] }, @@ -171,6 +185,41 @@ "null" ], "format": "date-time" + }, + "workflow_run": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "examples": [ + 10 + ] + }, + "repository_id": { + "type": "integer", + "examples": [ + 42 + ] + }, + "head_repository_id": { + "type": "integer", + "examples": [ + 42 + ] + }, + "head_branch": { + "type": "string", + "examples": [ + "main" + ] + }, + "head_sha": { + "type": "string", + "examples": [ + "009b8a3a9ccbb128af87f9b1c0f4c62e8a304f6d" + ] + } + } } }, "required": [ @@ -265,7 +314,14 @@ "expired": false, "created_at": "2020-01-10T14:59:22Z", "expires_at": "2020-01-21T14:59:22Z", - "updated_at": "2020-01-21T14:59:22Z" + "updated_at": "2020-01-21T14:59:22Z", + "workflow_run": { + "id": 2332938, + "repository_id": 1296269, + "head_repository_id": 1296269, + "head_branch": "main", + "head_sha": "328faa0536e6fef19753d9d91dc96a9931694ce3" + } }, "schema": { "title": "Artifact", @@ -334,6 +390,41 @@ "null" ], "format": "date-time" + }, + "workflow_run": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "examples": [ + 10 + ] + }, + "repository_id": { + "type": "integer", + "examples": [ + 42 + ] + }, + "head_repository_id": { + "type": "integer", + "examples": [ + 42 + ] + }, + "head_branch": { + "type": "string", + "examples": [ + "main" + ] + }, + "head_sha": { + "type": "string", + "examples": [ + "009b8a3a9ccbb128af87f9b1c0f4c62e8a304f6d" + ] + } + } } }, "required": [ @@ -586,19 +677,33 @@ "expired": false, "created_at": "2020-01-10T14:59:22Z", "expires_at": "2020-03-21T14:59:22Z", - "updated_at": "2020-02-21T14:59:22Z" + "updated_at": "2020-02-21T14:59:22Z", + "workflow_run": { + "id": 2332938, + "repository_id": 1296269, + "head_repository_id": 1296269, + "head_branch": "main", + "head_sha": "328faa0536e6fef19753d9d91dc96a9931694ce3" + } }, { "id": 13, "node_id": "MDg6QXJ0aWZhY3QxMw==", - "name": "", + "name": "Test output", "size_in_bytes": 453, "url": "https://api.github.com/repos/octo-org/octo-docs/actions/artifacts/13", "archive_download_url": "https://api.github.com/repos/octo-org/octo-docs/actions/artifacts/13/zip", "expired": false, "created_at": "2020-01-10T14:59:22Z", "expires_at": "2020-03-21T14:59:22Z", - "updated_at": "2020-02-21T14:59:22Z" + "updated_at": "2020-02-21T14:59:22Z", + "workflow_run": { + "id": 2332942, + "repository_id": 1296269, + "head_repository_id": 1296269, + "head_branch": "main", + "head_sha": "178f4f6090b3fccad4a65b3e83d076a622d59652" + } } ] }, @@ -681,6 +786,41 @@ "null" ], "format": "date-time" + }, + "workflow_run": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "examples": [ + 10 + ] + }, + "repository_id": { + "type": "integer", + "examples": [ + 42 + ] + }, + "head_repository_id": { + "type": "integer", + "examples": [ + 42 + ] + }, + "head_branch": { + "type": "string", + "examples": [ + "main" + ] + }, + "head_sha": { + "type": "string", + "examples": [ + "009b8a3a9ccbb128af87f9b1c0f4c62e8a304f6d" + ] + } + } } }, "required": [ @@ -186902,28 +187042,19 @@ "rawDescription": "The permission to grant the collaborator. **Only valid on organization-owned repositories.** In addition to the enumerated values, you can also specify a custom repository role name, if the owning organization has defined any.", "isRequired": false, "childParamsGroups": [] - }, - { - "type": "string", - "examples": [ - "\"push\"" - ], - "name": "permissions", - "in": "body", - "rawType": "string", - "description": "", - "isRequired": false, - "childParamsGroups": [] } ], "enabledForGitHubApps": true, "codeExamples": [ { - "key": "response-when-a-new-invitation-is-created", + "key": "new-invitation-is-created", "request": { "contentType": "application/json", - "description": "Example", + "description": "Add a collaborator with triage permissions", "acceptHeader": "application/vnd.github.v3+json", + "bodyParameters": { + "permission": "triage" + }, "parameters": { "owner": "OWNER", "repo": "REPO", @@ -218639,14 +218770,14 @@ }, { "type": "array of strings", - "description": "
The status contexts to verify against commit status checks. If you omit this parameter, GitHub verifies all unique contexts before creating a deployment. To bypass checking entirely, pass an empty array. Defaults to all unique contexts.
", + "description": "The status contexts to verify against commit status checks. If you omit this parameter, GitHub verifies all unique contexts before creating a deployment. To bypass checking entirely, pass an empty array. Defaults to all unique contexts.
", "items": { "type": "string" }, "name": "required_contexts", "in": "body", "rawType": "array", - "rawDescription": "The [status](https://docs.github.com/rest/reference/commits#commit-statuses) contexts to verify against commit status checks. If you omit this parameter, GitHub verifies all unique contexts before creating a deployment. To bypass checking entirely, pass an empty array. Defaults to all unique contexts.", + "rawDescription": "The [status](https://docs.github.com/rest/commits/statuses) contexts to verify against commit status checks. If you omit this parameter, GitHub verifies all unique contexts before creating a deployment. To bypass checking entirely, pass an empty array. Defaults to all unique contexts.", "isRequired": false, "childParamsGroups": [] }, @@ -219418,7 +219549,7 @@ } ], "previews": [], - "descriptionHTML": "Deployments offer a few configurable parameters with certain defaults.
\nThe ref parameter can be any named branch, tag, or SHA. At GitHub we often deploy branches and verify them\nbefore we merge a pull request.
The environment parameter allows deployments to be issued to different runtime environments. Teams often have\nmultiple environments for verifying their applications, such as production, staging, and qa. This parameter\nmakes it easier to track which environments have requested deployments. The default environment is production.
The auto_merge parameter is used to ensure that the requested ref is not behind the repository's default branch. If\nthe ref is behind the default branch for the repository, we will attempt to merge it for you. If the merge succeeds,\nthe API will return a successful merge commit. If merge conflicts prevent the merge from succeeding, the API will\nreturn a failure response.
By default, commit statuses for every submitted context must be in a success\nstate. The required_contexts parameter allows you to specify a subset of contexts that must be success, or to\nspecify contexts that have not yet been submitted. You are not required to use commit statuses to deploy. If you do\nnot require any contexts or create any commit statuses, the deployment will always succeed.
The payload parameter is available for any extra information that a deployment system might need. It is a JSON text\nfield that will be passed on when a deployment event is dispatched.
The task parameter is used by the deployment system to allow different execution paths. In the web world this might\nbe deploy:migrations to run schema changes on the system. In the compiled world this could be a flag to compile an\napplication with debugging enabled.
Users with repo or repo_deployment scopes can create a deployment for a given ref.
You will see this response when GitHub automatically merges the base branch into the topic branch instead of creating\na deployment. This auto-merge happens when:
\nmaster in the response exampleIf there are no new commits in the base branch, a new request to create a deployment should give a successful\nresponse.
\nThis error happens when the auto_merge option is enabled and when the default branch (in this case master), can't\nbe merged into the branch that's being deployed (in this case topic-branch), due to merge conflicts.
This error happens when the required_contexts parameter indicates that one or more contexts need to have a success\nstatus for the commit to be deployed, but one or more of the required contexts do not have a state of success.
Deployments offer a few configurable parameters with certain defaults.
\nThe ref parameter can be any named branch, tag, or SHA. At GitHub we often deploy branches and verify them\nbefore we merge a pull request.
The environment parameter allows deployments to be issued to different runtime environments. Teams often have\nmultiple environments for verifying their applications, such as production, staging, and qa. This parameter\nmakes it easier to track which environments have requested deployments. The default environment is production.
The auto_merge parameter is used to ensure that the requested ref is not behind the repository's default branch. If\nthe ref is behind the default branch for the repository, we will attempt to merge it for you. If the merge succeeds,\nthe API will return a successful merge commit. If merge conflicts prevent the merge from succeeding, the API will\nreturn a failure response.
By default, commit statuses for every submitted context must be in a success\nstate. The required_contexts parameter allows you to specify a subset of contexts that must be success, or to\nspecify contexts that have not yet been submitted. You are not required to use commit statuses to deploy. If you do\nnot require any contexts or create any commit statuses, the deployment will always succeed.
The payload parameter is available for any extra information that a deployment system might need. It is a JSON text\nfield that will be passed on when a deployment event is dispatched.
The task parameter is used by the deployment system to allow different execution paths. In the web world this might\nbe deploy:migrations to run schema changes on the system. In the compiled world this could be a flag to compile an\napplication with debugging enabled.
Users with repo or repo_deployment scopes can create a deployment for a given ref.
You will see this response when GitHub automatically merges the base branch into the topic branch instead of creating\na deployment. This auto-merge happens when:
\nmaster in the response exampleIf there are no new commits in the base branch, a new request to create a deployment should give a successful\nresponse.
\nThis error happens when the auto_merge option is enabled and when the default branch (in this case master), can't\nbe merged into the branch that's being deployed (in this case topic-branch), due to merge conflicts.
This error happens when the required_contexts parameter indicates that one or more contexts need to have a success\nstatus for the commit to be deployed, but one or more of the required contexts do not have a state of success.
Response
" + "contentType": "application/json", + "description": "Response
", + "example": null, + "schema": { + "type": "object", + "properties": {}, + "additionalProperties": false + } } } ], @@ -384129,8 +384280,11 @@ "key": "default", "request": { "contentType": "application/json", - "description": "Example", + "description": "Create a new card", "acceptHeader": "application/vnd.github.v3+json", + "bodyParameters": { + "note": "Add payload for delete Project column" + }, "parameters": { "column_id": "COLUMN_ID" } @@ -385393,8 +385547,11 @@ "key": "default", "request": { "contentType": "application/json", - "description": "Example", + "description": "Rename the project column", "acceptHeader": "application/vnd.github.v3+json", + "bodyParameters": { + "name": "To Do" + }, "parameters": { "column_id": "COLUMN_ID" } @@ -385603,18 +385760,28 @@ "enabledForGitHubApps": true, "codeExamples": [ { - "key": "201", + "key": "default", "request": { "contentType": "application/json", - "description": "Example", + "description": "Move the column to the end of the board", "acceptHeader": "application/vnd.github.v3+json", + "bodyParameters": { + "position": "last" + }, "parameters": { "column_id": "COLUMN_ID" } }, "response": { "statusCode": "201", - "description": "Response
" + "contentType": "application/json", + "description": "Response
", + "example": null, + "schema": { + "type": "object", + "properties": {}, + "additionalProperties": false + } } } ], diff --git a/lib/rest/static/decorated/ghes-3.1.json b/lib/rest/static/decorated/ghes-3.1.json index 7debdce3deb1..b7151b763917 100644 --- a/lib/rest/static/decorated/ghes-3.1.json +++ b/lib/rest/static/decorated/ghes-3.1.json @@ -81,7 +81,7 @@ { "id": 13, "node_id": "MDg6QXJ0aWZhY3QxMw==", - "name": "", + "name": "Test output", "size_in_bytes": 453, "url": "https://api.github.com/repos/octo-org/octo-docs/actions/artifacts/13", "archive_download_url": "https://api.github.com/repos/octo-org/octo-docs/actions/artifacts/13/zip", @@ -171,6 +171,41 @@ "null" ], "format": "date-time" + }, + "workflow_run": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "examples": [ + 10 + ] + }, + "repository_id": { + "type": "integer", + "examples": [ + 42 + ] + }, + "head_repository_id": { + "type": "integer", + "examples": [ + 42 + ] + }, + "head_branch": { + "type": "string", + "examples": [ + "main" + ] + }, + "head_sha": { + "type": "string", + "examples": [ + "009b8a3a9ccbb128af87f9b1c0f4c62e8a304f6d" + ] + } + } } }, "required": [ @@ -334,6 +369,41 @@ "null" ], "format": "date-time" + }, + "workflow_run": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "examples": [ + 10 + ] + }, + "repository_id": { + "type": "integer", + "examples": [ + 42 + ] + }, + "head_repository_id": { + "type": "integer", + "examples": [ + 42 + ] + }, + "head_branch": { + "type": "string", + "examples": [ + "main" + ] + }, + "head_sha": { + "type": "string", + "examples": [ + "009b8a3a9ccbb128af87f9b1c0f4c62e8a304f6d" + ] + } + } } }, "required": [ @@ -591,7 +661,7 @@ { "id": 13, "node_id": "MDg6QXJ0aWZhY3QxMw==", - "name": "", + "name": "Test output", "size_in_bytes": 453, "url": "https://api.github.com/repos/octo-org/octo-docs/actions/artifacts/13", "archive_download_url": "https://api.github.com/repos/octo-org/octo-docs/actions/artifacts/13/zip", @@ -681,6 +751,41 @@ "null" ], "format": "date-time" + }, + "workflow_run": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "examples": [ + 10 + ] + }, + "repository_id": { + "type": "integer", + "examples": [ + 42 + ] + }, + "head_repository_id": { + "type": "integer", + "examples": [ + 42 + ] + }, + "head_branch": { + "type": "string", + "examples": [ + "main" + ] + }, + "head_sha": { + "type": "string", + "examples": [ + "009b8a3a9ccbb128af87f9b1c0f4c62e8a304f6d" + ] + } + } } }, "required": [ @@ -122102,28 +122207,19 @@ "rawDescription": "The permission to grant the collaborator. **Only valid on organization-owned repositories.**", "isRequired": false, "childParamsGroups": [] - }, - { - "type": "string", - "examples": [ - "\"push\"" - ], - "name": "permissions", - "in": "body", - "rawType": "string", - "description": "", - "isRequired": false, - "childParamsGroups": [] } ], "enabledForGitHubApps": true, "codeExamples": [ { - "key": "response-when-a-new-invitation-is-created", + "key": "new-invitation-is-created", "request": { "contentType": "application/json", - "description": "Example", + "description": "Add a collaborator with triage permissions", "acceptHeader": "application/vnd.github.v3+json", + "bodyParameters": { + "permission": "triage" + }, "parameters": { "owner": "OWNER", "repo": "REPO", @@ -149951,14 +150047,14 @@ }, { "type": "array of strings", - "description": "The status contexts to verify against commit status checks. If you omit this parameter, GitHub verifies all unique contexts before creating a deployment. To bypass checking entirely, pass an empty array. Defaults to all unique contexts.
", + "description": "The status contexts to verify against commit status checks. If you omit this parameter, GitHub verifies all unique contexts before creating a deployment. To bypass checking entirely, pass an empty array. Defaults to all unique contexts.
", "items": { "type": "string" }, "name": "required_contexts", "in": "body", "rawType": "array", - "rawDescription": "The [status](https://docs.github.com/enterprise-server@3.1/rest/reference/commits#commit-statuses) contexts to verify against commit status checks. If you omit this parameter, GitHub verifies all unique contexts before creating a deployment. To bypass checking entirely, pass an empty array. Defaults to all unique contexts.", + "rawDescription": "The [status](https://docs.github.com/enterprise-server@3.1/rest/commits/statuses) contexts to verify against commit status checks. If you omit this parameter, GitHub verifies all unique contexts before creating a deployment. To bypass checking entirely, pass an empty array. Defaults to all unique contexts.", "isRequired": false, "childParamsGroups": [] }, @@ -150729,7 +150825,7 @@ } } ], - "descriptionHTML": "Deployments offer a few configurable parameters with certain defaults.
\nThe ref parameter can be any named branch, tag, or SHA. At GitHub Enterprise Server we often deploy branches and verify them\nbefore we merge a pull request.
The environment parameter allows deployments to be issued to different runtime environments. Teams often have\nmultiple environments for verifying their applications, such as production, staging, and qa. This parameter\nmakes it easier to track which environments have requested deployments. The default environment is production.
The auto_merge parameter is used to ensure that the requested ref is not behind the repository's default branch. If\nthe ref is behind the default branch for the repository, we will attempt to merge it for you. If the merge succeeds,\nthe API will return a successful merge commit. If merge conflicts prevent the merge from succeeding, the API will\nreturn a failure response.
By default, commit statuses for every submitted context must be in a success\nstate. The required_contexts parameter allows you to specify a subset of contexts that must be success, or to\nspecify contexts that have not yet been submitted. You are not required to use commit statuses to deploy. If you do\nnot require any contexts or create any commit statuses, the deployment will always succeed.
The payload parameter is available for any extra information that a deployment system might need. It is a JSON text\nfield that will be passed on when a deployment event is dispatched.
The task parameter is used by the deployment system to allow different execution paths. In the web world this might\nbe deploy:migrations to run schema changes on the system. In the compiled world this could be a flag to compile an\napplication with debugging enabled.
Users with repo or repo_deployment scopes can create a deployment for a given ref.
You will see this response when GitHub automatically merges the base branch into the topic branch instead of creating\na deployment. This auto-merge happens when:
\nmaster in the response exampleIf there are no new commits in the base branch, a new request to create a deployment should give a successful\nresponse.
\nThis error happens when the auto_merge option is enabled and when the default branch (in this case master), can't\nbe merged into the branch that's being deployed (in this case topic-branch), due to merge conflicts.
This error happens when the required_contexts parameter indicates that one or more contexts need to have a success\nstatus for the commit to be deployed, but one or more of the required contexts do not have a state of success.
Deployments offer a few configurable parameters with certain defaults.
\nThe ref parameter can be any named branch, tag, or SHA. At GitHub Enterprise Server we often deploy branches and verify them\nbefore we merge a pull request.
The environment parameter allows deployments to be issued to different runtime environments. Teams often have\nmultiple environments for verifying their applications, such as production, staging, and qa. This parameter\nmakes it easier to track which environments have requested deployments. The default environment is production.
The auto_merge parameter is used to ensure that the requested ref is not behind the repository's default branch. If\nthe ref is behind the default branch for the repository, we will attempt to merge it for you. If the merge succeeds,\nthe API will return a successful merge commit. If merge conflicts prevent the merge from succeeding, the API will\nreturn a failure response.
By default, commit statuses for every submitted context must be in a success\nstate. The required_contexts parameter allows you to specify a subset of contexts that must be success, or to\nspecify contexts that have not yet been submitted. You are not required to use commit statuses to deploy. If you do\nnot require any contexts or create any commit statuses, the deployment will always succeed.
The payload parameter is available for any extra information that a deployment system might need. It is a JSON text\nfield that will be passed on when a deployment event is dispatched.
The task parameter is used by the deployment system to allow different execution paths. In the web world this might\nbe deploy:migrations to run schema changes on the system. In the compiled world this could be a flag to compile an\napplication with debugging enabled.
Users with repo or repo_deployment scopes can create a deployment for a given ref.
You will see this response when GitHub automatically merges the base branch into the topic branch instead of creating\na deployment. This auto-merge happens when:
\nmaster in the response exampleIf there are no new commits in the base branch, a new request to create a deployment should give a successful\nresponse.
\nThis error happens when the auto_merge option is enabled and when the default branch (in this case master), can't\nbe merged into the branch that's being deployed (in this case topic-branch), due to merge conflicts.
This error happens when the required_contexts parameter indicates that one or more contexts need to have a success\nstatus for the commit to be deployed, but one or more of the required contexts do not have a state of success.
Response
" + "contentType": "application/json", + "description": "Response
", + "example": null, + "schema": { + "type": "object", + "properties": {}, + "additionalProperties": false + } } } ], @@ -277723,8 +277839,11 @@ "key": "default", "request": { "contentType": "application/json", - "description": "Example", + "description": "Create a new card", "acceptHeader": "application/vnd.github.v3+json", + "bodyParameters": { + "note": "Add payload for delete Project column" + }, "parameters": { "column_id": "COLUMN_ID" } @@ -278999,8 +279118,11 @@ "key": "default", "request": { "contentType": "application/json", - "description": "Example", + "description": "Rename the project column", "acceptHeader": "application/vnd.github.v3+json", + "bodyParameters": { + "name": "To Do" + }, "parameters": { "column_id": "COLUMN_ID" } @@ -279213,18 +279335,28 @@ "enabledForGitHubApps": true, "codeExamples": [ { - "key": "201", + "key": "default", "request": { "contentType": "application/json", - "description": "Example", + "description": "Move the column to the end of the board", "acceptHeader": "application/vnd.github.v3+json", + "bodyParameters": { + "position": "last" + }, "parameters": { "column_id": "COLUMN_ID" } }, "response": { "statusCode": "201", - "description": "Response
" + "contentType": "application/json", + "description": "Response
", + "example": null, + "schema": { + "type": "object", + "properties": {}, + "additionalProperties": false + } } } ], diff --git a/lib/rest/static/decorated/ghes-3.2.json b/lib/rest/static/decorated/ghes-3.2.json index 551829f2c20b..6c4714b585b9 100644 --- a/lib/rest/static/decorated/ghes-3.2.json +++ b/lib/rest/static/decorated/ghes-3.2.json @@ -81,7 +81,7 @@ { "id": 13, "node_id": "MDg6QXJ0aWZhY3QxMw==", - "name": "", + "name": "Test output", "size_in_bytes": 453, "url": "https://api.github.com/repos/octo-org/octo-docs/actions/artifacts/13", "archive_download_url": "https://api.github.com/repos/octo-org/octo-docs/actions/artifacts/13/zip", @@ -171,6 +171,41 @@ "null" ], "format": "date-time" + }, + "workflow_run": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "examples": [ + 10 + ] + }, + "repository_id": { + "type": "integer", + "examples": [ + 42 + ] + }, + "head_repository_id": { + "type": "integer", + "examples": [ + 42 + ] + }, + "head_branch": { + "type": "string", + "examples": [ + "main" + ] + }, + "head_sha": { + "type": "string", + "examples": [ + "009b8a3a9ccbb128af87f9b1c0f4c62e8a304f6d" + ] + } + } } }, "required": [ @@ -334,6 +369,41 @@ "null" ], "format": "date-time" + }, + "workflow_run": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "examples": [ + 10 + ] + }, + "repository_id": { + "type": "integer", + "examples": [ + 42 + ] + }, + "head_repository_id": { + "type": "integer", + "examples": [ + 42 + ] + }, + "head_branch": { + "type": "string", + "examples": [ + "main" + ] + }, + "head_sha": { + "type": "string", + "examples": [ + "009b8a3a9ccbb128af87f9b1c0f4c62e8a304f6d" + ] + } + } } }, "required": [ @@ -591,7 +661,7 @@ { "id": 13, "node_id": "MDg6QXJ0aWZhY3QxMw==", - "name": "", + "name": "Test output", "size_in_bytes": 453, "url": "https://api.github.com/repos/octo-org/octo-docs/actions/artifacts/13", "archive_download_url": "https://api.github.com/repos/octo-org/octo-docs/actions/artifacts/13/zip", @@ -681,6 +751,41 @@ "null" ], "format": "date-time" + }, + "workflow_run": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "examples": [ + 10 + ] + }, + "repository_id": { + "type": "integer", + "examples": [ + 42 + ] + }, + "head_repository_id": { + "type": "integer", + "examples": [ + 42 + ] + }, + "head_branch": { + "type": "string", + "examples": [ + "main" + ] + }, + "head_sha": { + "type": "string", + "examples": [ + "009b8a3a9ccbb128af87f9b1c0f4c62e8a304f6d" + ] + } + } } }, "required": [ @@ -125341,28 +125446,19 @@ "rawDescription": "The permission to grant the collaborator. **Only valid on organization-owned repositories.**", "isRequired": false, "childParamsGroups": [] - }, - { - "type": "string", - "examples": [ - "\"push\"" - ], - "name": "permissions", - "in": "body", - "rawType": "string", - "description": "", - "isRequired": false, - "childParamsGroups": [] } ], "enabledForGitHubApps": true, "codeExamples": [ { - "key": "response-when-a-new-invitation-is-created", + "key": "new-invitation-is-created", "request": { "contentType": "application/json", - "description": "Example", + "description": "Add a collaborator with triage permissions", "acceptHeader": "application/vnd.github.v3+json", + "bodyParameters": { + "permission": "triage" + }, "parameters": { "owner": "OWNER", "repo": "REPO", @@ -153287,14 +153383,14 @@ }, { "type": "array of strings", - "description": "The status contexts to verify against commit status checks. If you omit this parameter, GitHub verifies all unique contexts before creating a deployment. To bypass checking entirely, pass an empty array. Defaults to all unique contexts.
", + "description": "The status contexts to verify against commit status checks. If you omit this parameter, GitHub verifies all unique contexts before creating a deployment. To bypass checking entirely, pass an empty array. Defaults to all unique contexts.
", "items": { "type": "string" }, "name": "required_contexts", "in": "body", "rawType": "array", - "rawDescription": "The [status](https://docs.github.com/enterprise-server@3.2/rest/reference/commits#commit-statuses) contexts to verify against commit status checks. If you omit this parameter, GitHub verifies all unique contexts before creating a deployment. To bypass checking entirely, pass an empty array. Defaults to all unique contexts.", + "rawDescription": "The [status](https://docs.github.com/enterprise-server@3.2/rest/commits/statuses) contexts to verify against commit status checks. If you omit this parameter, GitHub verifies all unique contexts before creating a deployment. To bypass checking entirely, pass an empty array. Defaults to all unique contexts.", "isRequired": false, "childParamsGroups": [] }, @@ -154065,7 +154161,7 @@ } } ], - "descriptionHTML": "Deployments offer a few configurable parameters with certain defaults.
\nThe ref parameter can be any named branch, tag, or SHA. At GitHub Enterprise Server we often deploy branches and verify them\nbefore we merge a pull request.
The environment parameter allows deployments to be issued to different runtime environments. Teams often have\nmultiple environments for verifying their applications, such as production, staging, and qa. This parameter\nmakes it easier to track which environments have requested deployments. The default environment is production.
The auto_merge parameter is used to ensure that the requested ref is not behind the repository's default branch. If\nthe ref is behind the default branch for the repository, we will attempt to merge it for you. If the merge succeeds,\nthe API will return a successful merge commit. If merge conflicts prevent the merge from succeeding, the API will\nreturn a failure response.
By default, commit statuses for every submitted context must be in a success\nstate. The required_contexts parameter allows you to specify a subset of contexts that must be success, or to\nspecify contexts that have not yet been submitted. You are not required to use commit statuses to deploy. If you do\nnot require any contexts or create any commit statuses, the deployment will always succeed.
The payload parameter is available for any extra information that a deployment system might need. It is a JSON text\nfield that will be passed on when a deployment event is dispatched.
The task parameter is used by the deployment system to allow different execution paths. In the web world this might\nbe deploy:migrations to run schema changes on the system. In the compiled world this could be a flag to compile an\napplication with debugging enabled.
Users with repo or repo_deployment scopes can create a deployment for a given ref.
You will see this response when GitHub automatically merges the base branch into the topic branch instead of creating\na deployment. This auto-merge happens when:
\nmaster in the response exampleIf there are no new commits in the base branch, a new request to create a deployment should give a successful\nresponse.
\nThis error happens when the auto_merge option is enabled and when the default branch (in this case master), can't\nbe merged into the branch that's being deployed (in this case topic-branch), due to merge conflicts.
This error happens when the required_contexts parameter indicates that one or more contexts need to have a success\nstatus for the commit to be deployed, but one or more of the required contexts do not have a state of success.
Deployments offer a few configurable parameters with certain defaults.
\nThe ref parameter can be any named branch, tag, or SHA. At GitHub Enterprise Server we often deploy branches and verify them\nbefore we merge a pull request.
The environment parameter allows deployments to be issued to different runtime environments. Teams often have\nmultiple environments for verifying their applications, such as production, staging, and qa. This parameter\nmakes it easier to track which environments have requested deployments. The default environment is production.
The auto_merge parameter is used to ensure that the requested ref is not behind the repository's default branch. If\nthe ref is behind the default branch for the repository, we will attempt to merge it for you. If the merge succeeds,\nthe API will return a successful merge commit. If merge conflicts prevent the merge from succeeding, the API will\nreturn a failure response.
By default, commit statuses for every submitted context must be in a success\nstate. The required_contexts parameter allows you to specify a subset of contexts that must be success, or to\nspecify contexts that have not yet been submitted. You are not required to use commit statuses to deploy. If you do\nnot require any contexts or create any commit statuses, the deployment will always succeed.
The payload parameter is available for any extra information that a deployment system might need. It is a JSON text\nfield that will be passed on when a deployment event is dispatched.
The task parameter is used by the deployment system to allow different execution paths. In the web world this might\nbe deploy:migrations to run schema changes on the system. In the compiled world this could be a flag to compile an\napplication with debugging enabled.
Users with repo or repo_deployment scopes can create a deployment for a given ref.
You will see this response when GitHub automatically merges the base branch into the topic branch instead of creating\na deployment. This auto-merge happens when:
\nmaster in the response exampleIf there are no new commits in the base branch, a new request to create a deployment should give a successful\nresponse.
\nThis error happens when the auto_merge option is enabled and when the default branch (in this case master), can't\nbe merged into the branch that's being deployed (in this case topic-branch), due to merge conflicts.
This error happens when the required_contexts parameter indicates that one or more contexts need to have a success\nstatus for the commit to be deployed, but one or more of the required contexts do not have a state of success.
Response
" + "contentType": "application/json", + "description": "Response
", + "example": null, + "schema": { + "type": "object", + "properties": {}, + "additionalProperties": false + } } } ], @@ -284272,8 +284388,11 @@ "key": "default", "request": { "contentType": "application/json", - "description": "Example", + "description": "Create a new card", "acceptHeader": "application/vnd.github.v3+json", + "bodyParameters": { + "note": "Add payload for delete Project column" + }, "parameters": { "column_id": "COLUMN_ID" } @@ -285548,8 +285667,11 @@ "key": "default", "request": { "contentType": "application/json", - "description": "Example", + "description": "Rename the project column", "acceptHeader": "application/vnd.github.v3+json", + "bodyParameters": { + "name": "To Do" + }, "parameters": { "column_id": "COLUMN_ID" } @@ -285762,18 +285884,28 @@ "enabledForGitHubApps": true, "codeExamples": [ { - "key": "201", + "key": "default", "request": { "contentType": "application/json", - "description": "Example", + "description": "Move the column to the end of the board", "acceptHeader": "application/vnd.github.v3+json", + "bodyParameters": { + "position": "last" + }, "parameters": { "column_id": "COLUMN_ID" } }, "response": { "statusCode": "201", - "description": "Response
" + "contentType": "application/json", + "description": "Response
", + "example": null, + "schema": { + "type": "object", + "properties": {}, + "additionalProperties": false + } } } ], diff --git a/lib/rest/static/decorated/ghes-3.3.json b/lib/rest/static/decorated/ghes-3.3.json index 4af0c90ef263..8ddb53c9f63e 100644 --- a/lib/rest/static/decorated/ghes-3.3.json +++ b/lib/rest/static/decorated/ghes-3.3.json @@ -81,7 +81,7 @@ { "id": 13, "node_id": "MDg6QXJ0aWZhY3QxMw==", - "name": "", + "name": "Test output", "size_in_bytes": 453, "url": "https://api.github.com/repos/octo-org/octo-docs/actions/artifacts/13", "archive_download_url": "https://api.github.com/repos/octo-org/octo-docs/actions/artifacts/13/zip", @@ -171,6 +171,41 @@ "null" ], "format": "date-time" + }, + "workflow_run": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "examples": [ + 10 + ] + }, + "repository_id": { + "type": "integer", + "examples": [ + 42 + ] + }, + "head_repository_id": { + "type": "integer", + "examples": [ + 42 + ] + }, + "head_branch": { + "type": "string", + "examples": [ + "main" + ] + }, + "head_sha": { + "type": "string", + "examples": [ + "009b8a3a9ccbb128af87f9b1c0f4c62e8a304f6d" + ] + } + } } }, "required": [ @@ -334,6 +369,41 @@ "null" ], "format": "date-time" + }, + "workflow_run": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "examples": [ + 10 + ] + }, + "repository_id": { + "type": "integer", + "examples": [ + 42 + ] + }, + "head_repository_id": { + "type": "integer", + "examples": [ + 42 + ] + }, + "head_branch": { + "type": "string", + "examples": [ + "main" + ] + }, + "head_sha": { + "type": "string", + "examples": [ + "009b8a3a9ccbb128af87f9b1c0f4c62e8a304f6d" + ] + } + } } }, "required": [ @@ -591,7 +661,7 @@ { "id": 13, "node_id": "MDg6QXJ0aWZhY3QxMw==", - "name": "", + "name": "Test output", "size_in_bytes": 453, "url": "https://api.github.com/repos/octo-org/octo-docs/actions/artifacts/13", "archive_download_url": "https://api.github.com/repos/octo-org/octo-docs/actions/artifacts/13/zip", @@ -681,6 +751,41 @@ "null" ], "format": "date-time" + }, + "workflow_run": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "examples": [ + 10 + ] + }, + "repository_id": { + "type": "integer", + "examples": [ + 42 + ] + }, + "head_repository_id": { + "type": "integer", + "examples": [ + 42 + ] + }, + "head_branch": { + "type": "string", + "examples": [ + "main" + ] + }, + "head_sha": { + "type": "string", + "examples": [ + "009b8a3a9ccbb128af87f9b1c0f4c62e8a304f6d" + ] + } + } } }, "required": [ @@ -125634,28 +125739,19 @@ "rawDescription": "The permission to grant the collaborator. **Only valid on organization-owned repositories.**", "isRequired": false, "childParamsGroups": [] - }, - { - "type": "string", - "examples": [ - "\"push\"" - ], - "name": "permissions", - "in": "body", - "rawType": "string", - "description": "", - "isRequired": false, - "childParamsGroups": [] } ], "enabledForGitHubApps": true, "codeExamples": [ { - "key": "response-when-a-new-invitation-is-created", + "key": "new-invitation-is-created", "request": { "contentType": "application/json", - "description": "Example", + "description": "Add a collaborator with triage permissions", "acceptHeader": "application/vnd.github.v3+json", + "bodyParameters": { + "permission": "triage" + }, "parameters": { "owner": "OWNER", "repo": "REPO", @@ -153568,14 +153664,14 @@ }, { "type": "array of strings", - "description": "The status contexts to verify against commit status checks. If you omit this parameter, GitHub verifies all unique contexts before creating a deployment. To bypass checking entirely, pass an empty array. Defaults to all unique contexts.
", + "description": "The status contexts to verify against commit status checks. If you omit this parameter, GitHub verifies all unique contexts before creating a deployment. To bypass checking entirely, pass an empty array. Defaults to all unique contexts.
", "items": { "type": "string" }, "name": "required_contexts", "in": "body", "rawType": "array", - "rawDescription": "The [status](https://docs.github.com/enterprise-server@3.3/rest/reference/commits#commit-statuses) contexts to verify against commit status checks. If you omit this parameter, GitHub verifies all unique contexts before creating a deployment. To bypass checking entirely, pass an empty array. Defaults to all unique contexts.", + "rawDescription": "The [status](https://docs.github.com/enterprise-server@3.3/rest/commits/statuses) contexts to verify against commit status checks. If you omit this parameter, GitHub verifies all unique contexts before creating a deployment. To bypass checking entirely, pass an empty array. Defaults to all unique contexts.", "isRequired": false, "childParamsGroups": [] }, @@ -154347,7 +154443,7 @@ } ], "previews": [], - "descriptionHTML": "Deployments offer a few configurable parameters with certain defaults.
\nThe ref parameter can be any named branch, tag, or SHA. At GitHub Enterprise Server we often deploy branches and verify them\nbefore we merge a pull request.
The environment parameter allows deployments to be issued to different runtime environments. Teams often have\nmultiple environments for verifying their applications, such as production, staging, and qa. This parameter\nmakes it easier to track which environments have requested deployments. The default environment is production.
The auto_merge parameter is used to ensure that the requested ref is not behind the repository's default branch. If\nthe ref is behind the default branch for the repository, we will attempt to merge it for you. If the merge succeeds,\nthe API will return a successful merge commit. If merge conflicts prevent the merge from succeeding, the API will\nreturn a failure response.
By default, commit statuses for every submitted context must be in a success\nstate. The required_contexts parameter allows you to specify a subset of contexts that must be success, or to\nspecify contexts that have not yet been submitted. You are not required to use commit statuses to deploy. If you do\nnot require any contexts or create any commit statuses, the deployment will always succeed.
The payload parameter is available for any extra information that a deployment system might need. It is a JSON text\nfield that will be passed on when a deployment event is dispatched.
The task parameter is used by the deployment system to allow different execution paths. In the web world this might\nbe deploy:migrations to run schema changes on the system. In the compiled world this could be a flag to compile an\napplication with debugging enabled.
Users with repo or repo_deployment scopes can create a deployment for a given ref.
You will see this response when GitHub automatically merges the base branch into the topic branch instead of creating\na deployment. This auto-merge happens when:
\nmaster in the response exampleIf there are no new commits in the base branch, a new request to create a deployment should give a successful\nresponse.
\nThis error happens when the auto_merge option is enabled and when the default branch (in this case master), can't\nbe merged into the branch that's being deployed (in this case topic-branch), due to merge conflicts.
This error happens when the required_contexts parameter indicates that one or more contexts need to have a success\nstatus for the commit to be deployed, but one or more of the required contexts do not have a state of success.
Deployments offer a few configurable parameters with certain defaults.
\nThe ref parameter can be any named branch, tag, or SHA. At GitHub Enterprise Server we often deploy branches and verify them\nbefore we merge a pull request.
The environment parameter allows deployments to be issued to different runtime environments. Teams often have\nmultiple environments for verifying their applications, such as production, staging, and qa. This parameter\nmakes it easier to track which environments have requested deployments. The default environment is production.
The auto_merge parameter is used to ensure that the requested ref is not behind the repository's default branch. If\nthe ref is behind the default branch for the repository, we will attempt to merge it for you. If the merge succeeds,\nthe API will return a successful merge commit. If merge conflicts prevent the merge from succeeding, the API will\nreturn a failure response.
By default, commit statuses for every submitted context must be in a success\nstate. The required_contexts parameter allows you to specify a subset of contexts that must be success, or to\nspecify contexts that have not yet been submitted. You are not required to use commit statuses to deploy. If you do\nnot require any contexts or create any commit statuses, the deployment will always succeed.
The payload parameter is available for any extra information that a deployment system might need. It is a JSON text\nfield that will be passed on when a deployment event is dispatched.
The task parameter is used by the deployment system to allow different execution paths. In the web world this might\nbe deploy:migrations to run schema changes on the system. In the compiled world this could be a flag to compile an\napplication with debugging enabled.
Users with repo or repo_deployment scopes can create a deployment for a given ref.
You will see this response when GitHub automatically merges the base branch into the topic branch instead of creating\na deployment. This auto-merge happens when:
\nmaster in the response exampleIf there are no new commits in the base branch, a new request to create a deployment should give a successful\nresponse.
\nThis error happens when the auto_merge option is enabled and when the default branch (in this case master), can't\nbe merged into the branch that's being deployed (in this case topic-branch), due to merge conflicts.
This error happens when the required_contexts parameter indicates that one or more contexts need to have a success\nstatus for the commit to be deployed, but one or more of the required contexts do not have a state of success.
Response
" + "contentType": "application/json", + "description": "Response
", + "example": null, + "schema": { + "type": "object", + "properties": {}, + "additionalProperties": false + } } } ], @@ -285182,8 +285298,11 @@ "key": "default", "request": { "contentType": "application/json", - "description": "Example", + "description": "Create a new card", "acceptHeader": "application/vnd.github.v3+json", + "bodyParameters": { + "note": "Add payload for delete Project column" + }, "parameters": { "column_id": "COLUMN_ID" } @@ -286446,8 +286565,11 @@ "key": "default", "request": { "contentType": "application/json", - "description": "Example", + "description": "Rename the project column", "acceptHeader": "application/vnd.github.v3+json", + "bodyParameters": { + "name": "To Do" + }, "parameters": { "column_id": "COLUMN_ID" } @@ -286656,18 +286778,28 @@ "enabledForGitHubApps": true, "codeExamples": [ { - "key": "201", + "key": "default", "request": { "contentType": "application/json", - "description": "Example", + "description": "Move the column to the end of the board", "acceptHeader": "application/vnd.github.v3+json", + "bodyParameters": { + "position": "last" + }, "parameters": { "column_id": "COLUMN_ID" } }, "response": { "statusCode": "201", - "description": "Response
" + "contentType": "application/json", + "description": "Response
", + "example": null, + "schema": { + "type": "object", + "properties": {}, + "additionalProperties": false + } } } ], diff --git a/lib/rest/static/decorated/ghes-3.4.json b/lib/rest/static/decorated/ghes-3.4.json index b59089a1bdcc..d9ea932109aa 100644 --- a/lib/rest/static/decorated/ghes-3.4.json +++ b/lib/rest/static/decorated/ghes-3.4.json @@ -81,7 +81,7 @@ { "id": 13, "node_id": "MDg6QXJ0aWZhY3QxMw==", - "name": "", + "name": "Test output", "size_in_bytes": 453, "url": "https://api.github.com/repos/octo-org/octo-docs/actions/artifacts/13", "archive_download_url": "https://api.github.com/repos/octo-org/octo-docs/actions/artifacts/13/zip", @@ -171,6 +171,41 @@ "null" ], "format": "date-time" + }, + "workflow_run": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "examples": [ + 10 + ] + }, + "repository_id": { + "type": "integer", + "examples": [ + 42 + ] + }, + "head_repository_id": { + "type": "integer", + "examples": [ + 42 + ] + }, + "head_branch": { + "type": "string", + "examples": [ + "main" + ] + }, + "head_sha": { + "type": "string", + "examples": [ + "009b8a3a9ccbb128af87f9b1c0f4c62e8a304f6d" + ] + } + } } }, "required": [ @@ -334,6 +369,41 @@ "null" ], "format": "date-time" + }, + "workflow_run": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "examples": [ + 10 + ] + }, + "repository_id": { + "type": "integer", + "examples": [ + 42 + ] + }, + "head_repository_id": { + "type": "integer", + "examples": [ + 42 + ] + }, + "head_branch": { + "type": "string", + "examples": [ + "main" + ] + }, + "head_sha": { + "type": "string", + "examples": [ + "009b8a3a9ccbb128af87f9b1c0f4c62e8a304f6d" + ] + } + } } }, "required": [ @@ -591,7 +661,7 @@ { "id": 13, "node_id": "MDg6QXJ0aWZhY3QxMw==", - "name": "", + "name": "Test output", "size_in_bytes": 453, "url": "https://api.github.com/repos/octo-org/octo-docs/actions/artifacts/13", "archive_download_url": "https://api.github.com/repos/octo-org/octo-docs/actions/artifacts/13/zip", @@ -681,6 +751,41 @@ "null" ], "format": "date-time" + }, + "workflow_run": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "examples": [ + 10 + ] + }, + "repository_id": { + "type": "integer", + "examples": [ + 42 + ] + }, + "head_repository_id": { + "type": "integer", + "examples": [ + 42 + ] + }, + "head_branch": { + "type": "string", + "examples": [ + "main" + ] + }, + "head_sha": { + "type": "string", + "examples": [ + "009b8a3a9ccbb128af87f9b1c0f4c62e8a304f6d" + ] + } + } } }, "required": [ @@ -129894,28 +129999,19 @@ "rawDescription": "The permission to grant the collaborator. **Only valid on organization-owned repositories.**", "isRequired": false, "childParamsGroups": [] - }, - { - "type": "string", - "examples": [ - "\"push\"" - ], - "name": "permissions", - "in": "body", - "rawType": "string", - "description": "", - "isRequired": false, - "childParamsGroups": [] } ], "enabledForGitHubApps": true, "codeExamples": [ { - "key": "response-when-a-new-invitation-is-created", + "key": "new-invitation-is-created", "request": { "contentType": "application/json", - "description": "Example", + "description": "Add a collaborator with triage permissions", "acceptHeader": "application/vnd.github.v3+json", + "bodyParameters": { + "permission": "triage" + }, "parameters": { "owner": "OWNER", "repo": "REPO", @@ -161335,14 +161431,14 @@ }, { "type": "array of strings", - "description": "The status contexts to verify against commit status checks. If you omit this parameter, GitHub verifies all unique contexts before creating a deployment. To bypass checking entirely, pass an empty array. Defaults to all unique contexts.
", + "description": "The status contexts to verify against commit status checks. If you omit this parameter, GitHub verifies all unique contexts before creating a deployment. To bypass checking entirely, pass an empty array. Defaults to all unique contexts.
", "items": { "type": "string" }, "name": "required_contexts", "in": "body", "rawType": "array", - "rawDescription": "The [status](https://docs.github.com/enterprise-server@3.4/rest/reference/commits#commit-statuses) contexts to verify against commit status checks. If you omit this parameter, GitHub verifies all unique contexts before creating a deployment. To bypass checking entirely, pass an empty array. Defaults to all unique contexts.", + "rawDescription": "The [status](https://docs.github.com/enterprise-server@3.4/rest/commits/statuses) contexts to verify against commit status checks. If you omit this parameter, GitHub verifies all unique contexts before creating a deployment. To bypass checking entirely, pass an empty array. Defaults to all unique contexts.", "isRequired": false, "childParamsGroups": [] }, @@ -162114,7 +162210,7 @@ } ], "previews": [], - "descriptionHTML": "Deployments offer a few configurable parameters with certain defaults.
\nThe ref parameter can be any named branch, tag, or SHA. At GitHub Enterprise Server we often deploy branches and verify them\nbefore we merge a pull request.
The environment parameter allows deployments to be issued to different runtime environments. Teams often have\nmultiple environments for verifying their applications, such as production, staging, and qa. This parameter\nmakes it easier to track which environments have requested deployments. The default environment is production.
The auto_merge parameter is used to ensure that the requested ref is not behind the repository's default branch. If\nthe ref is behind the default branch for the repository, we will attempt to merge it for you. If the merge succeeds,\nthe API will return a successful merge commit. If merge conflicts prevent the merge from succeeding, the API will\nreturn a failure response.
By default, commit statuses for every submitted context must be in a success\nstate. The required_contexts parameter allows you to specify a subset of contexts that must be success, or to\nspecify contexts that have not yet been submitted. You are not required to use commit statuses to deploy. If you do\nnot require any contexts or create any commit statuses, the deployment will always succeed.
The payload parameter is available for any extra information that a deployment system might need. It is a JSON text\nfield that will be passed on when a deployment event is dispatched.
The task parameter is used by the deployment system to allow different execution paths. In the web world this might\nbe deploy:migrations to run schema changes on the system. In the compiled world this could be a flag to compile an\napplication with debugging enabled.
Users with repo or repo_deployment scopes can create a deployment for a given ref.
You will see this response when GitHub automatically merges the base branch into the topic branch instead of creating\na deployment. This auto-merge happens when:
\nmaster in the response exampleIf there are no new commits in the base branch, a new request to create a deployment should give a successful\nresponse.
\nThis error happens when the auto_merge option is enabled and when the default branch (in this case master), can't\nbe merged into the branch that's being deployed (in this case topic-branch), due to merge conflicts.
This error happens when the required_contexts parameter indicates that one or more contexts need to have a success\nstatus for the commit to be deployed, but one or more of the required contexts do not have a state of success.
Deployments offer a few configurable parameters with certain defaults.
\nThe ref parameter can be any named branch, tag, or SHA. At GitHub Enterprise Server we often deploy branches and verify them\nbefore we merge a pull request.
The environment parameter allows deployments to be issued to different runtime environments. Teams often have\nmultiple environments for verifying their applications, such as production, staging, and qa. This parameter\nmakes it easier to track which environments have requested deployments. The default environment is production.
The auto_merge parameter is used to ensure that the requested ref is not behind the repository's default branch. If\nthe ref is behind the default branch for the repository, we will attempt to merge it for you. If the merge succeeds,\nthe API will return a successful merge commit. If merge conflicts prevent the merge from succeeding, the API will\nreturn a failure response.
By default, commit statuses for every submitted context must be in a success\nstate. The required_contexts parameter allows you to specify a subset of contexts that must be success, or to\nspecify contexts that have not yet been submitted. You are not required to use commit statuses to deploy. If you do\nnot require any contexts or create any commit statuses, the deployment will always succeed.
The payload parameter is available for any extra information that a deployment system might need. It is a JSON text\nfield that will be passed on when a deployment event is dispatched.
The task parameter is used by the deployment system to allow different execution paths. In the web world this might\nbe deploy:migrations to run schema changes on the system. In the compiled world this could be a flag to compile an\napplication with debugging enabled.
Users with repo or repo_deployment scopes can create a deployment for a given ref.
You will see this response when GitHub automatically merges the base branch into the topic branch instead of creating\na deployment. This auto-merge happens when:
\nmaster in the response exampleIf there are no new commits in the base branch, a new request to create a deployment should give a successful\nresponse.
\nThis error happens when the auto_merge option is enabled and when the default branch (in this case master), can't\nbe merged into the branch that's being deployed (in this case topic-branch), due to merge conflicts.
This error happens when the required_contexts parameter indicates that one or more contexts need to have a success\nstatus for the commit to be deployed, but one or more of the required contexts do not have a state of success.
Response
" + "contentType": "application/json", + "description": "Response
", + "example": null, + "schema": { + "type": "object", + "properties": {}, + "additionalProperties": false + } } } ], @@ -305067,8 +305183,11 @@ "key": "default", "request": { "contentType": "application/json", - "description": "Example", + "description": "Create a new card", "acceptHeader": "application/vnd.github.v3+json", + "bodyParameters": { + "note": "Add payload for delete Project column" + }, "parameters": { "column_id": "COLUMN_ID" } @@ -306331,8 +306450,11 @@ "key": "default", "request": { "contentType": "application/json", - "description": "Example", + "description": "Rename the project column", "acceptHeader": "application/vnd.github.v3+json", + "bodyParameters": { + "name": "To Do" + }, "parameters": { "column_id": "COLUMN_ID" } @@ -306541,18 +306663,28 @@ "enabledForGitHubApps": true, "codeExamples": [ { - "key": "201", + "key": "default", "request": { "contentType": "application/json", - "description": "Example", + "description": "Move the column to the end of the board", "acceptHeader": "application/vnd.github.v3+json", + "bodyParameters": { + "position": "last" + }, "parameters": { "column_id": "COLUMN_ID" } }, "response": { "statusCode": "201", - "description": "Response
" + "contentType": "application/json", + "description": "Response
", + "example": null, + "schema": { + "type": "object", + "properties": {}, + "additionalProperties": false + } } } ], diff --git a/lib/rest/static/decorated/ghes-3.5.json b/lib/rest/static/decorated/ghes-3.5.json index 9d0a13c1fa05..b892352fa1ee 100644 --- a/lib/rest/static/decorated/ghes-3.5.json +++ b/lib/rest/static/decorated/ghes-3.5.json @@ -81,7 +81,7 @@ { "id": 13, "node_id": "MDg6QXJ0aWZhY3QxMw==", - "name": "", + "name": "Test output", "size_in_bytes": 453, "url": "https://api.github.com/repos/octo-org/octo-docs/actions/artifacts/13", "archive_download_url": "https://api.github.com/repos/octo-org/octo-docs/actions/artifacts/13/zip", @@ -171,6 +171,41 @@ "null" ], "format": "date-time" + }, + "workflow_run": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "examples": [ + 10 + ] + }, + "repository_id": { + "type": "integer", + "examples": [ + 42 + ] + }, + "head_repository_id": { + "type": "integer", + "examples": [ + 42 + ] + }, + "head_branch": { + "type": "string", + "examples": [ + "main" + ] + }, + "head_sha": { + "type": "string", + "examples": [ + "009b8a3a9ccbb128af87f9b1c0f4c62e8a304f6d" + ] + } + } } }, "required": [ @@ -334,6 +369,41 @@ "null" ], "format": "date-time" + }, + "workflow_run": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "examples": [ + 10 + ] + }, + "repository_id": { + "type": "integer", + "examples": [ + 42 + ] + }, + "head_repository_id": { + "type": "integer", + "examples": [ + 42 + ] + }, + "head_branch": { + "type": "string", + "examples": [ + "main" + ] + }, + "head_sha": { + "type": "string", + "examples": [ + "009b8a3a9ccbb128af87f9b1c0f4c62e8a304f6d" + ] + } + } } }, "required": [ @@ -591,7 +661,7 @@ { "id": 13, "node_id": "MDg6QXJ0aWZhY3QxMw==", - "name": "", + "name": "Test output", "size_in_bytes": 453, "url": "https://api.github.com/repos/octo-org/octo-docs/actions/artifacts/13", "archive_download_url": "https://api.github.com/repos/octo-org/octo-docs/actions/artifacts/13/zip", @@ -681,6 +751,41 @@ "null" ], "format": "date-time" + }, + "workflow_run": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "examples": [ + 10 + ] + }, + "repository_id": { + "type": "integer", + "examples": [ + 42 + ] + }, + "head_repository_id": { + "type": "integer", + "examples": [ + 42 + ] + }, + "head_branch": { + "type": "string", + "examples": [ + "main" + ] + }, + "head_sha": { + "type": "string", + "examples": [ + "009b8a3a9ccbb128af87f9b1c0f4c62e8a304f6d" + ] + } + } } }, "required": [ @@ -141683,28 +141788,19 @@ "rawDescription": "The permission to grant the collaborator. **Only valid on organization-owned repositories.**", "isRequired": false, "childParamsGroups": [] - }, - { - "type": "string", - "examples": [ - "\"push\"" - ], - "name": "permissions", - "in": "body", - "rawType": "string", - "description": "", - "isRequired": false, - "childParamsGroups": [] } ], "enabledForGitHubApps": true, "codeExamples": [ { - "key": "response-when-a-new-invitation-is-created", + "key": "new-invitation-is-created", "request": { "contentType": "application/json", - "description": "Example", + "description": "Add a collaborator with triage permissions", "acceptHeader": "application/vnd.github.v3+json", + "bodyParameters": { + "permission": "triage" + }, "parameters": { "owner": "OWNER", "repo": "REPO", @@ -173174,14 +173270,14 @@ }, { "type": "array of strings", - "description": "The status contexts to verify against commit status checks. If you omit this parameter, GitHub verifies all unique contexts before creating a deployment. To bypass checking entirely, pass an empty array. Defaults to all unique contexts.
", + "description": "The status contexts to verify against commit status checks. If you omit this parameter, GitHub verifies all unique contexts before creating a deployment. To bypass checking entirely, pass an empty array. Defaults to all unique contexts.
", "items": { "type": "string" }, "name": "required_contexts", "in": "body", "rawType": "array", - "rawDescription": "The [status](https://docs.github.com/enterprise-server@3.5/rest/reference/commits#commit-statuses) contexts to verify against commit status checks. If you omit this parameter, GitHub verifies all unique contexts before creating a deployment. To bypass checking entirely, pass an empty array. Defaults to all unique contexts.", + "rawDescription": "The [status](https://docs.github.com/enterprise-server@3.5/rest/commits/statuses) contexts to verify against commit status checks. If you omit this parameter, GitHub verifies all unique contexts before creating a deployment. To bypass checking entirely, pass an empty array. Defaults to all unique contexts.", "isRequired": false, "childParamsGroups": [] }, @@ -173953,7 +174049,7 @@ } ], "previews": [], - "descriptionHTML": "Deployments offer a few configurable parameters with certain defaults.
\nThe ref parameter can be any named branch, tag, or SHA. At GitHub Enterprise Server we often deploy branches and verify them\nbefore we merge a pull request.
The environment parameter allows deployments to be issued to different runtime environments. Teams often have\nmultiple environments for verifying their applications, such as production, staging, and qa. This parameter\nmakes it easier to track which environments have requested deployments. The default environment is production.
The auto_merge parameter is used to ensure that the requested ref is not behind the repository's default branch. If\nthe ref is behind the default branch for the repository, we will attempt to merge it for you. If the merge succeeds,\nthe API will return a successful merge commit. If merge conflicts prevent the merge from succeeding, the API will\nreturn a failure response.
By default, commit statuses for every submitted context must be in a success\nstate. The required_contexts parameter allows you to specify a subset of contexts that must be success, or to\nspecify contexts that have not yet been submitted. You are not required to use commit statuses to deploy. If you do\nnot require any contexts or create any commit statuses, the deployment will always succeed.
The payload parameter is available for any extra information that a deployment system might need. It is a JSON text\nfield that will be passed on when a deployment event is dispatched.
The task parameter is used by the deployment system to allow different execution paths. In the web world this might\nbe deploy:migrations to run schema changes on the system. In the compiled world this could be a flag to compile an\napplication with debugging enabled.
Users with repo or repo_deployment scopes can create a deployment for a given ref.
You will see this response when GitHub automatically merges the base branch into the topic branch instead of creating\na deployment. This auto-merge happens when:
\nmaster in the response exampleIf there are no new commits in the base branch, a new request to create a deployment should give a successful\nresponse.
\nThis error happens when the auto_merge option is enabled and when the default branch (in this case master), can't\nbe merged into the branch that's being deployed (in this case topic-branch), due to merge conflicts.
This error happens when the required_contexts parameter indicates that one or more contexts need to have a success\nstatus for the commit to be deployed, but one or more of the required contexts do not have a state of success.
Deployments offer a few configurable parameters with certain defaults.
\nThe ref parameter can be any named branch, tag, or SHA. At GitHub Enterprise Server we often deploy branches and verify them\nbefore we merge a pull request.
The environment parameter allows deployments to be issued to different runtime environments. Teams often have\nmultiple environments for verifying their applications, such as production, staging, and qa. This parameter\nmakes it easier to track which environments have requested deployments. The default environment is production.
The auto_merge parameter is used to ensure that the requested ref is not behind the repository's default branch. If\nthe ref is behind the default branch for the repository, we will attempt to merge it for you. If the merge succeeds,\nthe API will return a successful merge commit. If merge conflicts prevent the merge from succeeding, the API will\nreturn a failure response.
By default, commit statuses for every submitted context must be in a success\nstate. The required_contexts parameter allows you to specify a subset of contexts that must be success, or to\nspecify contexts that have not yet been submitted. You are not required to use commit statuses to deploy. If you do\nnot require any contexts or create any commit statuses, the deployment will always succeed.
The payload parameter is available for any extra information that a deployment system might need. It is a JSON text\nfield that will be passed on when a deployment event is dispatched.
The task parameter is used by the deployment system to allow different execution paths. In the web world this might\nbe deploy:migrations to run schema changes on the system. In the compiled world this could be a flag to compile an\napplication with debugging enabled.
Users with repo or repo_deployment scopes can create a deployment for a given ref.
You will see this response when GitHub automatically merges the base branch into the topic branch instead of creating\na deployment. This auto-merge happens when:
\nmaster in the response exampleIf there are no new commits in the base branch, a new request to create a deployment should give a successful\nresponse.
\nThis error happens when the auto_merge option is enabled and when the default branch (in this case master), can't\nbe merged into the branch that's being deployed (in this case topic-branch), due to merge conflicts.
This error happens when the required_contexts parameter indicates that one or more contexts need to have a success\nstatus for the commit to be deployed, but one or more of the required contexts do not have a state of success.
Response
" + "contentType": "application/json", + "description": "Response
", + "example": null, + "schema": { + "type": "object", + "properties": {}, + "additionalProperties": false + } } } ], @@ -316912,8 +317028,11 @@ "key": "default", "request": { "contentType": "application/json", - "description": "Example", + "description": "Create a new card", "acceptHeader": "application/vnd.github.v3+json", + "bodyParameters": { + "note": "Add payload for delete Project column" + }, "parameters": { "column_id": "COLUMN_ID" } @@ -318176,8 +318295,11 @@ "key": "default", "request": { "contentType": "application/json", - "description": "Example", + "description": "Rename the project column", "acceptHeader": "application/vnd.github.v3+json", + "bodyParameters": { + "name": "To Do" + }, "parameters": { "column_id": "COLUMN_ID" } @@ -318386,18 +318508,28 @@ "enabledForGitHubApps": true, "codeExamples": [ { - "key": "201", + "key": "default", "request": { "contentType": "application/json", - "description": "Example", + "description": "Move the column to the end of the board", "acceptHeader": "application/vnd.github.v3+json", + "bodyParameters": { + "position": "last" + }, "parameters": { "column_id": "COLUMN_ID" } }, "response": { "statusCode": "201", - "description": "Response
" + "contentType": "application/json", + "description": "Response
", + "example": null, + "schema": { + "type": "object", + "properties": {}, + "additionalProperties": false + } } } ], diff --git a/lib/rest/static/decorated/github.ae.json b/lib/rest/static/decorated/github.ae.json index c9a91bd187a6..dbfbf20af372 100644 --- a/lib/rest/static/decorated/github.ae.json +++ b/lib/rest/static/decorated/github.ae.json @@ -76,19 +76,33 @@ "expired": false, "created_at": "2020-01-10T14:59:22Z", "expires_at": "2020-03-21T14:59:22Z", - "updated_at": "2020-02-21T14:59:22Z" + "updated_at": "2020-02-21T14:59:22Z", + "workflow_run": { + "id": 2332938, + "repository_id": 1296269, + "head_repository_id": 1296269, + "head_branch": "main", + "head_sha": "328faa0536e6fef19753d9d91dc96a9931694ce3" + } }, { "id": 13, "node_id": "MDg6QXJ0aWZhY3QxMw==", - "name": "", + "name": "Test output", "size_in_bytes": 453, "url": "https://api.github.com/repos/octo-org/octo-docs/actions/artifacts/13", "archive_download_url": "https://api.github.com/repos/octo-org/octo-docs/actions/artifacts/13/zip", "expired": false, "created_at": "2020-01-10T14:59:22Z", "expires_at": "2020-03-21T14:59:22Z", - "updated_at": "2020-02-21T14:59:22Z" + "updated_at": "2020-02-21T14:59:22Z", + "workflow_run": { + "id": 2332942, + "repository_id": 1296269, + "head_repository_id": 1296269, + "head_branch": "main", + "head_sha": "178f4f6090b3fccad4a65b3e83d076a622d59652" + } } ] }, @@ -171,6 +185,41 @@ "null" ], "format": "date-time" + }, + "workflow_run": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "examples": [ + 10 + ] + }, + "repository_id": { + "type": "integer", + "examples": [ + 42 + ] + }, + "head_repository_id": { + "type": "integer", + "examples": [ + 42 + ] + }, + "head_branch": { + "type": "string", + "examples": [ + "main" + ] + }, + "head_sha": { + "type": "string", + "examples": [ + "009b8a3a9ccbb128af87f9b1c0f4c62e8a304f6d" + ] + } + } } }, "required": [ @@ -265,7 +314,14 @@ "expired": false, "created_at": "2020-01-10T14:59:22Z", "expires_at": "2020-01-21T14:59:22Z", - "updated_at": "2020-01-21T14:59:22Z" + "updated_at": "2020-01-21T14:59:22Z", + "workflow_run": { + "id": 2332938, + "repository_id": 1296269, + "head_repository_id": 1296269, + "head_branch": "main", + "head_sha": "328faa0536e6fef19753d9d91dc96a9931694ce3" + } }, "schema": { "title": "Artifact", @@ -334,6 +390,41 @@ "null" ], "format": "date-time" + }, + "workflow_run": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "examples": [ + 10 + ] + }, + "repository_id": { + "type": "integer", + "examples": [ + 42 + ] + }, + "head_repository_id": { + "type": "integer", + "examples": [ + 42 + ] + }, + "head_branch": { + "type": "string", + "examples": [ + "main" + ] + }, + "head_sha": { + "type": "string", + "examples": [ + "009b8a3a9ccbb128af87f9b1c0f4c62e8a304f6d" + ] + } + } } }, "required": [ @@ -586,19 +677,33 @@ "expired": false, "created_at": "2020-01-10T14:59:22Z", "expires_at": "2020-03-21T14:59:22Z", - "updated_at": "2020-02-21T14:59:22Z" + "updated_at": "2020-02-21T14:59:22Z", + "workflow_run": { + "id": 2332938, + "repository_id": 1296269, + "head_repository_id": 1296269, + "head_branch": "main", + "head_sha": "328faa0536e6fef19753d9d91dc96a9931694ce3" + } }, { "id": 13, "node_id": "MDg6QXJ0aWZhY3QxMw==", - "name": "", + "name": "Test output", "size_in_bytes": 453, "url": "https://api.github.com/repos/octo-org/octo-docs/actions/artifacts/13", "archive_download_url": "https://api.github.com/repos/octo-org/octo-docs/actions/artifacts/13/zip", "expired": false, "created_at": "2020-01-10T14:59:22Z", "expires_at": "2020-03-21T14:59:22Z", - "updated_at": "2020-02-21T14:59:22Z" + "updated_at": "2020-02-21T14:59:22Z", + "workflow_run": { + "id": 2332942, + "repository_id": 1296269, + "head_repository_id": 1296269, + "head_branch": "main", + "head_sha": "178f4f6090b3fccad4a65b3e83d076a622d59652" + } } ] }, @@ -681,6 +786,41 @@ "null" ], "format": "date-time" + }, + "workflow_run": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "examples": [ + 10 + ] + }, + "repository_id": { + "type": "integer", + "examples": [ + 42 + ] + }, + "head_repository_id": { + "type": "integer", + "examples": [ + 42 + ] + }, + "head_branch": { + "type": "string", + "examples": [ + "main" + ] + }, + "head_sha": { + "type": "string", + "examples": [ + "009b8a3a9ccbb128af87f9b1c0f4c62e8a304f6d" + ] + } + } } }, "required": [ @@ -125221,28 +125361,19 @@ "rawDescription": "The permission to grant the collaborator. **Only valid on organization-owned repositories.**", "isRequired": false, "childParamsGroups": [] - }, - { - "type": "string", - "examples": [ - "\"push\"" - ], - "name": "permissions", - "in": "body", - "rawType": "string", - "description": "", - "isRequired": false, - "childParamsGroups": [] } ], "enabledForGitHubApps": true, "codeExamples": [ { - "key": "response-when-a-new-invitation-is-created", + "key": "new-invitation-is-created", "request": { "contentType": "application/json", - "description": "Example", + "description": "Add a collaborator with triage permissions", "acceptHeader": "application/vnd.github.v3+json", + "bodyParameters": { + "permission": "triage" + }, "parameters": { "owner": "OWNER", "repo": "REPO", @@ -153199,14 +153330,14 @@ }, { "type": "array of strings", - "description": "The status contexts to verify against commit status checks. If you omit this parameter, GitHub verifies all unique contexts before creating a deployment. To bypass checking entirely, pass an empty array. Defaults to all unique contexts.
", + "description": "The status contexts to verify against commit status checks. If you omit this parameter, GitHub verifies all unique contexts before creating a deployment. To bypass checking entirely, pass an empty array. Defaults to all unique contexts.
", "items": { "type": "string" }, "name": "required_contexts", "in": "body", "rawType": "array", - "rawDescription": "The [status](https://docs.github.com/github-ae@latest/rest/reference/commits#commit-statuses) contexts to verify against commit status checks. If you omit this parameter, GitHub verifies all unique contexts before creating a deployment. To bypass checking entirely, pass an empty array. Defaults to all unique contexts.", + "rawDescription": "The [status](https://docs.github.com/github-ae@latest/rest/commits/statuses) contexts to verify against commit status checks. If you omit this parameter, GitHub verifies all unique contexts before creating a deployment. To bypass checking entirely, pass an empty array. Defaults to all unique contexts.", "isRequired": false, "childParamsGroups": [] }, @@ -153978,7 +154109,7 @@ } ], "previews": [], - "descriptionHTML": "Deployments offer a few configurable parameters with certain defaults.
\nThe ref parameter can be any named branch, tag, or SHA. At GitHub AE we often deploy branches and verify them\nbefore we merge a pull request.
The environment parameter allows deployments to be issued to different runtime environments. Teams often have\nmultiple environments for verifying their applications, such as production, staging, and qa. This parameter\nmakes it easier to track which environments have requested deployments. The default environment is production.
The auto_merge parameter is used to ensure that the requested ref is not behind the repository's default branch. If\nthe ref is behind the default branch for the repository, we will attempt to merge it for you. If the merge succeeds,\nthe API will return a successful merge commit. If merge conflicts prevent the merge from succeeding, the API will\nreturn a failure response.
By default, commit statuses for every submitted context must be in a success\nstate. The required_contexts parameter allows you to specify a subset of contexts that must be success, or to\nspecify contexts that have not yet been submitted. You are not required to use commit statuses to deploy. If you do\nnot require any contexts or create any commit statuses, the deployment will always succeed.
The payload parameter is available for any extra information that a deployment system might need. It is a JSON text\nfield that will be passed on when a deployment event is dispatched.
The task parameter is used by the deployment system to allow different execution paths. In the web world this might\nbe deploy:migrations to run schema changes on the system. In the compiled world this could be a flag to compile an\napplication with debugging enabled.
Users with repo or repo_deployment scopes can create a deployment for a given ref.
You will see this response when GitHub automatically merges the base branch into the topic branch instead of creating\na deployment. This auto-merge happens when:
\nmaster in the response exampleIf there are no new commits in the base branch, a new request to create a deployment should give a successful\nresponse.
\nThis error happens when the auto_merge option is enabled and when the default branch (in this case master), can't\nbe merged into the branch that's being deployed (in this case topic-branch), due to merge conflicts.
This error happens when the required_contexts parameter indicates that one or more contexts need to have a success\nstatus for the commit to be deployed, but one or more of the required contexts do not have a state of success.
Deployments offer a few configurable parameters with certain defaults.
\nThe ref parameter can be any named branch, tag, or SHA. At GitHub AE we often deploy branches and verify them\nbefore we merge a pull request.
The environment parameter allows deployments to be issued to different runtime environments. Teams often have\nmultiple environments for verifying their applications, such as production, staging, and qa. This parameter\nmakes it easier to track which environments have requested deployments. The default environment is production.
The auto_merge parameter is used to ensure that the requested ref is not behind the repository's default branch. If\nthe ref is behind the default branch for the repository, we will attempt to merge it for you. If the merge succeeds,\nthe API will return a successful merge commit. If merge conflicts prevent the merge from succeeding, the API will\nreturn a failure response.
By default, commit statuses for every submitted context must be in a success\nstate. The required_contexts parameter allows you to specify a subset of contexts that must be success, or to\nspecify contexts that have not yet been submitted. You are not required to use commit statuses to deploy. If you do\nnot require any contexts or create any commit statuses, the deployment will always succeed.
The payload parameter is available for any extra information that a deployment system might need. It is a JSON text\nfield that will be passed on when a deployment event is dispatched.
The task parameter is used by the deployment system to allow different execution paths. In the web world this might\nbe deploy:migrations to run schema changes on the system. In the compiled world this could be a flag to compile an\napplication with debugging enabled.
Users with repo or repo_deployment scopes can create a deployment for a given ref.
You will see this response when GitHub automatically merges the base branch into the topic branch instead of creating\na deployment. This auto-merge happens when:
\nmaster in the response exampleIf there are no new commits in the base branch, a new request to create a deployment should give a successful\nresponse.
\nThis error happens when the auto_merge option is enabled and when the default branch (in this case master), can't\nbe merged into the branch that's being deployed (in this case topic-branch), due to merge conflicts.
This error happens when the required_contexts parameter indicates that one or more contexts need to have a success\nstatus for the commit to be deployed, but one or more of the required contexts do not have a state of success.
Response
" + "contentType": "application/json", + "description": "Response
", + "example": null, + "schema": { + "type": "object", + "properties": {}, + "additionalProperties": false + } } } ], @@ -285736,8 +285887,11 @@ "key": "default", "request": { "contentType": "application/json", - "description": "Example", + "description": "Create a new card", "acceptHeader": "application/vnd.github.v3+json", + "bodyParameters": { + "note": "Add payload for delete Project column" + }, "parameters": { "column_id": "COLUMN_ID" } @@ -287000,8 +287154,11 @@ "key": "default", "request": { "contentType": "application/json", - "description": "Example", + "description": "Rename the project column", "acceptHeader": "application/vnd.github.v3+json", + "bodyParameters": { + "name": "To Do" + }, "parameters": { "column_id": "COLUMN_ID" } @@ -287210,18 +287367,28 @@ "enabledForGitHubApps": true, "codeExamples": [ { - "key": "201", + "key": "default", "request": { "contentType": "application/json", - "description": "Example", + "description": "Move the column to the end of the board", "acceptHeader": "application/vnd.github.v3+json", + "bodyParameters": { + "position": "last" + }, "parameters": { "column_id": "COLUMN_ID" } }, "response": { "statusCode": "201", - "description": "Response
" + "contentType": "application/json", + "description": "Response
", + "example": null, + "schema": { + "type": "object", + "properties": {}, + "additionalProperties": false + } } } ], diff --git a/lib/rest/static/dereferenced/api.github.com.deref.json b/lib/rest/static/dereferenced/api.github.com.deref.json index 0eacf885bf34..e5bbb6fe5f86 100644 --- a/lib/rest/static/dereferenced/api.github.com.deref.json +++ b/lib/rest/static/dereferenced/api.github.com.deref.json @@ -145723,6 +145723,15 @@ "position" ], "type": "object" + }, + "examples": { + "default": { + "summary": "Move the card to the bottom of the column", + "value": { + "column_id": 42, + "position": "bottom" + } + } } } } @@ -145737,6 +145746,11 @@ "properties": { }, "additionalProperties": false + }, + "examples": { + "default": { + "value": null + } } } } @@ -146173,6 +146187,14 @@ "name" ], "type": "object" + }, + "examples": { + "default": { + "summary": "Rename the project column", + "value": { + "name": "To Do" + } + } } } } @@ -146933,6 +146955,14 @@ ] } ] + }, + "examples": { + "default": { + "summary": "Create a new card", + "value": { + "note": "Add payload for delete Project column" + } + } } } } @@ -147487,6 +147517,14 @@ "position" ], "type": "object" + }, + "examples": { + "default": { + "summary": "Move the column to the end of the board", + "value": { + "position": "last" + } + } } } } @@ -147501,6 +147539,11 @@ "properties": { }, "additionalProperties": false + }, + "examples": { + "default": { + "value": null + } } } } @@ -148087,6 +148130,16 @@ } }, "type": "object" + }, + "examples": { + "default": { + "summary": "Change the name, state, and permissions for a project", + "value": { + "name": "Week One Sprint", + "state": "open", + "organization_permission": "write" + } + } } } } @@ -162952,6 +163005,41 @@ "null" ], "format": "date-time" + }, + "workflow_run": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "examples": [ + 10 + ] + }, + "repository_id": { + "type": "integer", + "examples": [ + 42 + ] + }, + "head_repository_id": { + "type": "integer", + "examples": [ + 42 + ] + }, + "head_branch": { + "type": "string", + "examples": [ + "main" + ] + }, + "head_sha": { + "type": "string", + "examples": [ + "009b8a3a9ccbb128af87f9b1c0f4c62e8a304f6d" + ] + } + } } }, "required": [ @@ -162985,19 +163073,33 @@ "expired": false, "created_at": "2020-01-10T14:59:22Z", "expires_at": "2020-03-21T14:59:22Z", - "updated_at": "2020-02-21T14:59:22Z" + "updated_at": "2020-02-21T14:59:22Z", + "workflow_run": { + "id": 2332938, + "repository_id": 1296269, + "head_repository_id": 1296269, + "head_branch": "main", + "head_sha": "328faa0536e6fef19753d9d91dc96a9931694ce3" + } }, { "id": 13, "node_id": "MDg6QXJ0aWZhY3QxMw==", - "name": "", + "name": "Test output", "size_in_bytes": 453, "url": "https://api.github.com/repos/octo-org/octo-docs/actions/artifacts/13", "archive_download_url": "https://api.github.com/repos/octo-org/octo-docs/actions/artifacts/13/zip", "expired": false, "created_at": "2020-01-10T14:59:22Z", "expires_at": "2020-03-21T14:59:22Z", - "updated_at": "2020-02-21T14:59:22Z" + "updated_at": "2020-02-21T14:59:22Z", + "workflow_run": { + "id": 2332942, + "repository_id": 1296269, + "head_repository_id": 1296269, + "head_branch": "main", + "head_sha": "178f4f6090b3fccad4a65b3e83d076a622d59652" + } } ] } @@ -163136,6 +163238,41 @@ "null" ], "format": "date-time" + }, + "workflow_run": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "examples": [ + 10 + ] + }, + "repository_id": { + "type": "integer", + "examples": [ + 42 + ] + }, + "head_repository_id": { + "type": "integer", + "examples": [ + 42 + ] + }, + "head_branch": { + "type": "string", + "examples": [ + "main" + ] + }, + "head_sha": { + "type": "string", + "examples": [ + "009b8a3a9ccbb128af87f9b1c0f4c62e8a304f6d" + ] + } + } } }, "required": [ @@ -163163,7 +163300,14 @@ "expired": false, "created_at": "2020-01-10T14:59:22Z", "expires_at": "2020-01-21T14:59:22Z", - "updated_at": "2020-01-21T14:59:22Z" + "updated_at": "2020-01-21T14:59:22Z", + "workflow_run": { + "id": 2332938, + "repository_id": 1296269, + "head_repository_id": 1296269, + "head_branch": "main", + "head_sha": "328faa0536e6fef19753d9d91dc96a9931694ce3" + } } } } @@ -180381,6 +180525,41 @@ "null" ], "format": "date-time" + }, + "workflow_run": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "examples": [ + 10 + ] + }, + "repository_id": { + "type": "integer", + "examples": [ + 42 + ] + }, + "head_repository_id": { + "type": "integer", + "examples": [ + 42 + ] + }, + "head_branch": { + "type": "string", + "examples": [ + "main" + ] + }, + "head_sha": { + "type": "string", + "examples": [ + "009b8a3a9ccbb128af87f9b1c0f4c62e8a304f6d" + ] + } + } } }, "required": [ @@ -180414,19 +180593,33 @@ "expired": false, "created_at": "2020-01-10T14:59:22Z", "expires_at": "2020-03-21T14:59:22Z", - "updated_at": "2020-02-21T14:59:22Z" + "updated_at": "2020-02-21T14:59:22Z", + "workflow_run": { + "id": 2332938, + "repository_id": 1296269, + "head_repository_id": 1296269, + "head_branch": "main", + "head_sha": "328faa0536e6fef19753d9d91dc96a9931694ce3" + } }, { "id": 13, "node_id": "MDg6QXJ0aWZhY3QxMw==", - "name": "", + "name": "Test output", "size_in_bytes": 453, "url": "https://api.github.com/repos/octo-org/octo-docs/actions/artifacts/13", "archive_download_url": "https://api.github.com/repos/octo-org/octo-docs/actions/artifacts/13/zip", "expired": false, "created_at": "2020-01-10T14:59:22Z", "expires_at": "2020-03-21T14:59:22Z", - "updated_at": "2020-02-21T14:59:22Z" + "updated_at": "2020-02-21T14:59:22Z", + "workflow_run": { + "id": 2332942, + "repository_id": 1296269, + "head_repository_id": 1296269, + "head_branch": "main", + "head_sha": "178f4f6090b3fccad4a65b3e83d076a622d59652" + } } ] } @@ -252042,12 +252235,14 @@ "triage" ], "default": "push" - }, - "permissions": { - "type": "string", - "examples": [ - "\"push\"" - ] + } + } + }, + "examples": { + "new-invitation-is-created": { + "summary": "Add a collaborator with triage permissions", + "value": { + "permission": "triage" } } } @@ -254571,7 +254766,7 @@ ] }, "examples": { - "response-when-a-new-invitation-is-created": { + "new-invitation-is-created": { "value": { "id": 1, "node_id": "MDEwOlJlcG9zaXRvcnkxMjk2MjY5", @@ -280318,7 +280513,7 @@ }, "post": { "summary": "Create a deployment", - "description": "Deployments offer a few configurable parameters with certain defaults.\n\nThe `ref` parameter can be any named branch, tag, or SHA. At GitHub we often deploy branches and verify them\nbefore we merge a pull request.\n\nThe `environment` parameter allows deployments to be issued to different runtime environments. Teams often have\nmultiple environments for verifying their applications, such as `production`, `staging`, and `qa`. This parameter\nmakes it easier to track which environments have requested deployments. The default environment is `production`.\n\nThe `auto_merge` parameter is used to ensure that the requested ref is not behind the repository's default branch. If\nthe ref _is_ behind the default branch for the repository, we will attempt to merge it for you. If the merge succeeds,\nthe API will return a successful merge commit. If merge conflicts prevent the merge from succeeding, the API will\nreturn a failure response.\n\nBy default, [commit statuses](https://docs.github.com/rest/reference/commits#commit-statuses) for every submitted context must be in a `success`\nstate. The `required_contexts` parameter allows you to specify a subset of contexts that must be `success`, or to\nspecify contexts that have not yet been submitted. You are not required to use commit statuses to deploy. If you do\nnot require any contexts or create any commit statuses, the deployment will always succeed.\n\nThe `payload` parameter is available for any extra information that a deployment system might need. It is a JSON text\nfield that will be passed on when a deployment event is dispatched.\n\nThe `task` parameter is used by the deployment system to allow different execution paths. In the web world this might\nbe `deploy:migrations` to run schema changes on the system. In the compiled world this could be a flag to compile an\napplication with debugging enabled.\n\nUsers with `repo` or `repo_deployment` scopes can create a deployment for a given ref.\n\n#### Merged branch response\nYou will see this response when GitHub automatically merges the base branch into the topic branch instead of creating\na deployment. This auto-merge happens when:\n* Auto-merge option is enabled in the repository\n* Topic branch does not include the latest changes on the base branch, which is `master` in the response example\n* There are no merge conflicts\n\nIf there are no new commits in the base branch, a new request to create a deployment should give a successful\nresponse.\n\n#### Merge conflict response\nThis error happens when the `auto_merge` option is enabled and when the default branch (in this case `master`), can't\nbe merged into the branch that's being deployed (in this case `topic-branch`), due to merge conflicts.\n\n#### Failed commit status checks\nThis error happens when the `required_contexts` parameter indicates that one or more contexts need to have a `success`\nstatus for the commit to be deployed, but one or more of the required contexts do not have a state of `success`.", + "description": "Deployments offer a few configurable parameters with certain defaults.\n\nThe `ref` parameter can be any named branch, tag, or SHA. At GitHub we often deploy branches and verify them\nbefore we merge a pull request.\n\nThe `environment` parameter allows deployments to be issued to different runtime environments. Teams often have\nmultiple environments for verifying their applications, such as `production`, `staging`, and `qa`. This parameter\nmakes it easier to track which environments have requested deployments. The default environment is `production`.\n\nThe `auto_merge` parameter is used to ensure that the requested ref is not behind the repository's default branch. If\nthe ref _is_ behind the default branch for the repository, we will attempt to merge it for you. If the merge succeeds,\nthe API will return a successful merge commit. If merge conflicts prevent the merge from succeeding, the API will\nreturn a failure response.\n\nBy default, [commit statuses](https://docs.github.com/rest/commits/statuses) for every submitted context must be in a `success`\nstate. The `required_contexts` parameter allows you to specify a subset of contexts that must be `success`, or to\nspecify contexts that have not yet been submitted. You are not required to use commit statuses to deploy. If you do\nnot require any contexts or create any commit statuses, the deployment will always succeed.\n\nThe `payload` parameter is available for any extra information that a deployment system might need. It is a JSON text\nfield that will be passed on when a deployment event is dispatched.\n\nThe `task` parameter is used by the deployment system to allow different execution paths. In the web world this might\nbe `deploy:migrations` to run schema changes on the system. In the compiled world this could be a flag to compile an\napplication with debugging enabled.\n\nUsers with `repo` or `repo_deployment` scopes can create a deployment for a given ref.\n\n#### Merged branch response\nYou will see this response when GitHub automatically merges the base branch into the topic branch instead of creating\na deployment. This auto-merge happens when:\n* Auto-merge option is enabled in the repository\n* Topic branch does not include the latest changes on the base branch, which is `master` in the response example\n* There are no merge conflicts\n\nIf there are no new commits in the base branch, a new request to create a deployment should give a successful\nresponse.\n\n#### Merge conflict response\nThis error happens when the `auto_merge` option is enabled and when the default branch (in this case `master`), can't\nbe merged into the branch that's being deployed (in this case `topic-branch`), due to merge conflicts.\n\n#### Failed commit status checks\nThis error happens when the `required_contexts` parameter indicates that one or more contexts need to have a `success`\nstatus for the commit to be deployed, but one or more of the required contexts do not have a state of `success`.", "tags": [ "repos" ], @@ -280370,7 +280565,7 @@ }, "required_contexts": { "type": "array", - "description": "The [status](https://docs.github.com/rest/reference/commits#commit-statuses) contexts to verify against commit status checks. If you omit this parameter, GitHub verifies all unique contexts before creating a deployment. To bypass checking entirely, pass an empty array. Defaults to all unique contexts.", + "description": "The [status](https://docs.github.com/rest/commits/statuses) contexts to verify against commit status checks. If you omit this parameter, GitHub verifies all unique contexts before creating a deployment. To bypass checking entirely, pass an empty array. Defaults to all unique contexts.", "items": { "type": "string" } @@ -544923,6 +545118,15 @@ "name" ], "type": "object" + }, + "examples": { + "default": { + "summary": "Create a new project", + "value": { + "name": "My Projects", + "body": "A board to manage my personal projects." + } + } } } } diff --git a/lib/rest/static/dereferenced/ghes-3.1.deref.json b/lib/rest/static/dereferenced/ghes-3.1.deref.json index f66047bfaf68..1b119410d56d 100644 --- a/lib/rest/static/dereferenced/ghes-3.1.deref.json +++ b/lib/rest/static/dereferenced/ghes-3.1.deref.json @@ -115334,6 +115334,15 @@ "position" ], "type": "object" + }, + "examples": { + "default": { + "summary": "Move the card to the bottom of the column", + "value": { + "column_id": 42, + "position": "bottom" + } + } } } } @@ -115348,6 +115357,11 @@ "properties": { }, "additionalProperties": false + }, + "examples": { + "default": { + "value": null + } } } } @@ -115796,6 +115810,14 @@ "name" ], "type": "object" + }, + "examples": { + "default": { + "summary": "Rename the project column", + "value": { + "name": "To Do" + } + } } } } @@ -116574,6 +116596,14 @@ ] } ] + }, + "examples": { + "default": { + "summary": "Create a new card", + "value": { + "note": "Add payload for delete Project column" + } + } } } } @@ -117134,6 +117164,14 @@ "position" ], "type": "object" + }, + "examples": { + "default": { + "summary": "Move the column to the end of the board", + "value": { + "position": "last" + } + } } } } @@ -117148,6 +117186,11 @@ "properties": { }, "additionalProperties": false + }, + "examples": { + "default": { + "value": null + } } } } @@ -117745,6 +117788,16 @@ } }, "type": "object" + }, + "examples": { + "default": { + "summary": "Change the name, state, and permissions for a project", + "value": { + "name": "Week One Sprint", + "state": "open", + "organization_permission": "write" + } + } } } } @@ -133081,6 +133134,41 @@ "null" ], "format": "date-time" + }, + "workflow_run": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "examples": [ + 10 + ] + }, + "repository_id": { + "type": "integer", + "examples": [ + 42 + ] + }, + "head_repository_id": { + "type": "integer", + "examples": [ + 42 + ] + }, + "head_branch": { + "type": "string", + "examples": [ + "main" + ] + }, + "head_sha": { + "type": "string", + "examples": [ + "009b8a3a9ccbb128af87f9b1c0f4c62e8a304f6d" + ] + } + } } }, "required": [ @@ -133119,7 +133207,7 @@ { "id": 13, "node_id": "MDg6QXJ0aWZhY3QxMw==", - "name": "", + "name": "Test output", "size_in_bytes": 453, "url": "https://api.github.com/repos/octo-org/octo-docs/actions/artifacts/13", "archive_download_url": "https://api.github.com/repos/octo-org/octo-docs/actions/artifacts/13/zip", @@ -133265,6 +133353,41 @@ "null" ], "format": "date-time" + }, + "workflow_run": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "examples": [ + 10 + ] + }, + "repository_id": { + "type": "integer", + "examples": [ + 42 + ] + }, + "head_repository_id": { + "type": "integer", + "examples": [ + 42 + ] + }, + "head_branch": { + "type": "string", + "examples": [ + "main" + ] + }, + "head_sha": { + "type": "string", + "examples": [ + "009b8a3a9ccbb128af87f9b1c0f4c62e8a304f6d" + ] + } + } } }, "required": [ @@ -147574,6 +147697,41 @@ "null" ], "format": "date-time" + }, + "workflow_run": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "examples": [ + 10 + ] + }, + "repository_id": { + "type": "integer", + "examples": [ + 42 + ] + }, + "head_repository_id": { + "type": "integer", + "examples": [ + 42 + ] + }, + "head_branch": { + "type": "string", + "examples": [ + "main" + ] + }, + "head_sha": { + "type": "string", + "examples": [ + "009b8a3a9ccbb128af87f9b1c0f4c62e8a304f6d" + ] + } + } } }, "required": [ @@ -147612,7 +147770,7 @@ { "id": 13, "node_id": "MDg6QXJ0aWZhY3QxMw==", - "name": "", + "name": "Test output", "size_in_bytes": 453, "url": "https://api.github.com/repos/octo-org/octo-docs/actions/artifacts/13", "archive_download_url": "https://api.github.com/repos/octo-org/octo-docs/actions/artifacts/13/zip", @@ -194372,12 +194530,14 @@ "triage" ], "default": "push" - }, - "permissions": { - "type": "string", - "examples": [ - "\"push\"" - ] + } + } + }, + "examples": { + "new-invitation-is-created": { + "summary": "Add a collaborator with triage permissions", + "value": { + "permission": "triage" } } } @@ -196884,7 +197044,7 @@ ] }, "examples": { - "response-when-a-new-invitation-is-created": { + "new-invitation-is-created": { "value": { "id": 1, "node_id": "MDEwOlJlcG9zaXRvcnkxMjk2MjY5", @@ -221787,7 +221947,7 @@ }, "post": { "summary": "Create a deployment", - "description": "Deployments offer a few configurable parameters with certain defaults.\n\nThe `ref` parameter can be any named branch, tag, or SHA. At GitHub Enterprise Server we often deploy branches and verify them\nbefore we merge a pull request.\n\nThe `environment` parameter allows deployments to be issued to different runtime environments. Teams often have\nmultiple environments for verifying their applications, such as `production`, `staging`, and `qa`. This parameter\nmakes it easier to track which environments have requested deployments. The default environment is `production`.\n\nThe `auto_merge` parameter is used to ensure that the requested ref is not behind the repository's default branch. If\nthe ref _is_ behind the default branch for the repository, we will attempt to merge it for you. If the merge succeeds,\nthe API will return a successful merge commit. If merge conflicts prevent the merge from succeeding, the API will\nreturn a failure response.\n\nBy default, [commit statuses](https://docs.github.com/enterprise-server@3.1/rest/reference/commits#commit-statuses) for every submitted context must be in a `success`\nstate. The `required_contexts` parameter allows you to specify a subset of contexts that must be `success`, or to\nspecify contexts that have not yet been submitted. You are not required to use commit statuses to deploy. If you do\nnot require any contexts or create any commit statuses, the deployment will always succeed.\n\nThe `payload` parameter is available for any extra information that a deployment system might need. It is a JSON text\nfield that will be passed on when a deployment event is dispatched.\n\nThe `task` parameter is used by the deployment system to allow different execution paths. In the web world this might\nbe `deploy:migrations` to run schema changes on the system. In the compiled world this could be a flag to compile an\napplication with debugging enabled.\n\nUsers with `repo` or `repo_deployment` scopes can create a deployment for a given ref.\n\n#### Merged branch response\nYou will see this response when GitHub automatically merges the base branch into the topic branch instead of creating\na deployment. This auto-merge happens when:\n* Auto-merge option is enabled in the repository\n* Topic branch does not include the latest changes on the base branch, which is `master` in the response example\n* There are no merge conflicts\n\nIf there are no new commits in the base branch, a new request to create a deployment should give a successful\nresponse.\n\n#### Merge conflict response\nThis error happens when the `auto_merge` option is enabled and when the default branch (in this case `master`), can't\nbe merged into the branch that's being deployed (in this case `topic-branch`), due to merge conflicts.\n\n#### Failed commit status checks\nThis error happens when the `required_contexts` parameter indicates that one or more contexts need to have a `success`\nstatus for the commit to be deployed, but one or more of the required contexts do not have a state of `success`.", + "description": "Deployments offer a few configurable parameters with certain defaults.\n\nThe `ref` parameter can be any named branch, tag, or SHA. At GitHub Enterprise Server we often deploy branches and verify them\nbefore we merge a pull request.\n\nThe `environment` parameter allows deployments to be issued to different runtime environments. Teams often have\nmultiple environments for verifying their applications, such as `production`, `staging`, and `qa`. This parameter\nmakes it easier to track which environments have requested deployments. The default environment is `production`.\n\nThe `auto_merge` parameter is used to ensure that the requested ref is not behind the repository's default branch. If\nthe ref _is_ behind the default branch for the repository, we will attempt to merge it for you. If the merge succeeds,\nthe API will return a successful merge commit. If merge conflicts prevent the merge from succeeding, the API will\nreturn a failure response.\n\nBy default, [commit statuses](https://docs.github.com/enterprise-server@3.1/rest/commits/statuses) for every submitted context must be in a `success`\nstate. The `required_contexts` parameter allows you to specify a subset of contexts that must be `success`, or to\nspecify contexts that have not yet been submitted. You are not required to use commit statuses to deploy. If you do\nnot require any contexts or create any commit statuses, the deployment will always succeed.\n\nThe `payload` parameter is available for any extra information that a deployment system might need. It is a JSON text\nfield that will be passed on when a deployment event is dispatched.\n\nThe `task` parameter is used by the deployment system to allow different execution paths. In the web world this might\nbe `deploy:migrations` to run schema changes on the system. In the compiled world this could be a flag to compile an\napplication with debugging enabled.\n\nUsers with `repo` or `repo_deployment` scopes can create a deployment for a given ref.\n\n#### Merged branch response\nYou will see this response when GitHub automatically merges the base branch into the topic branch instead of creating\na deployment. This auto-merge happens when:\n* Auto-merge option is enabled in the repository\n* Topic branch does not include the latest changes on the base branch, which is `master` in the response example\n* There are no merge conflicts\n\nIf there are no new commits in the base branch, a new request to create a deployment should give a successful\nresponse.\n\n#### Merge conflict response\nThis error happens when the `auto_merge` option is enabled and when the default branch (in this case `master`), can't\nbe merged into the branch that's being deployed (in this case `topic-branch`), due to merge conflicts.\n\n#### Failed commit status checks\nThis error happens when the `required_contexts` parameter indicates that one or more contexts need to have a `success`\nstatus for the commit to be deployed, but one or more of the required contexts do not have a state of `success`.", "tags": [ "repos" ], @@ -221839,7 +221999,7 @@ }, "required_contexts": { "type": "array", - "description": "The [status](https://docs.github.com/enterprise-server@3.1/rest/reference/commits#commit-statuses) contexts to verify against commit status checks. If you omit this parameter, GitHub verifies all unique contexts before creating a deployment. To bypass checking entirely, pass an empty array. Defaults to all unique contexts.", + "description": "The [status](https://docs.github.com/enterprise-server@3.1/rest/commits/statuses) contexts to verify against commit status checks. If you omit this parameter, GitHub verifies all unique contexts before creating a deployment. To bypass checking entirely, pass an empty array. Defaults to all unique contexts.", "items": { "type": "string" } @@ -422872,6 +423032,15 @@ "name" ], "type": "object" + }, + "examples": { + "default": { + "summary": "Create a new project", + "value": { + "name": "My Projects", + "body": "A board to manage my personal projects." + } + } } } } diff --git a/lib/rest/static/dereferenced/ghes-3.2.deref.json b/lib/rest/static/dereferenced/ghes-3.2.deref.json index 7bde29d206d1..40207db757bc 100644 --- a/lib/rest/static/dereferenced/ghes-3.2.deref.json +++ b/lib/rest/static/dereferenced/ghes-3.2.deref.json @@ -117626,6 +117626,15 @@ "position" ], "type": "object" + }, + "examples": { + "default": { + "summary": "Move the card to the bottom of the column", + "value": { + "column_id": 42, + "position": "bottom" + } + } } } } @@ -117640,6 +117649,11 @@ "properties": { }, "additionalProperties": false + }, + "examples": { + "default": { + "value": null + } } } } @@ -118088,6 +118102,14 @@ "name" ], "type": "object" + }, + "examples": { + "default": { + "summary": "Rename the project column", + "value": { + "name": "To Do" + } + } } } } @@ -118866,6 +118888,14 @@ ] } ] + }, + "examples": { + "default": { + "summary": "Create a new card", + "value": { + "note": "Add payload for delete Project column" + } + } } } } @@ -119426,6 +119456,14 @@ "position" ], "type": "object" + }, + "examples": { + "default": { + "summary": "Move the column to the end of the board", + "value": { + "position": "last" + } + } } } } @@ -119440,6 +119478,11 @@ "properties": { }, "additionalProperties": false + }, + "examples": { + "default": { + "value": null + } } } } @@ -120037,6 +120080,16 @@ } }, "type": "object" + }, + "examples": { + "default": { + "summary": "Change the name, state, and permissions for a project", + "value": { + "name": "Week One Sprint", + "state": "open", + "organization_permission": "write" + } + } } } } @@ -135598,6 +135651,41 @@ "null" ], "format": "date-time" + }, + "workflow_run": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "examples": [ + 10 + ] + }, + "repository_id": { + "type": "integer", + "examples": [ + 42 + ] + }, + "head_repository_id": { + "type": "integer", + "examples": [ + 42 + ] + }, + "head_branch": { + "type": "string", + "examples": [ + "main" + ] + }, + "head_sha": { + "type": "string", + "examples": [ + "009b8a3a9ccbb128af87f9b1c0f4c62e8a304f6d" + ] + } + } } }, "required": [ @@ -135636,7 +135724,7 @@ { "id": 13, "node_id": "MDg6QXJ0aWZhY3QxMw==", - "name": "", + "name": "Test output", "size_in_bytes": 453, "url": "https://api.github.com/repos/octo-org/octo-docs/actions/artifacts/13", "archive_download_url": "https://api.github.com/repos/octo-org/octo-docs/actions/artifacts/13/zip", @@ -135782,6 +135870,41 @@ "null" ], "format": "date-time" + }, + "workflow_run": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "examples": [ + 10 + ] + }, + "repository_id": { + "type": "integer", + "examples": [ + 42 + ] + }, + "head_repository_id": { + "type": "integer", + "examples": [ + 42 + ] + }, + "head_branch": { + "type": "string", + "examples": [ + "main" + ] + }, + "head_sha": { + "type": "string", + "examples": [ + "009b8a3a9ccbb128af87f9b1c0f4c62e8a304f6d" + ] + } + } } }, "required": [ @@ -150518,6 +150641,41 @@ "null" ], "format": "date-time" + }, + "workflow_run": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "examples": [ + 10 + ] + }, + "repository_id": { + "type": "integer", + "examples": [ + 42 + ] + }, + "head_repository_id": { + "type": "integer", + "examples": [ + 42 + ] + }, + "head_branch": { + "type": "string", + "examples": [ + "main" + ] + }, + "head_sha": { + "type": "string", + "examples": [ + "009b8a3a9ccbb128af87f9b1c0f4c62e8a304f6d" + ] + } + } } }, "required": [ @@ -150556,7 +150714,7 @@ { "id": 13, "node_id": "MDg6QXJ0aWZhY3QxMw==", - "name": "", + "name": "Test output", "size_in_bytes": 453, "url": "https://api.github.com/repos/octo-org/octo-docs/actions/artifacts/13", "archive_download_url": "https://api.github.com/repos/octo-org/octo-docs/actions/artifacts/13/zip", @@ -198795,12 +198953,14 @@ "triage" ], "default": "push" - }, - "permissions": { - "type": "string", - "examples": [ - "\"push\"" - ] + } + } + }, + "examples": { + "new-invitation-is-created": { + "summary": "Add a collaborator with triage permissions", + "value": { + "permission": "triage" } } } @@ -201318,7 +201478,7 @@ ] }, "examples": { - "response-when-a-new-invitation-is-created": { + "new-invitation-is-created": { "value": { "id": 1, "node_id": "MDEwOlJlcG9zaXRvcnkxMjk2MjY5", @@ -226285,7 +226445,7 @@ }, "post": { "summary": "Create a deployment", - "description": "Deployments offer a few configurable parameters with certain defaults.\n\nThe `ref` parameter can be any named branch, tag, or SHA. At GitHub Enterprise Server we often deploy branches and verify them\nbefore we merge a pull request.\n\nThe `environment` parameter allows deployments to be issued to different runtime environments. Teams often have\nmultiple environments for verifying their applications, such as `production`, `staging`, and `qa`. This parameter\nmakes it easier to track which environments have requested deployments. The default environment is `production`.\n\nThe `auto_merge` parameter is used to ensure that the requested ref is not behind the repository's default branch. If\nthe ref _is_ behind the default branch for the repository, we will attempt to merge it for you. If the merge succeeds,\nthe API will return a successful merge commit. If merge conflicts prevent the merge from succeeding, the API will\nreturn a failure response.\n\nBy default, [commit statuses](https://docs.github.com/enterprise-server@3.2/rest/reference/commits#commit-statuses) for every submitted context must be in a `success`\nstate. The `required_contexts` parameter allows you to specify a subset of contexts that must be `success`, or to\nspecify contexts that have not yet been submitted. You are not required to use commit statuses to deploy. If you do\nnot require any contexts or create any commit statuses, the deployment will always succeed.\n\nThe `payload` parameter is available for any extra information that a deployment system might need. It is a JSON text\nfield that will be passed on when a deployment event is dispatched.\n\nThe `task` parameter is used by the deployment system to allow different execution paths. In the web world this might\nbe `deploy:migrations` to run schema changes on the system. In the compiled world this could be a flag to compile an\napplication with debugging enabled.\n\nUsers with `repo` or `repo_deployment` scopes can create a deployment for a given ref.\n\n#### Merged branch response\nYou will see this response when GitHub automatically merges the base branch into the topic branch instead of creating\na deployment. This auto-merge happens when:\n* Auto-merge option is enabled in the repository\n* Topic branch does not include the latest changes on the base branch, which is `master` in the response example\n* There are no merge conflicts\n\nIf there are no new commits in the base branch, a new request to create a deployment should give a successful\nresponse.\n\n#### Merge conflict response\nThis error happens when the `auto_merge` option is enabled and when the default branch (in this case `master`), can't\nbe merged into the branch that's being deployed (in this case `topic-branch`), due to merge conflicts.\n\n#### Failed commit status checks\nThis error happens when the `required_contexts` parameter indicates that one or more contexts need to have a `success`\nstatus for the commit to be deployed, but one or more of the required contexts do not have a state of `success`.", + "description": "Deployments offer a few configurable parameters with certain defaults.\n\nThe `ref` parameter can be any named branch, tag, or SHA. At GitHub Enterprise Server we often deploy branches and verify them\nbefore we merge a pull request.\n\nThe `environment` parameter allows deployments to be issued to different runtime environments. Teams often have\nmultiple environments for verifying their applications, such as `production`, `staging`, and `qa`. This parameter\nmakes it easier to track which environments have requested deployments. The default environment is `production`.\n\nThe `auto_merge` parameter is used to ensure that the requested ref is not behind the repository's default branch. If\nthe ref _is_ behind the default branch for the repository, we will attempt to merge it for you. If the merge succeeds,\nthe API will return a successful merge commit. If merge conflicts prevent the merge from succeeding, the API will\nreturn a failure response.\n\nBy default, [commit statuses](https://docs.github.com/enterprise-server@3.2/rest/commits/statuses) for every submitted context must be in a `success`\nstate. The `required_contexts` parameter allows you to specify a subset of contexts that must be `success`, or to\nspecify contexts that have not yet been submitted. You are not required to use commit statuses to deploy. If you do\nnot require any contexts or create any commit statuses, the deployment will always succeed.\n\nThe `payload` parameter is available for any extra information that a deployment system might need. It is a JSON text\nfield that will be passed on when a deployment event is dispatched.\n\nThe `task` parameter is used by the deployment system to allow different execution paths. In the web world this might\nbe `deploy:migrations` to run schema changes on the system. In the compiled world this could be a flag to compile an\napplication with debugging enabled.\n\nUsers with `repo` or `repo_deployment` scopes can create a deployment for a given ref.\n\n#### Merged branch response\nYou will see this response when GitHub automatically merges the base branch into the topic branch instead of creating\na deployment. This auto-merge happens when:\n* Auto-merge option is enabled in the repository\n* Topic branch does not include the latest changes on the base branch, which is `master` in the response example\n* There are no merge conflicts\n\nIf there are no new commits in the base branch, a new request to create a deployment should give a successful\nresponse.\n\n#### Merge conflict response\nThis error happens when the `auto_merge` option is enabled and when the default branch (in this case `master`), can't\nbe merged into the branch that's being deployed (in this case `topic-branch`), due to merge conflicts.\n\n#### Failed commit status checks\nThis error happens when the `required_contexts` parameter indicates that one or more contexts need to have a `success`\nstatus for the commit to be deployed, but one or more of the required contexts do not have a state of `success`.", "tags": [ "repos" ], @@ -226337,7 +226497,7 @@ }, "required_contexts": { "type": "array", - "description": "The [status](https://docs.github.com/enterprise-server@3.2/rest/reference/commits#commit-statuses) contexts to verify against commit status checks. If you omit this parameter, GitHub verifies all unique contexts before creating a deployment. To bypass checking entirely, pass an empty array. Defaults to all unique contexts.", + "description": "The [status](https://docs.github.com/enterprise-server@3.2/rest/commits/statuses) contexts to verify against commit status checks. If you omit this parameter, GitHub verifies all unique contexts before creating a deployment. To bypass checking entirely, pass an empty array. Defaults to all unique contexts.", "items": { "type": "string" } @@ -432788,6 +432948,15 @@ "name" ], "type": "object" + }, + "examples": { + "default": { + "summary": "Create a new project", + "value": { + "name": "My Projects", + "body": "A board to manage my personal projects." + } + } } } } diff --git a/lib/rest/static/dereferenced/ghes-3.3.deref.json b/lib/rest/static/dereferenced/ghes-3.3.deref.json index a376662e5553..9705582d2dfe 100644 --- a/lib/rest/static/dereferenced/ghes-3.3.deref.json +++ b/lib/rest/static/dereferenced/ghes-3.3.deref.json @@ -121072,6 +121072,15 @@ "position" ], "type": "object" + }, + "examples": { + "default": { + "summary": "Move the card to the bottom of the column", + "value": { + "column_id": 42, + "position": "bottom" + } + } } } } @@ -121086,6 +121095,11 @@ "properties": { }, "additionalProperties": false + }, + "examples": { + "default": { + "value": null + } } } } @@ -121522,6 +121536,14 @@ "name" ], "type": "object" + }, + "examples": { + "default": { + "summary": "Rename the project column", + "value": { + "name": "To Do" + } + } } } } @@ -122282,6 +122304,14 @@ ] } ] + }, + "examples": { + "default": { + "summary": "Create a new card", + "value": { + "note": "Add payload for delete Project column" + } + } } } } @@ -122836,6 +122866,14 @@ "position" ], "type": "object" + }, + "examples": { + "default": { + "summary": "Move the column to the end of the board", + "value": { + "position": "last" + } + } } } } @@ -122850,6 +122888,11 @@ "properties": { }, "additionalProperties": false + }, + "examples": { + "default": { + "value": null + } } } } @@ -123436,6 +123479,16 @@ } }, "type": "object" + }, + "examples": { + "default": { + "summary": "Change the name, state, and permissions for a project", + "value": { + "name": "Week One Sprint", + "state": "open", + "organization_permission": "write" + } + } } } } @@ -138421,6 +138474,41 @@ "null" ], "format": "date-time" + }, + "workflow_run": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "examples": [ + 10 + ] + }, + "repository_id": { + "type": "integer", + "examples": [ + 42 + ] + }, + "head_repository_id": { + "type": "integer", + "examples": [ + 42 + ] + }, + "head_branch": { + "type": "string", + "examples": [ + "main" + ] + }, + "head_sha": { + "type": "string", + "examples": [ + "009b8a3a9ccbb128af87f9b1c0f4c62e8a304f6d" + ] + } + } } }, "required": [ @@ -138459,7 +138547,7 @@ { "id": 13, "node_id": "MDg6QXJ0aWZhY3QxMw==", - "name": "", + "name": "Test output", "size_in_bytes": 453, "url": "https://api.github.com/repos/octo-org/octo-docs/actions/artifacts/13", "archive_download_url": "https://api.github.com/repos/octo-org/octo-docs/actions/artifacts/13/zip", @@ -138605,6 +138693,41 @@ "null" ], "format": "date-time" + }, + "workflow_run": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "examples": [ + 10 + ] + }, + "repository_id": { + "type": "integer", + "examples": [ + 42 + ] + }, + "head_repository_id": { + "type": "integer", + "examples": [ + 42 + ] + }, + "head_branch": { + "type": "string", + "examples": [ + "main" + ] + }, + "head_sha": { + "type": "string", + "examples": [ + "009b8a3a9ccbb128af87f9b1c0f4c62e8a304f6d" + ] + } + } } }, "required": [ @@ -153414,6 +153537,41 @@ "null" ], "format": "date-time" + }, + "workflow_run": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "examples": [ + 10 + ] + }, + "repository_id": { + "type": "integer", + "examples": [ + 42 + ] + }, + "head_repository_id": { + "type": "integer", + "examples": [ + 42 + ] + }, + "head_branch": { + "type": "string", + "examples": [ + "main" + ] + }, + "head_sha": { + "type": "string", + "examples": [ + "009b8a3a9ccbb128af87f9b1c0f4c62e8a304f6d" + ] + } + } } }, "required": [ @@ -153452,7 +153610,7 @@ { "id": 13, "node_id": "MDg6QXJ0aWZhY3QxMw==", - "name": "", + "name": "Test output", "size_in_bytes": 453, "url": "https://api.github.com/repos/octo-org/octo-docs/actions/artifacts/13", "archive_download_url": "https://api.github.com/repos/octo-org/octo-docs/actions/artifacts/13/zip", @@ -202361,12 +202519,14 @@ "triage" ], "default": "push" - }, - "permissions": { - "type": "string", - "examples": [ - "\"push\"" - ] + } + } + }, + "examples": { + "new-invitation-is-created": { + "summary": "Add a collaborator with triage permissions", + "value": { + "permission": "triage" } } } @@ -204884,7 +205044,7 @@ ] }, "examples": { - "response-when-a-new-invitation-is-created": { + "new-invitation-is-created": { "value": { "id": 1, "node_id": "MDEwOlJlcG9zaXRvcnkxMjk2MjY5", @@ -229778,7 +229938,7 @@ }, "post": { "summary": "Create a deployment", - "description": "Deployments offer a few configurable parameters with certain defaults.\n\nThe `ref` parameter can be any named branch, tag, or SHA. At GitHub Enterprise Server we often deploy branches and verify them\nbefore we merge a pull request.\n\nThe `environment` parameter allows deployments to be issued to different runtime environments. Teams often have\nmultiple environments for verifying their applications, such as `production`, `staging`, and `qa`. This parameter\nmakes it easier to track which environments have requested deployments. The default environment is `production`.\n\nThe `auto_merge` parameter is used to ensure that the requested ref is not behind the repository's default branch. If\nthe ref _is_ behind the default branch for the repository, we will attempt to merge it for you. If the merge succeeds,\nthe API will return a successful merge commit. If merge conflicts prevent the merge from succeeding, the API will\nreturn a failure response.\n\nBy default, [commit statuses](https://docs.github.com/enterprise-server@3.3/rest/reference/commits#commit-statuses) for every submitted context must be in a `success`\nstate. The `required_contexts` parameter allows you to specify a subset of contexts that must be `success`, or to\nspecify contexts that have not yet been submitted. You are not required to use commit statuses to deploy. If you do\nnot require any contexts or create any commit statuses, the deployment will always succeed.\n\nThe `payload` parameter is available for any extra information that a deployment system might need. It is a JSON text\nfield that will be passed on when a deployment event is dispatched.\n\nThe `task` parameter is used by the deployment system to allow different execution paths. In the web world this might\nbe `deploy:migrations` to run schema changes on the system. In the compiled world this could be a flag to compile an\napplication with debugging enabled.\n\nUsers with `repo` or `repo_deployment` scopes can create a deployment for a given ref.\n\n#### Merged branch response\nYou will see this response when GitHub automatically merges the base branch into the topic branch instead of creating\na deployment. This auto-merge happens when:\n* Auto-merge option is enabled in the repository\n* Topic branch does not include the latest changes on the base branch, which is `master` in the response example\n* There are no merge conflicts\n\nIf there are no new commits in the base branch, a new request to create a deployment should give a successful\nresponse.\n\n#### Merge conflict response\nThis error happens when the `auto_merge` option is enabled and when the default branch (in this case `master`), can't\nbe merged into the branch that's being deployed (in this case `topic-branch`), due to merge conflicts.\n\n#### Failed commit status checks\nThis error happens when the `required_contexts` parameter indicates that one or more contexts need to have a `success`\nstatus for the commit to be deployed, but one or more of the required contexts do not have a state of `success`.", + "description": "Deployments offer a few configurable parameters with certain defaults.\n\nThe `ref` parameter can be any named branch, tag, or SHA. At GitHub Enterprise Server we often deploy branches and verify them\nbefore we merge a pull request.\n\nThe `environment` parameter allows deployments to be issued to different runtime environments. Teams often have\nmultiple environments for verifying their applications, such as `production`, `staging`, and `qa`. This parameter\nmakes it easier to track which environments have requested deployments. The default environment is `production`.\n\nThe `auto_merge` parameter is used to ensure that the requested ref is not behind the repository's default branch. If\nthe ref _is_ behind the default branch for the repository, we will attempt to merge it for you. If the merge succeeds,\nthe API will return a successful merge commit. If merge conflicts prevent the merge from succeeding, the API will\nreturn a failure response.\n\nBy default, [commit statuses](https://docs.github.com/enterprise-server@3.3/rest/commits/statuses) for every submitted context must be in a `success`\nstate. The `required_contexts` parameter allows you to specify a subset of contexts that must be `success`, or to\nspecify contexts that have not yet been submitted. You are not required to use commit statuses to deploy. If you do\nnot require any contexts or create any commit statuses, the deployment will always succeed.\n\nThe `payload` parameter is available for any extra information that a deployment system might need. It is a JSON text\nfield that will be passed on when a deployment event is dispatched.\n\nThe `task` parameter is used by the deployment system to allow different execution paths. In the web world this might\nbe `deploy:migrations` to run schema changes on the system. In the compiled world this could be a flag to compile an\napplication with debugging enabled.\n\nUsers with `repo` or `repo_deployment` scopes can create a deployment for a given ref.\n\n#### Merged branch response\nYou will see this response when GitHub automatically merges the base branch into the topic branch instead of creating\na deployment. This auto-merge happens when:\n* Auto-merge option is enabled in the repository\n* Topic branch does not include the latest changes on the base branch, which is `master` in the response example\n* There are no merge conflicts\n\nIf there are no new commits in the base branch, a new request to create a deployment should give a successful\nresponse.\n\n#### Merge conflict response\nThis error happens when the `auto_merge` option is enabled and when the default branch (in this case `master`), can't\nbe merged into the branch that's being deployed (in this case `topic-branch`), due to merge conflicts.\n\n#### Failed commit status checks\nThis error happens when the `required_contexts` parameter indicates that one or more contexts need to have a `success`\nstatus for the commit to be deployed, but one or more of the required contexts do not have a state of `success`.", "tags": [ "repos" ], @@ -229830,7 +229990,7 @@ }, "required_contexts": { "type": "array", - "description": "The [status](https://docs.github.com/enterprise-server@3.3/rest/reference/commits#commit-statuses) contexts to verify against commit status checks. If you omit this parameter, GitHub verifies all unique contexts before creating a deployment. To bypass checking entirely, pass an empty array. Defaults to all unique contexts.", + "description": "The [status](https://docs.github.com/enterprise-server@3.3/rest/commits/statuses) contexts to verify against commit status checks. If you omit this parameter, GitHub verifies all unique contexts before creating a deployment. To bypass checking entirely, pass an empty array. Defaults to all unique contexts.", "items": { "type": "string" } @@ -436415,6 +436575,15 @@ "name" ], "type": "object" + }, + "examples": { + "default": { + "summary": "Create a new project", + "value": { + "name": "My Projects", + "body": "A board to manage my personal projects." + } + } } } } diff --git a/lib/rest/static/dereferenced/ghes-3.4.deref.json b/lib/rest/static/dereferenced/ghes-3.4.deref.json index f2aa6b83203b..2e0e23116826 100644 --- a/lib/rest/static/dereferenced/ghes-3.4.deref.json +++ b/lib/rest/static/dereferenced/ghes-3.4.deref.json @@ -133102,6 +133102,15 @@ "position" ], "type": "object" + }, + "examples": { + "default": { + "summary": "Move the card to the bottom of the column", + "value": { + "column_id": 42, + "position": "bottom" + } + } } } } @@ -133116,6 +133125,11 @@ "properties": { }, "additionalProperties": false + }, + "examples": { + "default": { + "value": null + } } } } @@ -133552,6 +133566,14 @@ "name" ], "type": "object" + }, + "examples": { + "default": { + "summary": "Rename the project column", + "value": { + "name": "To Do" + } + } } } } @@ -134312,6 +134334,14 @@ ] } ] + }, + "examples": { + "default": { + "summary": "Create a new card", + "value": { + "note": "Add payload for delete Project column" + } + } } } } @@ -134866,6 +134896,14 @@ "position" ], "type": "object" + }, + "examples": { + "default": { + "summary": "Move the column to the end of the board", + "value": { + "position": "last" + } + } } } } @@ -134880,6 +134918,11 @@ "properties": { }, "additionalProperties": false + }, + "examples": { + "default": { + "value": null + } } } } @@ -135466,6 +135509,16 @@ } }, "type": "object" + }, + "examples": { + "default": { + "summary": "Change the name, state, and permissions for a project", + "value": { + "name": "Week One Sprint", + "state": "open", + "organization_permission": "write" + } + } } } } @@ -150451,6 +150504,41 @@ "null" ], "format": "date-time" + }, + "workflow_run": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "examples": [ + 10 + ] + }, + "repository_id": { + "type": "integer", + "examples": [ + 42 + ] + }, + "head_repository_id": { + "type": "integer", + "examples": [ + 42 + ] + }, + "head_branch": { + "type": "string", + "examples": [ + "main" + ] + }, + "head_sha": { + "type": "string", + "examples": [ + "009b8a3a9ccbb128af87f9b1c0f4c62e8a304f6d" + ] + } + } } }, "required": [ @@ -150489,7 +150577,7 @@ { "id": 13, "node_id": "MDg6QXJ0aWZhY3QxMw==", - "name": "", + "name": "Test output", "size_in_bytes": 453, "url": "https://api.github.com/repos/octo-org/octo-docs/actions/artifacts/13", "archive_download_url": "https://api.github.com/repos/octo-org/octo-docs/actions/artifacts/13/zip", @@ -150635,6 +150723,41 @@ "null" ], "format": "date-time" + }, + "workflow_run": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "examples": [ + 10 + ] + }, + "repository_id": { + "type": "integer", + "examples": [ + 42 + ] + }, + "head_repository_id": { + "type": "integer", + "examples": [ + 42 + ] + }, + "head_branch": { + "type": "string", + "examples": [ + "main" + ] + }, + "head_sha": { + "type": "string", + "examples": [ + "009b8a3a9ccbb128af87f9b1c0f4c62e8a304f6d" + ] + } + } } }, "required": [ @@ -166370,6 +166493,41 @@ "null" ], "format": "date-time" + }, + "workflow_run": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "examples": [ + 10 + ] + }, + "repository_id": { + "type": "integer", + "examples": [ + 42 + ] + }, + "head_repository_id": { + "type": "integer", + "examples": [ + 42 + ] + }, + "head_branch": { + "type": "string", + "examples": [ + "main" + ] + }, + "head_sha": { + "type": "string", + "examples": [ + "009b8a3a9ccbb128af87f9b1c0f4c62e8a304f6d" + ] + } + } } }, "required": [ @@ -166408,7 +166566,7 @@ { "id": 13, "node_id": "MDg6QXJ0aWZhY3QxMw==", - "name": "", + "name": "Test output", "size_in_bytes": 453, "url": "https://api.github.com/repos/octo-org/octo-docs/actions/artifacts/13", "archive_download_url": "https://api.github.com/repos/octo-org/octo-docs/actions/artifacts/13/zip", @@ -220583,12 +220741,14 @@ "triage" ], "default": "push" - }, - "permissions": { - "type": "string", - "examples": [ - "\"push\"" - ] + } + } + }, + "examples": { + "new-invitation-is-created": { + "summary": "Add a collaborator with triage permissions", + "value": { + "permission": "triage" } } } @@ -223106,7 +223266,7 @@ ] }, "examples": { - "response-when-a-new-invitation-is-created": { + "new-invitation-is-created": { "value": { "id": 1, "node_id": "MDEwOlJlcG9zaXRvcnkxMjk2MjY5", @@ -248133,7 +248293,7 @@ }, "post": { "summary": "Create a deployment", - "description": "Deployments offer a few configurable parameters with certain defaults.\n\nThe `ref` parameter can be any named branch, tag, or SHA. At GitHub Enterprise Server we often deploy branches and verify them\nbefore we merge a pull request.\n\nThe `environment` parameter allows deployments to be issued to different runtime environments. Teams often have\nmultiple environments for verifying their applications, such as `production`, `staging`, and `qa`. This parameter\nmakes it easier to track which environments have requested deployments. The default environment is `production`.\n\nThe `auto_merge` parameter is used to ensure that the requested ref is not behind the repository's default branch. If\nthe ref _is_ behind the default branch for the repository, we will attempt to merge it for you. If the merge succeeds,\nthe API will return a successful merge commit. If merge conflicts prevent the merge from succeeding, the API will\nreturn a failure response.\n\nBy default, [commit statuses](https://docs.github.com/enterprise-server@3.4/rest/reference/commits#commit-statuses) for every submitted context must be in a `success`\nstate. The `required_contexts` parameter allows you to specify a subset of contexts that must be `success`, or to\nspecify contexts that have not yet been submitted. You are not required to use commit statuses to deploy. If you do\nnot require any contexts or create any commit statuses, the deployment will always succeed.\n\nThe `payload` parameter is available for any extra information that a deployment system might need. It is a JSON text\nfield that will be passed on when a deployment event is dispatched.\n\nThe `task` parameter is used by the deployment system to allow different execution paths. In the web world this might\nbe `deploy:migrations` to run schema changes on the system. In the compiled world this could be a flag to compile an\napplication with debugging enabled.\n\nUsers with `repo` or `repo_deployment` scopes can create a deployment for a given ref.\n\n#### Merged branch response\nYou will see this response when GitHub automatically merges the base branch into the topic branch instead of creating\na deployment. This auto-merge happens when:\n* Auto-merge option is enabled in the repository\n* Topic branch does not include the latest changes on the base branch, which is `master` in the response example\n* There are no merge conflicts\n\nIf there are no new commits in the base branch, a new request to create a deployment should give a successful\nresponse.\n\n#### Merge conflict response\nThis error happens when the `auto_merge` option is enabled and when the default branch (in this case `master`), can't\nbe merged into the branch that's being deployed (in this case `topic-branch`), due to merge conflicts.\n\n#### Failed commit status checks\nThis error happens when the `required_contexts` parameter indicates that one or more contexts need to have a `success`\nstatus for the commit to be deployed, but one or more of the required contexts do not have a state of `success`.", + "description": "Deployments offer a few configurable parameters with certain defaults.\n\nThe `ref` parameter can be any named branch, tag, or SHA. At GitHub Enterprise Server we often deploy branches and verify them\nbefore we merge a pull request.\n\nThe `environment` parameter allows deployments to be issued to different runtime environments. Teams often have\nmultiple environments for verifying their applications, such as `production`, `staging`, and `qa`. This parameter\nmakes it easier to track which environments have requested deployments. The default environment is `production`.\n\nThe `auto_merge` parameter is used to ensure that the requested ref is not behind the repository's default branch. If\nthe ref _is_ behind the default branch for the repository, we will attempt to merge it for you. If the merge succeeds,\nthe API will return a successful merge commit. If merge conflicts prevent the merge from succeeding, the API will\nreturn a failure response.\n\nBy default, [commit statuses](https://docs.github.com/enterprise-server@3.4/rest/commits/statuses) for every submitted context must be in a `success`\nstate. The `required_contexts` parameter allows you to specify a subset of contexts that must be `success`, or to\nspecify contexts that have not yet been submitted. You are not required to use commit statuses to deploy. If you do\nnot require any contexts or create any commit statuses, the deployment will always succeed.\n\nThe `payload` parameter is available for any extra information that a deployment system might need. It is a JSON text\nfield that will be passed on when a deployment event is dispatched.\n\nThe `task` parameter is used by the deployment system to allow different execution paths. In the web world this might\nbe `deploy:migrations` to run schema changes on the system. In the compiled world this could be a flag to compile an\napplication with debugging enabled.\n\nUsers with `repo` or `repo_deployment` scopes can create a deployment for a given ref.\n\n#### Merged branch response\nYou will see this response when GitHub automatically merges the base branch into the topic branch instead of creating\na deployment. This auto-merge happens when:\n* Auto-merge option is enabled in the repository\n* Topic branch does not include the latest changes on the base branch, which is `master` in the response example\n* There are no merge conflicts\n\nIf there are no new commits in the base branch, a new request to create a deployment should give a successful\nresponse.\n\n#### Merge conflict response\nThis error happens when the `auto_merge` option is enabled and when the default branch (in this case `master`), can't\nbe merged into the branch that's being deployed (in this case `topic-branch`), due to merge conflicts.\n\n#### Failed commit status checks\nThis error happens when the `required_contexts` parameter indicates that one or more contexts need to have a `success`\nstatus for the commit to be deployed, but one or more of the required contexts do not have a state of `success`.", "tags": [ "repos" ], @@ -248185,7 +248345,7 @@ }, "required_contexts": { "type": "array", - "description": "The [status](https://docs.github.com/enterprise-server@3.4/rest/reference/commits#commit-statuses) contexts to verify against commit status checks. If you omit this parameter, GitHub verifies all unique contexts before creating a deployment. To bypass checking entirely, pass an empty array. Defaults to all unique contexts.", + "description": "The [status](https://docs.github.com/enterprise-server@3.4/rest/commits/statuses) contexts to verify against commit status checks. If you omit this parameter, GitHub verifies all unique contexts before creating a deployment. To bypass checking entirely, pass an empty array. Defaults to all unique contexts.", "items": { "type": "string" } @@ -461353,6 +461513,15 @@ "name" ], "type": "object" + }, + "examples": { + "default": { + "summary": "Create a new project", + "value": { + "name": "My Projects", + "body": "A board to manage my personal projects." + } + } } } } diff --git a/lib/rest/static/dereferenced/ghes-3.5.deref.json b/lib/rest/static/dereferenced/ghes-3.5.deref.json index bb8e48de46ff..7059b32f1513 100644 --- a/lib/rest/static/dereferenced/ghes-3.5.deref.json +++ b/lib/rest/static/dereferenced/ghes-3.5.deref.json @@ -137381,6 +137381,15 @@ "position" ], "type": "object" + }, + "examples": { + "default": { + "summary": "Move the card to the bottom of the column", + "value": { + "column_id": 42, + "position": "bottom" + } + } } } } @@ -137395,6 +137404,11 @@ "properties": { }, "additionalProperties": false + }, + "examples": { + "default": { + "value": null + } } } } @@ -137831,6 +137845,14 @@ "name" ], "type": "object" + }, + "examples": { + "default": { + "summary": "Rename the project column", + "value": { + "name": "To Do" + } + } } } } @@ -138591,6 +138613,14 @@ ] } ] + }, + "examples": { + "default": { + "summary": "Create a new card", + "value": { + "note": "Add payload for delete Project column" + } + } } } } @@ -139145,6 +139175,14 @@ "position" ], "type": "object" + }, + "examples": { + "default": { + "summary": "Move the column to the end of the board", + "value": { + "position": "last" + } + } } } } @@ -139159,6 +139197,11 @@ "properties": { }, "additionalProperties": false + }, + "examples": { + "default": { + "value": null + } } } } @@ -139745,6 +139788,16 @@ } }, "type": "object" + }, + "examples": { + "default": { + "summary": "Change the name, state, and permissions for a project", + "value": { + "name": "Week One Sprint", + "state": "open", + "organization_permission": "write" + } + } } } } @@ -154610,6 +154663,41 @@ "null" ], "format": "date-time" + }, + "workflow_run": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "examples": [ + 10 + ] + }, + "repository_id": { + "type": "integer", + "examples": [ + 42 + ] + }, + "head_repository_id": { + "type": "integer", + "examples": [ + 42 + ] + }, + "head_branch": { + "type": "string", + "examples": [ + "main" + ] + }, + "head_sha": { + "type": "string", + "examples": [ + "009b8a3a9ccbb128af87f9b1c0f4c62e8a304f6d" + ] + } + } } }, "required": [ @@ -154648,7 +154736,7 @@ { "id": 13, "node_id": "MDg6QXJ0aWZhY3QxMw==", - "name": "", + "name": "Test output", "size_in_bytes": 453, "url": "https://api.github.com/repos/octo-org/octo-docs/actions/artifacts/13", "archive_download_url": "https://api.github.com/repos/octo-org/octo-docs/actions/artifacts/13/zip", @@ -154794,6 +154882,41 @@ "null" ], "format": "date-time" + }, + "workflow_run": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "examples": [ + 10 + ] + }, + "repository_id": { + "type": "integer", + "examples": [ + 42 + ] + }, + "head_repository_id": { + "type": "integer", + "examples": [ + 42 + ] + }, + "head_branch": { + "type": "string", + "examples": [ + "main" + ] + }, + "head_sha": { + "type": "string", + "examples": [ + "009b8a3a9ccbb128af87f9b1c0f4c62e8a304f6d" + ] + } + } } }, "required": [ @@ -171830,6 +171953,41 @@ "null" ], "format": "date-time" + }, + "workflow_run": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "examples": [ + 10 + ] + }, + "repository_id": { + "type": "integer", + "examples": [ + 42 + ] + }, + "head_repository_id": { + "type": "integer", + "examples": [ + 42 + ] + }, + "head_branch": { + "type": "string", + "examples": [ + "main" + ] + }, + "head_sha": { + "type": "string", + "examples": [ + "009b8a3a9ccbb128af87f9b1c0f4c62e8a304f6d" + ] + } + } } }, "required": [ @@ -171868,7 +172026,7 @@ { "id": 13, "node_id": "MDg6QXJ0aWZhY3QxMw==", - "name": "", + "name": "Test output", "size_in_bytes": 453, "url": "https://api.github.com/repos/octo-org/octo-docs/actions/artifacts/13", "archive_download_url": "https://api.github.com/repos/octo-org/octo-docs/actions/artifacts/13/zip", @@ -232542,12 +232700,14 @@ "triage" ], "default": "push" - }, - "permissions": { - "type": "string", - "examples": [ - "\"push\"" - ] + } + } + }, + "examples": { + "new-invitation-is-created": { + "summary": "Add a collaborator with triage permissions", + "value": { + "permission": "triage" } } } @@ -235071,7 +235231,7 @@ ] }, "examples": { - "response-when-a-new-invitation-is-created": { + "new-invitation-is-created": { "value": { "id": 1, "node_id": "MDEwOlJlcG9zaXRvcnkxMjk2MjY5", @@ -260124,7 +260284,7 @@ }, "post": { "summary": "Create a deployment", - "description": "Deployments offer a few configurable parameters with certain defaults.\n\nThe `ref` parameter can be any named branch, tag, or SHA. At GitHub Enterprise Server we often deploy branches and verify them\nbefore we merge a pull request.\n\nThe `environment` parameter allows deployments to be issued to different runtime environments. Teams often have\nmultiple environments for verifying their applications, such as `production`, `staging`, and `qa`. This parameter\nmakes it easier to track which environments have requested deployments. The default environment is `production`.\n\nThe `auto_merge` parameter is used to ensure that the requested ref is not behind the repository's default branch. If\nthe ref _is_ behind the default branch for the repository, we will attempt to merge it for you. If the merge succeeds,\nthe API will return a successful merge commit. If merge conflicts prevent the merge from succeeding, the API will\nreturn a failure response.\n\nBy default, [commit statuses](https://docs.github.com/enterprise-server@3.5/rest/reference/commits#commit-statuses) for every submitted context must be in a `success`\nstate. The `required_contexts` parameter allows you to specify a subset of contexts that must be `success`, or to\nspecify contexts that have not yet been submitted. You are not required to use commit statuses to deploy. If you do\nnot require any contexts or create any commit statuses, the deployment will always succeed.\n\nThe `payload` parameter is available for any extra information that a deployment system might need. It is a JSON text\nfield that will be passed on when a deployment event is dispatched.\n\nThe `task` parameter is used by the deployment system to allow different execution paths. In the web world this might\nbe `deploy:migrations` to run schema changes on the system. In the compiled world this could be a flag to compile an\napplication with debugging enabled.\n\nUsers with `repo` or `repo_deployment` scopes can create a deployment for a given ref.\n\n#### Merged branch response\nYou will see this response when GitHub automatically merges the base branch into the topic branch instead of creating\na deployment. This auto-merge happens when:\n* Auto-merge option is enabled in the repository\n* Topic branch does not include the latest changes on the base branch, which is `master` in the response example\n* There are no merge conflicts\n\nIf there are no new commits in the base branch, a new request to create a deployment should give a successful\nresponse.\n\n#### Merge conflict response\nThis error happens when the `auto_merge` option is enabled and when the default branch (in this case `master`), can't\nbe merged into the branch that's being deployed (in this case `topic-branch`), due to merge conflicts.\n\n#### Failed commit status checks\nThis error happens when the `required_contexts` parameter indicates that one or more contexts need to have a `success`\nstatus for the commit to be deployed, but one or more of the required contexts do not have a state of `success`.", + "description": "Deployments offer a few configurable parameters with certain defaults.\n\nThe `ref` parameter can be any named branch, tag, or SHA. At GitHub Enterprise Server we often deploy branches and verify them\nbefore we merge a pull request.\n\nThe `environment` parameter allows deployments to be issued to different runtime environments. Teams often have\nmultiple environments for verifying their applications, such as `production`, `staging`, and `qa`. This parameter\nmakes it easier to track which environments have requested deployments. The default environment is `production`.\n\nThe `auto_merge` parameter is used to ensure that the requested ref is not behind the repository's default branch. If\nthe ref _is_ behind the default branch for the repository, we will attempt to merge it for you. If the merge succeeds,\nthe API will return a successful merge commit. If merge conflicts prevent the merge from succeeding, the API will\nreturn a failure response.\n\nBy default, [commit statuses](https://docs.github.com/enterprise-server@3.5/rest/commits/statuses) for every submitted context must be in a `success`\nstate. The `required_contexts` parameter allows you to specify a subset of contexts that must be `success`, or to\nspecify contexts that have not yet been submitted. You are not required to use commit statuses to deploy. If you do\nnot require any contexts or create any commit statuses, the deployment will always succeed.\n\nThe `payload` parameter is available for any extra information that a deployment system might need. It is a JSON text\nfield that will be passed on when a deployment event is dispatched.\n\nThe `task` parameter is used by the deployment system to allow different execution paths. In the web world this might\nbe `deploy:migrations` to run schema changes on the system. In the compiled world this could be a flag to compile an\napplication with debugging enabled.\n\nUsers with `repo` or `repo_deployment` scopes can create a deployment for a given ref.\n\n#### Merged branch response\nYou will see this response when GitHub automatically merges the base branch into the topic branch instead of creating\na deployment. This auto-merge happens when:\n* Auto-merge option is enabled in the repository\n* Topic branch does not include the latest changes on the base branch, which is `master` in the response example\n* There are no merge conflicts\n\nIf there are no new commits in the base branch, a new request to create a deployment should give a successful\nresponse.\n\n#### Merge conflict response\nThis error happens when the `auto_merge` option is enabled and when the default branch (in this case `master`), can't\nbe merged into the branch that's being deployed (in this case `topic-branch`), due to merge conflicts.\n\n#### Failed commit status checks\nThis error happens when the `required_contexts` parameter indicates that one or more contexts need to have a `success`\nstatus for the commit to be deployed, but one or more of the required contexts do not have a state of `success`.", "tags": [ "repos" ], @@ -260176,7 +260336,7 @@ }, "required_contexts": { "type": "array", - "description": "The [status](https://docs.github.com/enterprise-server@3.5/rest/reference/commits#commit-statuses) contexts to verify against commit status checks. If you omit this parameter, GitHub verifies all unique contexts before creating a deployment. To bypass checking entirely, pass an empty array. Defaults to all unique contexts.", + "description": "The [status](https://docs.github.com/enterprise-server@3.5/rest/commits/statuses) contexts to verify against commit status checks. If you omit this parameter, GitHub verifies all unique contexts before creating a deployment. To bypass checking entirely, pass an empty array. Defaults to all unique contexts.", "items": { "type": "string" } @@ -473865,6 +474025,15 @@ "name" ], "type": "object" + }, + "examples": { + "default": { + "summary": "Create a new project", + "value": { + "name": "My Projects", + "body": "A board to manage my personal projects." + } + } } } } diff --git a/lib/rest/static/dereferenced/github.ae.deref.json b/lib/rest/static/dereferenced/github.ae.deref.json index 52d5a13afedf..71c948efd151 100644 --- a/lib/rest/static/dereferenced/github.ae.deref.json +++ b/lib/rest/static/dereferenced/github.ae.deref.json @@ -96225,6 +96225,15 @@ "position" ], "type": "object" + }, + "examples": { + "default": { + "summary": "Move the card to the bottom of the column", + "value": { + "column_id": 42, + "position": "bottom" + } + } } } } @@ -96239,6 +96248,11 @@ "properties": { }, "additionalProperties": false + }, + "examples": { + "default": { + "value": null + } } } } @@ -96675,6 +96689,14 @@ "name" ], "type": "object" + }, + "examples": { + "default": { + "summary": "Rename the project column", + "value": { + "name": "To Do" + } + } } } } @@ -97435,6 +97457,14 @@ ] } ] + }, + "examples": { + "default": { + "summary": "Create a new card", + "value": { + "note": "Add payload for delete Project column" + } + } } } } @@ -97989,6 +98019,14 @@ "position" ], "type": "object" + }, + "examples": { + "default": { + "summary": "Move the column to the end of the board", + "value": { + "position": "last" + } + } } } } @@ -98003,6 +98041,11 @@ "properties": { }, "additionalProperties": false + }, + "examples": { + "default": { + "value": null + } } } } @@ -98589,6 +98632,16 @@ } }, "type": "object" + }, + "examples": { + "default": { + "summary": "Change the name, state, and permissions for a project", + "value": { + "name": "Week One Sprint", + "state": "open", + "organization_permission": "write" + } + } } } } @@ -113454,6 +113507,41 @@ "null" ], "format": "date-time" + }, + "workflow_run": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "examples": [ + 10 + ] + }, + "repository_id": { + "type": "integer", + "examples": [ + 42 + ] + }, + "head_repository_id": { + "type": "integer", + "examples": [ + 42 + ] + }, + "head_branch": { + "type": "string", + "examples": [ + "main" + ] + }, + "head_sha": { + "type": "string", + "examples": [ + "009b8a3a9ccbb128af87f9b1c0f4c62e8a304f6d" + ] + } + } } }, "required": [ @@ -113487,19 +113575,33 @@ "expired": false, "created_at": "2020-01-10T14:59:22Z", "expires_at": "2020-03-21T14:59:22Z", - "updated_at": "2020-02-21T14:59:22Z" + "updated_at": "2020-02-21T14:59:22Z", + "workflow_run": { + "id": 2332938, + "repository_id": 1296269, + "head_repository_id": 1296269, + "head_branch": "main", + "head_sha": "328faa0536e6fef19753d9d91dc96a9931694ce3" + } }, { "id": 13, "node_id": "MDg6QXJ0aWZhY3QxMw==", - "name": "", + "name": "Test output", "size_in_bytes": 453, "url": "https://api.github.com/repos/octo-org/octo-docs/actions/artifacts/13", "archive_download_url": "https://api.github.com/repos/octo-org/octo-docs/actions/artifacts/13/zip", "expired": false, "created_at": "2020-01-10T14:59:22Z", "expires_at": "2020-03-21T14:59:22Z", - "updated_at": "2020-02-21T14:59:22Z" + "updated_at": "2020-02-21T14:59:22Z", + "workflow_run": { + "id": 2332942, + "repository_id": 1296269, + "head_repository_id": 1296269, + "head_branch": "main", + "head_sha": "178f4f6090b3fccad4a65b3e83d076a622d59652" + } } ] } @@ -113638,6 +113740,41 @@ "null" ], "format": "date-time" + }, + "workflow_run": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "examples": [ + 10 + ] + }, + "repository_id": { + "type": "integer", + "examples": [ + 42 + ] + }, + "head_repository_id": { + "type": "integer", + "examples": [ + 42 + ] + }, + "head_branch": { + "type": "string", + "examples": [ + "main" + ] + }, + "head_sha": { + "type": "string", + "examples": [ + "009b8a3a9ccbb128af87f9b1c0f4c62e8a304f6d" + ] + } + } } }, "required": [ @@ -113665,7 +113802,14 @@ "expired": false, "created_at": "2020-01-10T14:59:22Z", "expires_at": "2020-01-21T14:59:22Z", - "updated_at": "2020-01-21T14:59:22Z" + "updated_at": "2020-01-21T14:59:22Z", + "workflow_run": { + "id": 2332938, + "repository_id": 1296269, + "head_repository_id": 1296269, + "head_branch": "main", + "head_sha": "328faa0536e6fef19753d9d91dc96a9931694ce3" + } } } } @@ -128966,6 +129110,41 @@ "null" ], "format": "date-time" + }, + "workflow_run": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "examples": [ + 10 + ] + }, + "repository_id": { + "type": "integer", + "examples": [ + 42 + ] + }, + "head_repository_id": { + "type": "integer", + "examples": [ + 42 + ] + }, + "head_branch": { + "type": "string", + "examples": [ + "main" + ] + }, + "head_sha": { + "type": "string", + "examples": [ + "009b8a3a9ccbb128af87f9b1c0f4c62e8a304f6d" + ] + } + } } }, "required": [ @@ -128999,19 +129178,33 @@ "expired": false, "created_at": "2020-01-10T14:59:22Z", "expires_at": "2020-03-21T14:59:22Z", - "updated_at": "2020-02-21T14:59:22Z" + "updated_at": "2020-02-21T14:59:22Z", + "workflow_run": { + "id": 2332938, + "repository_id": 1296269, + "head_repository_id": 1296269, + "head_branch": "main", + "head_sha": "328faa0536e6fef19753d9d91dc96a9931694ce3" + } }, { "id": 13, "node_id": "MDg6QXJ0aWZhY3QxMw==", - "name": "", + "name": "Test output", "size_in_bytes": 453, "url": "https://api.github.com/repos/octo-org/octo-docs/actions/artifacts/13", "archive_download_url": "https://api.github.com/repos/octo-org/octo-docs/actions/artifacts/13/zip", "expired": false, "created_at": "2020-01-10T14:59:22Z", "expires_at": "2020-03-21T14:59:22Z", - "updated_at": "2020-02-21T14:59:22Z" + "updated_at": "2020-02-21T14:59:22Z", + "workflow_run": { + "id": 2332942, + "repository_id": 1296269, + "head_repository_id": 1296269, + "head_branch": "main", + "head_sha": "178f4f6090b3fccad4a65b3e83d076a622d59652" + } } ] } @@ -185570,12 +185763,14 @@ "triage" ], "default": "push" - }, - "permissions": { - "type": "string", - "examples": [ - "\"push\"" - ] + } + } + }, + "examples": { + "new-invitation-is-created": { + "summary": "Add a collaborator with triage permissions", + "value": { + "permission": "triage" } } } @@ -188099,7 +188294,7 @@ ] }, "examples": { - "response-when-a-new-invitation-is-created": { + "new-invitation-is-created": { "value": { "id": 1, "node_id": "MDEwOlJlcG9zaXRvcnkxMjk2MjY5", @@ -212731,7 +212926,7 @@ }, "post": { "summary": "Create a deployment", - "description": "Deployments offer a few configurable parameters with certain defaults.\n\nThe `ref` parameter can be any named branch, tag, or SHA. At GitHub AE we often deploy branches and verify them\nbefore we merge a pull request.\n\nThe `environment` parameter allows deployments to be issued to different runtime environments. Teams often have\nmultiple environments for verifying their applications, such as `production`, `staging`, and `qa`. This parameter\nmakes it easier to track which environments have requested deployments. The default environment is `production`.\n\nThe `auto_merge` parameter is used to ensure that the requested ref is not behind the repository's default branch. If\nthe ref _is_ behind the default branch for the repository, we will attempt to merge it for you. If the merge succeeds,\nthe API will return a successful merge commit. If merge conflicts prevent the merge from succeeding, the API will\nreturn a failure response.\n\nBy default, [commit statuses](https://docs.github.com/github-ae@latest/rest/reference/commits#commit-statuses) for every submitted context must be in a `success`\nstate. The `required_contexts` parameter allows you to specify a subset of contexts that must be `success`, or to\nspecify contexts that have not yet been submitted. You are not required to use commit statuses to deploy. If you do\nnot require any contexts or create any commit statuses, the deployment will always succeed.\n\nThe `payload` parameter is available for any extra information that a deployment system might need. It is a JSON text\nfield that will be passed on when a deployment event is dispatched.\n\nThe `task` parameter is used by the deployment system to allow different execution paths. In the web world this might\nbe `deploy:migrations` to run schema changes on the system. In the compiled world this could be a flag to compile an\napplication with debugging enabled.\n\nUsers with `repo` or `repo_deployment` scopes can create a deployment for a given ref.\n\n#### Merged branch response\nYou will see this response when GitHub automatically merges the base branch into the topic branch instead of creating\na deployment. This auto-merge happens when:\n* Auto-merge option is enabled in the repository\n* Topic branch does not include the latest changes on the base branch, which is `master` in the response example\n* There are no merge conflicts\n\nIf there are no new commits in the base branch, a new request to create a deployment should give a successful\nresponse.\n\n#### Merge conflict response\nThis error happens when the `auto_merge` option is enabled and when the default branch (in this case `master`), can't\nbe merged into the branch that's being deployed (in this case `topic-branch`), due to merge conflicts.\n\n#### Failed commit status checks\nThis error happens when the `required_contexts` parameter indicates that one or more contexts need to have a `success`\nstatus for the commit to be deployed, but one or more of the required contexts do not have a state of `success`.", + "description": "Deployments offer a few configurable parameters with certain defaults.\n\nThe `ref` parameter can be any named branch, tag, or SHA. At GitHub AE we often deploy branches and verify them\nbefore we merge a pull request.\n\nThe `environment` parameter allows deployments to be issued to different runtime environments. Teams often have\nmultiple environments for verifying their applications, such as `production`, `staging`, and `qa`. This parameter\nmakes it easier to track which environments have requested deployments. The default environment is `production`.\n\nThe `auto_merge` parameter is used to ensure that the requested ref is not behind the repository's default branch. If\nthe ref _is_ behind the default branch for the repository, we will attempt to merge it for you. If the merge succeeds,\nthe API will return a successful merge commit. If merge conflicts prevent the merge from succeeding, the API will\nreturn a failure response.\n\nBy default, [commit statuses](https://docs.github.com/github-ae@latest/rest/commits/statuses) for every submitted context must be in a `success`\nstate. The `required_contexts` parameter allows you to specify a subset of contexts that must be `success`, or to\nspecify contexts that have not yet been submitted. You are not required to use commit statuses to deploy. If you do\nnot require any contexts or create any commit statuses, the deployment will always succeed.\n\nThe `payload` parameter is available for any extra information that a deployment system might need. It is a JSON text\nfield that will be passed on when a deployment event is dispatched.\n\nThe `task` parameter is used by the deployment system to allow different execution paths. In the web world this might\nbe `deploy:migrations` to run schema changes on the system. In the compiled world this could be a flag to compile an\napplication with debugging enabled.\n\nUsers with `repo` or `repo_deployment` scopes can create a deployment for a given ref.\n\n#### Merged branch response\nYou will see this response when GitHub automatically merges the base branch into the topic branch instead of creating\na deployment. This auto-merge happens when:\n* Auto-merge option is enabled in the repository\n* Topic branch does not include the latest changes on the base branch, which is `master` in the response example\n* There are no merge conflicts\n\nIf there are no new commits in the base branch, a new request to create a deployment should give a successful\nresponse.\n\n#### Merge conflict response\nThis error happens when the `auto_merge` option is enabled and when the default branch (in this case `master`), can't\nbe merged into the branch that's being deployed (in this case `topic-branch`), due to merge conflicts.\n\n#### Failed commit status checks\nThis error happens when the `required_contexts` parameter indicates that one or more contexts need to have a `success`\nstatus for the commit to be deployed, but one or more of the required contexts do not have a state of `success`.", "tags": [ "repos" ], @@ -212783,7 +212978,7 @@ }, "required_contexts": { "type": "array", - "description": "The [status](https://docs.github.com/github-ae@latest/rest/reference/commits#commit-statuses) contexts to verify against commit status checks. If you omit this parameter, GitHub verifies all unique contexts before creating a deployment. To bypass checking entirely, pass an empty array. Defaults to all unique contexts.", + "description": "The [status](https://docs.github.com/github-ae@latest/rest/commits/statuses) contexts to verify against commit status checks. If you omit this parameter, GitHub verifies all unique contexts before creating a deployment. To bypass checking entirely, pass an empty array. Defaults to all unique contexts.", "items": { "type": "string" } @@ -419702,6 +419897,15 @@ "name" ], "type": "object" + }, + "examples": { + "default": { + "summary": "Create a new project", + "value": { + "name": "My Projects", + "body": "A board to manage my personal projects." + } + } } } } diff --git a/package-lock.json b/package-lock.json index a2e8d362f6ca..dcfd2617b743 100644 --- a/package-lock.json +++ b/package-lock.json @@ -161,6 +161,7 @@ "start-server-and-test": "^1.14.0", "strip-ansi": "^7.0.1", "supertest": "^6.2.2", + "tough-cookie": "4.0.0", "typescript": "^4.5.5" }, "engines": { diff --git a/package.json b/package.json index 68450359b95b..3fb4167f7cf7 100644 --- a/package.json +++ b/package.json @@ -163,6 +163,7 @@ "start-server-and-test": "^1.14.0", "strip-ansi": "^7.0.1", "supertest": "^6.2.2", + "tough-cookie": "4.0.0", "typescript": "^4.5.5" }, "engines": { diff --git a/tests/helpers/e2etest.js b/tests/helpers/e2etest.js index e666bd4d7fb3..928234a551a4 100644 --- a/tests/helpers/e2etest.js +++ b/tests/helpers/e2etest.js @@ -9,6 +9,7 @@ export async function get( followRedirects: false, followAllRedirects: false, headers: {}, + cookieJar: undefined, } ) { const method = opts.method || 'get' @@ -19,6 +20,7 @@ export async function get( body: opts.body, headers: opts.headers, retry: { limit: 0 }, + cookieJar: opts.cookieJar, throwHttpErrors: false, followRedirect: opts.followAllRedirects || opts.followRedirects, }) @@ -55,9 +57,14 @@ export function post(route, opts) { export async function getDOM( route, - { headers, allow500s, allow404 } = { headers: undefined, allow500s: false, allow404: false } + { headers, allow500s, allow404, cookieJar } = { + headers: undefined, + allow500s: false, + allow404: false, + cookieJar: undefined, + } ) { - const res = await get(route, { followRedirects: true, headers }) + const res = await get(route, { followRedirects: true, headers, cookieJar }) if (!allow500s && res.status >= 500) { throw new Error(`Server error (${res.status}) on ${route}`) } diff --git a/tests/unit/events.js b/tests/routing/events.js similarity index 91% rename from tests/unit/events.js rename to tests/routing/events.js index d06ac2719601..5e15ee61be19 100644 --- a/tests/unit/events.js +++ b/tests/routing/events.js @@ -1,47 +1,30 @@ -import request from 'supertest' -import nock from 'nock' -import cheerio from 'cheerio' -import createApp from '../../lib/app.js' -import { jest } from '@jest/globals' - -jest.useFakeTimers('legacy') +import { expect, jest } from '@jest/globals' +import { CookieJar } from 'tough-cookie' +import { getDOM, post } from '../helpers/e2etest.js' describe('POST /events', () => { jest.setTimeout(60 * 1000) - const app = createApp() let csrfToken = '' - let agent + const cookieJar = new CookieJar() beforeEach(async () => { - process.env.AIRTABLE_API_KEY = '$AIRTABLE_API_KEY$' - process.env.AIRTABLE_BASE_KEY = '$AIRTABLE_BASE_KEY$' - process.env.HYDRO_SECRET = '$HYDRO_SECRET$' - process.env.HYDRO_ENDPOINT = 'http://example.com/hydro' - agent = request.agent(app) - const csrfRes = await agent.get('/en') - const $ = cheerio.load(csrfRes.text || '', { xmlMode: true }) + const $ = await getDOM('/en', { cookieJar }) csrfToken = $('meta[name="csrf-token"]').attr('content') - nock('http://example.com').post('/hydro').reply(200, {}) - }) - - afterEach(() => { - delete process.env.AIRTABLE_API_KEY - delete process.env.AIRTABLE_BASE_KEY - delete process.env.HYDRO_SECRET - delete process.env.HYDRO_ENDPOINT - csrfToken = '' - - nock.cleanAll() }) async function checkEvent(data, code) { - return agent - .post('/events') - .send(data) - .set('Accept', 'application/json') - .set('csrf-token', csrfToken) - .expect(code) + const combined = Object.assign({ _csrf: csrfToken }, data) + const body = JSON.stringify(combined) + const res = await post('/events', { + body, + headers: { + 'content-type': 'application/json', + 'csrf-token': csrfToken, + }, + cookieJar, + }) + expect(res.statusCode).toBe(code) } const baseExample = { diff --git a/tests/unit/hydro.js b/tests/unit/hydro.js index 3985154a71ef..ce9907170c04 100644 --- a/tests/unit/hydro.js +++ b/tests/unit/hydro.js @@ -1,3 +1,4 @@ +import { afterEach } from '@jest/globals' import nock from 'nock' import Hydro from '../../lib/hydro.js' @@ -5,7 +6,14 @@ describe('hydro', () => { let hydro, params beforeEach(() => { - hydro = new Hydro({ secret: '123', endpoint: 'https://real-hydro.com' }) + hydro = new Hydro({ + secret: '123', + endpoint: 'https://real-hydro.com', + // When jest tests run, `NODE_ENV==='test'` so the actualy `got()` + // calls inside the Hydro class would be prevented. + // Setting this to true will prevent that second-layer protection. + forceDisableMock: true, + }) nock(hydro.endpoint, { reqheaders: { @@ -21,6 +29,11 @@ describe('hydro', () => { }) }) + afterEach(() => { + // Gotta always clean up after activating `nock`. + nock.cleanAll() + }) + describe('#publish', () => { it('publishes a single event to Hydro', async () => { await hydro.publish('event-name', { pizza: true })