diff --git a/descriptions-next/api.github.com/api.github.com.json b/descriptions-next/api.github.com/api.github.com.json index febfec7182..254f80b1ae 100644 --- a/descriptions-next/api.github.com/api.github.com.json +++ b/descriptions-next/api.github.com/api.github.com.json @@ -6871,7 +6871,7 @@ "/organizations/{organization_id}/custom_roles": { "get": { "summary": "List custom repository roles in an organization", - "description": "List the custom repository roles available in this organization. In order to see custom\nrepository roles in an organization, the authenticated user must be an organization owner.\n\nFor more information on custom repository roles, see \"[Managing custom repository roles for an organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-custom-repository-roles-for-an-organization)\".", + "description": "List the custom repository roles available in this organization. In order to see custom\nrepository roles in an organization, the authenticated user must be an organization owner.\n\nTo use this endpoint the authenticated user must be an administrator for the organization or of an repository of the organizaiton and must use an access token with `admin:org repo` scope.\nGitHub Apps must have the `organization_custom_roles:read` organization permission to use this endpoint.\n\nFor more information on custom repository roles, see \"[Managing custom repository roles for an organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-custom-repository-roles-for-an-organization)\".", "tags": [ "orgs" ], @@ -23251,6 +23251,11 @@ "application/json": { "schema": { "$ref": "#/components/schemas/branch-with-protection" + }, + "examples": { + "default": { + "$ref": "#/components/examples/branch-get" + } } } } @@ -23601,6 +23606,11 @@ "application/json": { "schema": { "$ref": "#/components/schemas/protected-branch" + }, + "examples": { + "default": { + "$ref": "#/components/examples/branch-protection-update" + } } } } @@ -24450,7 +24460,7 @@ "properties": { "contexts": { "type": "array", - "description": "contexts parameter", + "description": "The name of the status checks", "items": { "type": "string" } @@ -24467,12 +24477,23 @@ }, { "type": "array", - "description": "contexts parameter", + "description": "The name of the status checks", "items": { "type": "string" } } ] + }, + "examples": { + "default": { + "summary": "Example adding status checks to a branch protection rule", + "value": { + "contexts": [ + "continuous-integration/travis-ci", + "continuous-integration/jenkins" + ] + } + } } } } @@ -24550,7 +24571,7 @@ "properties": { "contexts": { "type": "array", - "description": "contexts parameter", + "description": "The name of the status checks", "items": { "type": "string" } @@ -24567,12 +24588,22 @@ }, { "type": "array", - "description": "contexts parameter", + "description": "The name of the status checks", "items": { "type": "string" } } ] + }, + "examples": { + "default": { + "summary": "Example updating status checks for a branch protection rule", + "value": { + "contexts": [ + "continuous-integration/travis-ci" + ] + } + } } } } @@ -24645,7 +24676,7 @@ "properties": { "contexts": { "type": "array", - "description": "contexts parameter", + "description": "The name of the status checks", "items": { "type": "string" } @@ -24662,12 +24693,22 @@ }, { "type": "array", - "description": "contexts parameter", + "description": "The name of the status checks", "items": { "type": "string" } } ] + }, + "examples": { + "default": { + "summary": "Example removing status checks from a branch protection rule", + "value": { + "contexts": [ + "continuous-integration/travis-ci" + ] + } + } } } } @@ -25203,7 +25244,7 @@ "properties": { "teams": { "type": "array", - "description": "teams parameter", + "description": "The slug values for teams", "items": { "type": "string" } @@ -25220,12 +25261,22 @@ }, { "type": "array", - "description": "teams parameter", + "description": "The slug values for teams", "items": { "type": "string" } } ] + }, + "examples": { + "default": { + "summary": "Example adding a team in a branch protection rule", + "value": { + "teams": [ + "justice-league" + ] + } + } } } } @@ -25294,7 +25345,7 @@ "properties": { "teams": { "type": "array", - "description": "teams parameter", + "description": "The slug values for teams", "items": { "type": "string" } @@ -25305,18 +25356,28 @@ ], "example": { "teams": [ - "my-team" + "justice-league" ] } }, { "type": "array", - "description": "teams parameter", + "description": "The slug values for teams", "items": { "type": "string" } } ] + }, + "examples": { + "default": { + "summary": "Example replacing a team in a branch protection rule", + "value": { + "teams": [ + "justice-league" + ] + } + } } } } @@ -25384,7 +25445,7 @@ "properties": { "teams": { "type": "array", - "description": "teams parameter", + "description": "The slug values for teams", "items": { "type": "string" } @@ -25401,12 +25462,22 @@ }, { "type": "array", - "description": "teams parameter", + "description": "The slug values for teams", "items": { "type": "string" } } ] + }, + "examples": { + "default": { + "summary": "Example removing a team in a branch protection rule", + "value": { + "teams": [ + "justice-league" + ] + } + } } } } @@ -25529,7 +25600,7 @@ "properties": { "users": { "type": "array", - "description": "users parameter", + "description": "The username for users", "items": { "type": "string" } @@ -25551,6 +25622,16 @@ } } ] + }, + "examples": { + "default": { + "summary": "Example adding a user in a branch protection rule", + "value": { + "users": [ + "octocat" + ] + } + } } } } @@ -25619,7 +25700,7 @@ "properties": { "users": { "type": "array", - "description": "users parameter", + "description": "The username for users", "items": { "type": "string" } @@ -25641,6 +25722,16 @@ } } ] + }, + "examples": { + "default": { + "summary": "Example replacing a user in a branch protection rule", + "value": { + "users": [ + "octocat" + ] + } + } } } } @@ -25708,7 +25799,7 @@ "properties": { "users": { "type": "array", - "description": "users parameter", + "description": "The username for users", "items": { "type": "string" } @@ -25730,6 +25821,16 @@ } } ] + }, + "examples": { + "default": { + "summary": "Example removing a user in a branch protection rule", + "value": { + "users": [ + "octocat" + ] + } + } } } } @@ -27409,6 +27510,22 @@ "schema": { "$ref": "#/components/schemas/code-scanning-analysis-sarif-id" } + }, + { + "$ref": "#/components/parameters/direction" + }, + { + "name": "sort", + "description": "The property by which to sort the results.", + "in": "query", + "required": false, + "schema": { + "type": "string", + "enum": [ + "created" + ], + "default": "created" + } } ], "responses": { @@ -27521,7 +27638,7 @@ }, "delete": { "summary": "Delete a code scanning analysis from a repository", - "description": "Deletes a specified code scanning analysis from a repository. For\nprivate repositories, you must use an access token with the `repo` scope. For public repositories,\nyou must use an access token with `public_repo` scope.\nGitHub Apps must have the `security_events` write permission to use this endpoint.\n\nYou can delete one analysis at a time.\nTo delete a series of analyses, start with the most recent analysis and work backwards.\nConceptually, the process is similar to the undo function in a text editor.\n\nWhen you list the analyses for a repository,\none or more will be identified as deletable in the response:\n\n```\n\"deletable\": true\n```\n\nAn analysis is deletable when it's the most recent in a set of analyses.\nTypically, a repository will have multiple sets of analyses\nfor each enabled code scanning tool,\nwhere a set is determined by a unique combination of analysis values:\n\n* `ref`\n* `tool`\n* `analysis_key`\n* `environment`\n\nIf you attempt to delete an analysis that is not the most recent in a set,\nyou'll get a 400 response with the message:\n\n```\nAnalysis specified is not deletable.\n```\n\nThe response from a successful `DELETE` operation provides you with\ntwo alternative URLs for deleting the next analysis in the set:\n`next_analysis_url` and `confirm_delete_url`.\nUse the `next_analysis_url` URL if you want to avoid accidentally deleting the final analysis\nin a set. This is a useful option if you want to preserve at least one analysis\nfor the specified tool in your repository.\nUse the `confirm_delete_url` URL if you are content to remove all analyses for a tool.\nWhen you delete the last analysis in a set, the value of `next_analysis_url` and `confirm_delete_url`\nin the 200 response is `null`.\n\nAs an example of the deletion process,\nlet's imagine that you added a workflow that configured a particular code scanning tool\nto analyze the code in a repository. This tool has added 15 analyses:\n10 on the default branch, and another 5 on a topic branch.\nYou therefore have two separate sets of analyses for this tool.\nYou've now decided that you want to remove all of the analyses for the tool.\nTo do this you must make 15 separate deletion requests.\nTo start, you must find an analysis that's identified as deletable.\nEach set of analyses always has one that's identified as deletable.\nHaving found the deletable analysis for one of the two sets,\ndelete this analysis and then continue deleting the next analysis in the set until they're all deleted.\nThen repeat the process for the second set.\nThe procedure therefore consists of a nested loop:\n\n**Outer loop**:\n* List the analyses for the repository, filtered by tool.\n* Parse this list to find a deletable analysis. If found:\n\n **Inner loop**:\n * Delete the identified analysis.\n * Parse the response for the value of `confirm_delete_url` and, if found, use this in the next iteration.\n\nThe above process assumes that you want to remove all trace of the tool's analyses from the GitHub user interface, for the specified repository, and it therefore uses the `confirm_delete_url` value. Alternatively, you could use the `next_analysis_url` value, which would leave the last analysis in each set undeleted to avoid removing a tool's analysis entirely.", + "description": "Deletes a specified code scanning analysis from a repository. For\nprivate repositories, you must use an access token with the `repo` scope. For public repositories,\nyou must use an access token with `public_repo` scope.\nGitHub Apps must have the `security_events` write permission to use this endpoint.\n\nYou can delete one analysis at a time.\nTo delete a series of analyses, start with the most recent analysis and work backwards.\nConceptually, the process is similar to the undo function in a text editor.\n\nWhen you list the analyses for a repository,\none or more will be identified as deletable in the response:\n\n```\n\"deletable\": true\n```\n\nAn analysis is deletable when it's the most recent in a set of analyses.\nTypically, a repository will have multiple sets of analyses\nfor each enabled code scanning tool,\nwhere a set is determined by a unique combination of analysis values:\n\n* `ref`\n* `tool`\n* `category`\n\nIf you attempt to delete an analysis that is not the most recent in a set,\nyou'll get a 400 response with the message:\n\n```\nAnalysis specified is not deletable.\n```\n\nThe response from a successful `DELETE` operation provides you with\ntwo alternative URLs for deleting the next analysis in the set:\n`next_analysis_url` and `confirm_delete_url`.\nUse the `next_analysis_url` URL if you want to avoid accidentally deleting the final analysis\nin a set. This is a useful option if you want to preserve at least one analysis\nfor the specified tool in your repository.\nUse the `confirm_delete_url` URL if you are content to remove all analyses for a tool.\nWhen you delete the last analysis in a set, the value of `next_analysis_url` and `confirm_delete_url`\nin the 200 response is `null`.\n\nAs an example of the deletion process,\nlet's imagine that you added a workflow that configured a particular code scanning tool\nto analyze the code in a repository. This tool has added 15 analyses:\n10 on the default branch, and another 5 on a topic branch.\nYou therefore have two separate sets of analyses for this tool.\nYou've now decided that you want to remove all of the analyses for the tool.\nTo do this you must make 15 separate deletion requests.\nTo start, you must find an analysis that's identified as deletable.\nEach set of analyses always has one that's identified as deletable.\nHaving found the deletable analysis for one of the two sets,\ndelete this analysis and then continue deleting the next analysis in the set until they're all deleted.\nThen repeat the process for the second set.\nThe procedure therefore consists of a nested loop:\n\n**Outer loop**:\n* List the analyses for the repository, filtered by tool.\n* Parse this list to find a deletable analysis. If found:\n\n **Inner loop**:\n * Delete the identified analysis.\n * Parse the response for the value of `confirm_delete_url` and, if found, use this in the next iteration.\n\nThe above process assumes that you want to remove all trace of the tool's analyses from the GitHub user interface, for the specified repository, and it therefore uses the `confirm_delete_url` value. Alternatively, you could use the `next_analysis_url` value, which would leave the last analysis in each set undeleted to avoid removing a tool's analysis entirely.", "operationId": "code-scanning/delete-analysis", "tags": [ "code-scanning" @@ -30229,7 +30346,7 @@ "/repos/{owner}/{repo}/contents/{path}": { "get": { "summary": "Get repository content", - "description": "Gets the contents of a file or directory in a repository. Specify the file path or directory in `:path`. If you omit\n`:path`, you will receive the contents of the repository's root directory. See the description below regarding what the API response includes for directories. \n\nFiles and symlinks support [a custom media type](https://docs.github.com/rest/reference/repos#custom-media-types) for\nretrieving the raw content or rendered HTML (when supported). All content types support [a custom media\ntype](https://docs.github.com/rest/reference/repos#custom-media-types) to ensure the content is returned in a consistent\nobject format.\n\n**Note**:\n* To get a repository's contents recursively, you can [recursively get the tree](https://docs.github.com/rest/reference/git#trees).\n* This API has an upper limit of 1,000 files for a directory. If you need to retrieve more files, use the [Git Trees\nAPI](https://docs.github.com/rest/reference/git#get-a-tree).\n\n#### Size limits\nIf the requested file's size is:\n* 1 MB or smaller: All features of this endpoint are supported.\n* Between 1-100 MB: Only the `raw` or `object` [custom media types](https://docs.github.com/rest/repos/contents#custom-media-types-for-repository-contents) are supported. Both will work as normal, except that when using the `object` media type, the `content` field will be an empty string and the `encoding` field will be `\"none\"`. To get the contents of these larger files, use the `raw` media type.\n * Greater than 100 MB: This endpoint is not supported.\n\n#### If the content is a directory\nThe response will be an array of objects, one object for each item in the directory.\nWhen listing the contents of a directory, submodules have their \"type\" specified as \"file\". Logically, the value\n_should_ be \"submodule\". This behavior exists in API v3 [for backwards compatibility purposes](https://git.io/v1YCW).\nIn the next major version of the API, the type will be returned as \"submodule\".\n\n#### If the content is a symlink \nIf the requested `:path` points to a symlink, and the symlink's target is a normal file in the repository, then the\nAPI responds with the content of the file (in the format shown in the example. Otherwise, the API responds with an object \ndescribing the symlink itself.\n\n#### If the content is a submodule\nThe `submodule_git_url` identifies the location of the submodule repository, and the `sha` identifies a specific\ncommit within the submodule repository. Git uses the given URL when cloning the submodule repository, and checks out\nthe submodule at that specific commit.\n\nIf the submodule repository is not hosted on github.com, the Git URLs (`git_url` and `_links[\"git\"]`) and the\ngithub.com URLs (`html_url` and `_links[\"html\"]`) will have null values.", + "description": "Gets the contents of a file or directory in a repository. Specify the file path or directory in `:path`. If you omit\n`:path`, you will receive the contents of the repository's root directory. See the description below regarding what the API response includes for directories. \n\nFiles and symlinks support [a custom media type](https://docs.github.com/rest/reference/repos#custom-media-types) for\nretrieving the raw content or rendered HTML (when supported). All content types support [a custom media\ntype](https://docs.github.com/rest/reference/repos#custom-media-types) to ensure the content is returned in a consistent\nobject format.\n\n**Notes**:\n* To get a repository's contents recursively, you can [recursively get the tree](https://docs.github.com/rest/reference/git#trees).\n* This API has an upper limit of 1,000 files for a directory. If you need to retrieve more files, use the [Git Trees\nAPI](https://docs.github.com/rest/reference/git#get-a-tree).\n * Download URLs expire and are meant to be used just once. To ensure the download URL does not expire, please use the contents API to obtain a fresh download URL for each download.\n#### Size limits\nIf the requested file's size is:\n* 1 MB or smaller: All features of this endpoint are supported.\n* Between 1-100 MB: Only the `raw` or `object` [custom media types](https://docs.github.com/rest/repos/contents#custom-media-types-for-repository-contents) are supported. Both will work as normal, except that when using the `object` media type, the `content` field will be an empty string and the `encoding` field will be `\"none\"`. To get the contents of these larger files, use the `raw` media type.\n * Greater than 100 MB: This endpoint is not supported.\n\n#### If the content is a directory\nThe response will be an array of objects, one object for each item in the directory.\nWhen listing the contents of a directory, submodules have their \"type\" specified as \"file\". Logically, the value\n_should_ be \"submodule\". This behavior exists in API v3 [for backwards compatibility purposes](https://git.io/v1YCW).\nIn the next major version of the API, the type will be returned as \"submodule\".\n\n#### If the content is a symlink \nIf the requested `:path` points to a symlink, and the symlink's target is a normal file in the repository, then the\nAPI responds with the content of the file (in the format shown in the example. Otherwise, the API responds with an object \ndescribing the symlink itself.\n\n#### If the content is a submodule\nThe `submodule_git_url` identifies the location of the submodule repository, and the `sha` identifies a specific\ncommit within the submodule repository. Git uses the given URL when cloning the submodule repository, and checks out\nthe submodule at that specific commit.\n\nIf the submodule repository is not hosted on github.com, the Git URLs (`git_url` and `_links[\"git\"]`) and the\ngithub.com URLs (`html_url` and `_links[\"html\"]`) will have null values.", "tags": [ "repos" ], @@ -32571,6 +32688,10 @@ "name": { "type": "string", "description": "When forking from an existing repository, a new name for the fork." + }, + "default_branch_only": { + "type": "boolean", + "description": "When forking from an existing repository, fork with only the default branch." } } } @@ -35221,6 +35342,15 @@ "application/json": { "schema": { "$ref": "#/components/schemas/interaction-limit" + }, + "examples": { + "default": { + "summary": "Example request body", + "value": { + "limit": "collaborators_only", + "expiry": "one_day" + } + } } } } @@ -35388,6 +35518,14 @@ ] } } + }, + "examples": { + "default": { + "summary": "Example request body", + "value": { + "permissions": "write" + } + } } } } @@ -36487,6 +36625,16 @@ "closed" ] }, + "state_reason": { + "type": [ + "string", + "null" + ], + "description": "The reason for the current state", + "examples": [ + "not_planned" + ] + }, "milestone": { "oneOf": [ { @@ -59326,14 +59474,6 @@ "write" ] }, - "organization_custom_roles": { - "type": "string", - "description": "The level of permission to grant the access token for custom roles management.", - "enum": [ - "read", - "write" - ] - }, "deployments": { "type": "string", "description": "The level of permission to grant the access token for deployments and deployment statuses.", @@ -59478,6 +59618,14 @@ "write" ] }, + "organization_custom_roles": { + "type": "string", + "description": "The level of permission to grant the access token for custom roles management. This property is in beta and is subject to change.", + "enum": [ + "read", + "write" + ] + }, "organization_hooks": { "type": "string", "description": "The level of permission to grant the access token to manage the post-receive hooks for an organization.", @@ -99132,6 +99280,113 @@ } ] }, + "branch-get": { + "value": { + "name": "main", + "commit": { + "sha": "7fd1a60b01f91b314f59955a4e4d4e80d8edf11d", + "node_id": "MDY6Q29tbWl0MTI5NjI2OTo3ZmQxYTYwYjAxZjkxYjMxNGY1OTk1NWE0ZTRkNGU4MGQ4ZWRmMTFk", + "commit": { + "author": { + "name": "The Octocat", + "email": "octocat@nowhere.com", + "date": "2012-03-06T23:06:50Z" + }, + "committer": { + "name": "The Octocat", + "email": "octocat@nowhere.com", + "date": "2012-03-06T23:06:50Z" + }, + "message": "Merge pull request #6 from Spaceghost/patch-1\n\nNew line at end of file.", + "tree": { + "sha": "b4eecafa9be2f2006ce1b709d6857b07069b4608", + "url": "https://api.github.com/repos/octocat/Hello-World/git/trees/b4eecafa9be2f2006ce1b709d6857b07069b4608" + }, + "url": "https://api.github.com/repos/octocat/Hello-World/git/commits/7fd1a60b01f91b314f59955a4e4d4e80d8edf11d", + "comment_count": 77, + "verification": { + "verified": false, + "reason": "unsigned", + "signature": null, + "payload": null + } + }, + "url": "https://api.github.com/repos/octocat/Hello-World/commits/7fd1a60b01f91b314f59955a4e4d4e80d8edf11d", + "html_url": "https://github.com/octocat/Hello-World/commit/7fd1a60b01f91b314f59955a4e4d4e80d8edf11d", + "comments_url": "https://api.github.com/repos/octocat/Hello-World/commits/7fd1a60b01f91b314f59955a4e4d4e80d8edf11d/comments", + "author": { + "login": "octocat", + "id": 583231, + "node_id": "MDQ6VXNlcjU4MzIzMQ==", + "avatar_url": "https://avatars.githubusercontent.com/u/583231?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/octocat", + "html_url": "https://github.com/octocat", + "followers_url": "https://api.github.com/users/octocat/followers", + "following_url": "https://api.github.com/users/octocat/following{/other_user}", + "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}", + "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/octocat/subscriptions", + "organizations_url": "https://api.github.com/users/octocat/orgs", + "repos_url": "https://api.github.com/users/octocat/repos", + "events_url": "https://api.github.com/users/octocat/events{/privacy}", + "received_events_url": "https://api.github.com/users/octocat/received_events", + "type": "User", + "site_admin": false + }, + "committer": { + "login": "octocat", + "id": 583231, + "node_id": "MDQ6VXNlcjU4MzIzMQ==", + "avatar_url": "https://avatars.githubusercontent.com/u/583231?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/octocat", + "html_url": "https://github.com/octocat", + "followers_url": "https://api.github.com/users/octocat/followers", + "following_url": "https://api.github.com/users/octocat/following{/other_user}", + "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}", + "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/octocat/subscriptions", + "organizations_url": "https://api.github.com/users/octocat/orgs", + "repos_url": "https://api.github.com/users/octocat/repos", + "events_url": "https://api.github.com/users/octocat/events{/privacy}", + "received_events_url": "https://api.github.com/users/octocat/received_events", + "type": "User", + "site_admin": false + }, + "parents": [ + { + "sha": "553c2077f0edc3d5dc5d17262f6aa498e69d6f8e", + "url": "https://api.github.com/repos/octocat/Hello-World/commits/553c2077f0edc3d5dc5d17262f6aa498e69d6f8e", + "html_url": "https://github.com/octocat/Hello-World/commit/553c2077f0edc3d5dc5d17262f6aa498e69d6f8e" + }, + { + "sha": "762941318ee16e59dabbacb1b4049eec22f0d303", + "url": "https://api.github.com/repos/octocat/Hello-World/commits/762941318ee16e59dabbacb1b4049eec22f0d303", + "html_url": "https://github.com/octocat/Hello-World/commit/762941318ee16e59dabbacb1b4049eec22f0d303" + } + ] + }, + "_links": { + "self": "https://api.github.com/repos/octocat/Hello-World/branches/main", + "html": "https://github.com/octocat/Hello-World/tree/main" + }, + "protected": false, + "protection": { + "enabled": false, + "required_status_checks": { + "enforcement_level": "off", + "contexts": [ + + ], + "checks": [ + + ] + } + }, + "protection_url": "https://api.github.com/repos/octocat/Hello-World/branches/main/protection" + } + }, "branch-protection": { "value": { "url": "https://api.github.com/repos/octocat/Hello-World/branches/master/protection", @@ -99328,6 +99583,83 @@ } } }, + "branch-protection-update": { + "value": { + "url": "https://api.github.com/repos/octocat/hello-world/branches/main/protection", + "required_status_checks": { + "url": "https://api.github.com/repos/octocat/hello-world/branches/main/protection/required_status_checks", + "strict": true, + "contexts": [ + "continuous-integration/travis-ci" + ], + "contexts_url": "https://api.github.com/repos/octocat/hello-world/branches/main/protection/required_status_checks/contexts", + "checks": [ + { + "context": "continuous-integration/travis-ci", + "app_id": null + } + ] + }, + "restrictions": { + "url": "https://api.github.com/repos/octocat/hello-world/branches/main/protection/restrictions", + "users_url": "https://api.github.com/repos/octocat/hello-world/branches/main/protection/restrictions/users", + "teams_url": "https://api.github.com/repos/octocat/hello-world/branches/main/protection/restrictions/teams", + "apps_url": "https://api.github.com/repos/octocat/hello-world/branches/main/protection/restrictions/apps", + "users": [ + + ], + "teams": [ + + ], + "apps": [ + + ] + }, + "required_pull_request_reviews": { + "url": "https://api.github.com/repos/octocat/hello-world/branches/main/protection/required_pull_request_reviews", + "dismiss_stale_reviews": true, + "require_code_owner_reviews": true, + "required_approving_review_count": 2, + "dismissal_restrictions": { + "url": "https://api.github.com/repos/octocat/hello-world/branches/main/protection/dismissal_restrictions", + "users_url": "https://api.github.com/repos/octocat/hello-world/branches/main/protection/dismissal_restrictions/users", + "teams_url": "https://api.github.com/repos/octocat/hello-world/branches/main/protection/dismissal_restrictions/teams", + "users": [ + + ], + "teams": [ + + ], + "apps": [ + + ] + } + }, + "required_signatures": { + "url": "https://api.github.com/repos/octocat/hello-world/branches/main/protection/required_signatures", + "enabled": false + }, + "enforce_admins": { + "url": "https://api.github.com/repos/octocat/hello-world/branches/main/protection/enforce_admins", + "enabled": true + }, + "required_linear_history": { + "enabled": true + }, + "allow_force_pushes": { + "enabled": true + }, + "allow_deletions": { + "enabled": true + }, + "block_creations": { + "enabled": true + }, + "required_conversation_resolution": { + "enabled": true + } + } + }, "protected-branch-admin-enforced-2": { "value": { "url": "https://api.github.com/repos/octocat/Hello-World/branches/master/protection/enforce_admins", @@ -100873,6 +101205,7 @@ "ref": "refs/heads/main", "analysis_key": ".github/workflows/codeql-analysis.yml:CodeQL-Build", "environment": "", + "category": ".github/workflows/codeql-analysis.yml:CodeQL-Build", "state": "open", "fixed_at": null, "commit_sha": "39406e42cb832f683daa691dd652a8dc36ee8930", @@ -104837,7 +105170,8 @@ "type": "User", "site_admin": false }, - "author_association": "COLLABORATOR" + "author_association": "COLLABORATOR", + "state_reason": "completed" } ] }, @@ -104997,7 +105331,8 @@ "type": "User", "site_admin": false }, - "author_association": "COLLABORATOR" + "author_association": "COLLABORATOR", + "state_reason": "completed" } }, "issue-comment-items": { @@ -105233,7 +105568,8 @@ "closed_at": null, "created_at": "2011-04-22T13:33:48Z", "updated_at": "2011-04-22T13:33:48Z", - "author_association": "COLLABORATOR" + "author_association": "COLLABORATOR", + "state_reason": "completed" } } ] @@ -105442,7 +105778,8 @@ "closed_at": null, "created_at": "2011-04-22T13:33:48Z", "updated_at": "2011-04-22T13:33:48Z", - "author_association": "COLLABORATOR" + "author_association": "COLLABORATOR", + "state_reason": "completed" } } }, @@ -110419,7 +110756,8 @@ "body": "...", "score": 1, "locked": true, - "author_association": "COLLABORATOR" + "author_association": "COLLABORATOR", + "state_reason": "completed" } ] } diff --git a/descriptions-next/api.github.com/api.github.com.yaml b/descriptions-next/api.github.com/api.github.com.yaml index 5c87c3c6a6..656bc1c774 100644 --- a/descriptions-next/api.github.com/api.github.com.yaml +++ b/descriptions-next/api.github.com/api.github.com.yaml @@ -4745,6 +4745,9 @@ paths: List the custom repository roles available in this organization. In order to see custom repository roles in an organization, the authenticated user must be an organization owner. + To use this endpoint the authenticated user must be an administrator for the organization or of an repository of the organizaiton and must use an access token with `admin:org repo` scope. + GitHub Apps must have the `organization_custom_roles:read` organization permission to use this endpoint. + For more information on custom repository roles, see "[Managing custom repository roles for an organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-custom-repository-roles-for-an-organization)". tags: - orgs @@ -16519,6 +16522,9 @@ paths: application/json: schema: "$ref": "#/components/schemas/branch-with-protection" + examples: + default: + "$ref": "#/components/examples/branch-get" '301': "$ref": "#/components/responses/moved_permanently" '404': @@ -16817,6 +16823,9 @@ paths: application/json: schema: "$ref": "#/components/schemas/protected-branch" + examples: + default: + "$ref": "#/components/examples/branch-protection-update" '403': "$ref": "#/components/responses/forbidden" '422': @@ -17426,7 +17435,7 @@ paths: properties: contexts: type: array - description: contexts parameter + description: The name of the status checks items: type: string required: @@ -17435,9 +17444,16 @@ paths: contexts: - contexts - type: array - description: contexts parameter + description: The name of the status checks items: type: string + examples: + default: + summary: Example adding status checks to a branch protection rule + value: + contexts: + - continuous-integration/travis-ci + - continuous-integration/jenkins responses: '200': description: Response @@ -17491,7 +17507,7 @@ paths: properties: contexts: type: array - description: contexts parameter + description: The name of the status checks items: type: string required: @@ -17500,9 +17516,15 @@ paths: contexts: - contexts - type: array - description: contexts parameter + description: The name of the status checks items: type: string + examples: + default: + summary: Example updating status checks for a branch protection rule + value: + contexts: + - continuous-integration/travis-ci responses: '200': description: Response @@ -17552,7 +17574,7 @@ paths: properties: contexts: type: array - description: contexts parameter + description: The name of the status checks items: type: string required: @@ -17561,9 +17583,15 @@ paths: contexts: - contexts - type: array - description: contexts parameter + description: The name of the status checks items: type: string + examples: + default: + summary: Example removing status checks from a branch protection rule + value: + contexts: + - continuous-integration/travis-ci responses: '200': description: Response @@ -17931,7 +17959,7 @@ paths: properties: teams: type: array - description: teams parameter + description: The slug values for teams items: type: string required: @@ -17940,9 +17968,15 @@ paths: teams: - my-team - type: array - description: teams parameter + description: The slug values for teams items: type: string + examples: + default: + summary: Example adding a team in a branch protection rule + value: + teams: + - justice-league responses: '200': description: Response @@ -17993,18 +18027,24 @@ paths: properties: teams: type: array - description: teams parameter + description: The slug values for teams items: type: string required: - teams example: teams: - - my-team + - justice-league - type: array - description: teams parameter + description: The slug values for teams items: type: string + examples: + default: + summary: Example replacing a team in a branch protection rule + value: + teams: + - justice-league responses: '200': description: Response @@ -18054,7 +18094,7 @@ paths: properties: teams: type: array - description: teams parameter + description: The slug values for teams items: type: string required: @@ -18063,9 +18103,15 @@ paths: teams: - my-team - type: array - description: teams parameter + description: The slug values for teams items: type: string + examples: + default: + summary: Example removing a team in a branch protection rule + value: + teams: + - justice-league responses: '200': description: Response @@ -18152,7 +18198,7 @@ paths: properties: users: type: array - description: users parameter + description: The username for users items: type: string required: @@ -18163,6 +18209,12 @@ paths: - type: array items: type: string + examples: + default: + summary: Example adding a user in a branch protection rule + value: + users: + - octocat responses: '200': description: Response @@ -18213,7 +18265,7 @@ paths: properties: users: type: array - description: users parameter + description: The username for users items: type: string required: @@ -18224,6 +18276,12 @@ paths: - type: array items: type: string + examples: + default: + summary: Example replacing a user in a branch protection rule + value: + users: + - octocat responses: '200': description: Response @@ -18273,7 +18331,7 @@ paths: properties: users: type: array - description: users parameter + description: The username for users items: type: string required: @@ -18284,6 +18342,12 @@ paths: - type: array items: type: string + examples: + default: + summary: Example removing a user in a branch protection rule + value: + users: + - octocat responses: '200': description: Response @@ -19565,6 +19629,16 @@ paths: required: false schema: "$ref": "#/components/schemas/code-scanning-analysis-sarif-id" + - "$ref": "#/components/parameters/direction" + - name: sort + description: The property by which to sort the results. + in: query + required: false + schema: + type: string + enum: + - created + default: created responses: '200': description: Response @@ -19679,8 +19753,7 @@ paths: * `ref` * `tool` - * `analysis_key` - * `environment` + * `category` If you attempt to delete an analysis that is not the most recent in a set, you'll get a 400 response with the message: @@ -21787,14 +21860,16 @@ paths: support [a custom media type](https://docs.github.com/rest/reference/repos#custom-media-types) for\nretrieving the raw content or rendered HTML (when supported). All content types support [a custom media\ntype](https://docs.github.com/rest/reference/repos#custom-media-types) - to ensure the content is returned in a consistent\nobject format.\n\n**Note**:\n* + to ensure the content is returned in a consistent\nobject format.\n\n**Notes**:\n* \ To get a repository's contents recursively, you can [recursively get the tree](https://docs.github.com/rest/reference/git#trees).\n* This API has an upper limit of 1,000 files for a directory. If you need to retrieve more - files, use the [Git Trees\nAPI](https://docs.github.com/rest/reference/git#get-a-tree).\n\n#### - Size limits\nIf the requested file's size is:\n* 1 MB or smaller: All features - of this endpoint are supported.\n* Between 1-100 MB: Only the `raw` or `object` - [custom media types](https://docs.github.com/rest/repos/contents#custom-media-types-for-repository-contents) + files, use the [Git Trees\nAPI](https://docs.github.com/rest/reference/git#get-a-tree).\n + * Download URLs expire and are meant to be used just once. To ensure the + download URL does not expire, please use the contents API to obtain a fresh + download URL for each download.\n#### Size limits\nIf the requested file's + size is:\n* 1 MB or smaller: All features of this endpoint are supported.\n* + Between 1-100 MB: Only the `raw` or `object` [custom media types](https://docs.github.com/rest/repos/contents#custom-media-types-for-repository-contents) are supported. Both will work as normal, except that when using the `object` media type, the `content` field will be an empty string and the `encoding` field will be `\"none\"`. To get the contents of these larger files, use the @@ -23563,6 +23638,10 @@ paths: type: string description: When forking from an existing repository, a new name for the fork. + default_branch_only: + type: boolean + description: When forking from an existing repository, fork with + only the default branch. responses: '202': description: Response @@ -25555,6 +25634,12 @@ paths: application/json: schema: "$ref": "#/components/schemas/interaction-limit" + examples: + default: + summary: Example request body + value: + limit: collaborators_only + expiry: one_day responses: '200': description: Response @@ -25666,6 +25751,11 @@ paths: - maintain - triage - admin + examples: + default: + summary: Example request body + value: + permissions: write responses: '200': description: Response @@ -26390,6 +26480,13 @@ paths: enum: - open - closed + state_reason: + type: + - string + - 'null' + description: The reason for the current state + examples: + - not_planned milestone: oneOf: - type: string @@ -42540,13 +42637,6 @@ components: enum: - read - write - organization_custom_roles: - type: string - description: The level of permission to grant the access token for custom - roles management. - enum: - - read - - write deployments: type: string description: The level of permission to grant the access token for deployments @@ -42673,6 +42763,13 @@ components: enum: - read - write + organization_custom_roles: + type: string + description: The level of permission to grant the access token for custom + roles management. This property is in beta and is subject to change. + enum: + - read + - write organization_hooks: type: string description: The level of permission to grant the access token to manage @@ -73093,6 +73190,94 @@ components: - ci-test - linter protection_url: https://api.github.com/repos/octocat/hello-world/branches/master/protection + branch-get: + value: + name: main + commit: + sha: 7fd1a60b01f91b314f59955a4e4d4e80d8edf11d + node_id: MDY6Q29tbWl0MTI5NjI2OTo3ZmQxYTYwYjAxZjkxYjMxNGY1OTk1NWE0ZTRkNGU4MGQ4ZWRmMTFk + commit: + author: + name: The Octocat + email: octocat@nowhere.com + date: '2012-03-06T23:06:50Z' + committer: + name: The Octocat + email: octocat@nowhere.com + date: '2012-03-06T23:06:50Z' + message: |- + Merge pull request #6 from Spaceghost/patch-1 + + New line at end of file. + tree: + sha: b4eecafa9be2f2006ce1b709d6857b07069b4608 + url: https://api.github.com/repos/octocat/Hello-World/git/trees/b4eecafa9be2f2006ce1b709d6857b07069b4608 + url: https://api.github.com/repos/octocat/Hello-World/git/commits/7fd1a60b01f91b314f59955a4e4d4e80d8edf11d + comment_count: 77 + verification: + verified: false + reason: unsigned + signature: + payload: + url: https://api.github.com/repos/octocat/Hello-World/commits/7fd1a60b01f91b314f59955a4e4d4e80d8edf11d + html_url: https://github.com/octocat/Hello-World/commit/7fd1a60b01f91b314f59955a4e4d4e80d8edf11d + comments_url: https://api.github.com/repos/octocat/Hello-World/commits/7fd1a60b01f91b314f59955a4e4d4e80d8edf11d/comments + author: + login: octocat + id: 583231 + node_id: MDQ6VXNlcjU4MzIzMQ== + avatar_url: https://avatars.githubusercontent.com/u/583231?v=4 + gravatar_id: '' + url: https://api.github.com/users/octocat + html_url: https://github.com/octocat + followers_url: https://api.github.com/users/octocat/followers + following_url: https://api.github.com/users/octocat/following{/other_user} + gists_url: https://api.github.com/users/octocat/gists{/gist_id} + starred_url: https://api.github.com/users/octocat/starred{/owner}{/repo} + subscriptions_url: https://api.github.com/users/octocat/subscriptions + organizations_url: https://api.github.com/users/octocat/orgs + repos_url: https://api.github.com/users/octocat/repos + events_url: https://api.github.com/users/octocat/events{/privacy} + received_events_url: https://api.github.com/users/octocat/received_events + type: User + site_admin: false + committer: + login: octocat + id: 583231 + node_id: MDQ6VXNlcjU4MzIzMQ== + avatar_url: https://avatars.githubusercontent.com/u/583231?v=4 + gravatar_id: '' + url: https://api.github.com/users/octocat + html_url: https://github.com/octocat + followers_url: https://api.github.com/users/octocat/followers + following_url: https://api.github.com/users/octocat/following{/other_user} + gists_url: https://api.github.com/users/octocat/gists{/gist_id} + starred_url: https://api.github.com/users/octocat/starred{/owner}{/repo} + subscriptions_url: https://api.github.com/users/octocat/subscriptions + organizations_url: https://api.github.com/users/octocat/orgs + repos_url: https://api.github.com/users/octocat/repos + events_url: https://api.github.com/users/octocat/events{/privacy} + received_events_url: https://api.github.com/users/octocat/received_events + type: User + site_admin: false + parents: + - sha: 553c2077f0edc3d5dc5d17262f6aa498e69d6f8e + url: https://api.github.com/repos/octocat/Hello-World/commits/553c2077f0edc3d5dc5d17262f6aa498e69d6f8e + html_url: https://github.com/octocat/Hello-World/commit/553c2077f0edc3d5dc5d17262f6aa498e69d6f8e + - sha: 762941318ee16e59dabbacb1b4049eec22f0d303 + url: https://api.github.com/repos/octocat/Hello-World/commits/762941318ee16e59dabbacb1b4049eec22f0d303 + html_url: https://github.com/octocat/Hello-World/commit/762941318ee16e59dabbacb1b4049eec22f0d303 + _links: + self: https://api.github.com/repos/octocat/Hello-World/branches/main + html: https://github.com/octocat/Hello-World/tree/main + protected: false + protection: + enabled: false + required_status_checks: + enforcement_level: 'off' + contexts: [] + checks: [] + protection_url: https://api.github.com/repos/octocat/Hello-World/branches/main/protection branch-protection: value: url: https://api.github.com/repos/octocat/Hello-World/branches/master/protection @@ -73253,6 +73438,54 @@ components: enabled: true required_conversation_resolution: enabled: true + branch-protection-update: + value: + url: https://api.github.com/repos/octocat/hello-world/branches/main/protection + required_status_checks: + url: https://api.github.com/repos/octocat/hello-world/branches/main/protection/required_status_checks + strict: true + contexts: + - continuous-integration/travis-ci + contexts_url: https://api.github.com/repos/octocat/hello-world/branches/main/protection/required_status_checks/contexts + checks: + - context: continuous-integration/travis-ci + app_id: + restrictions: + url: https://api.github.com/repos/octocat/hello-world/branches/main/protection/restrictions + users_url: https://api.github.com/repos/octocat/hello-world/branches/main/protection/restrictions/users + teams_url: https://api.github.com/repos/octocat/hello-world/branches/main/protection/restrictions/teams + apps_url: https://api.github.com/repos/octocat/hello-world/branches/main/protection/restrictions/apps + users: [] + teams: [] + apps: [] + required_pull_request_reviews: + url: https://api.github.com/repos/octocat/hello-world/branches/main/protection/required_pull_request_reviews + dismiss_stale_reviews: true + require_code_owner_reviews: true + required_approving_review_count: 2 + dismissal_restrictions: + url: https://api.github.com/repos/octocat/hello-world/branches/main/protection/dismissal_restrictions + users_url: https://api.github.com/repos/octocat/hello-world/branches/main/protection/dismissal_restrictions/users + teams_url: https://api.github.com/repos/octocat/hello-world/branches/main/protection/dismissal_restrictions/teams + users: [] + teams: [] + apps: [] + required_signatures: + url: https://api.github.com/repos/octocat/hello-world/branches/main/protection/required_signatures + enabled: false + enforce_admins: + url: https://api.github.com/repos/octocat/hello-world/branches/main/protection/enforce_admins + enabled: true + required_linear_history: + enabled: true + allow_force_pushes: + enabled: true + allow_deletions: + enabled: true + block_creations: + enabled: true + required_conversation_resolution: + enabled: true protected-branch-admin-enforced-2: value: url: https://api.github.com/repos/octocat/Hello-World/branches/master/protection/enforce_admins @@ -74612,6 +74845,7 @@ components: - ref: refs/heads/main analysis_key: ".github/workflows/codeql-analysis.yml:CodeQL-Build" environment: '' + category: ".github/workflows/codeql-analysis.yml:CodeQL-Build" state: open fixed_at: commit_sha: 39406e42cb832f683daa691dd652a8dc36ee8930 @@ -77986,6 +78220,7 @@ components: type: User site_admin: false author_association: COLLABORATOR + state_reason: completed issue: value: id: 1 @@ -78131,6 +78366,7 @@ components: type: User site_admin: false author_association: COLLABORATOR + state_reason: completed issue-comment-items: value: - id: 1 @@ -78344,6 +78580,7 @@ components: created_at: '2011-04-22T13:33:48Z' updated_at: '2011-04-22T13:33:48Z' author_association: COLLABORATOR + state_reason: completed issue-event: value: id: 1 @@ -78533,6 +78770,7 @@ components: created_at: '2011-04-22T13:33:48Z' updated_at: '2011-04-22T13:33:48Z' author_association: COLLABORATOR + state_reason: completed issue-event-for-issue-items: value: - id: 1 @@ -82833,6 +83071,7 @@ components: score: 1 locked: true author_association: COLLABORATOR + state_reason: completed label-search-result-item-paginated: value: total_count: 2 diff --git a/descriptions-next/api.github.com/dereferenced/api.github.com.deref.json b/descriptions-next/api.github.com/dereferenced/api.github.com.deref.json index 2201780686..3a52030e5d 100644 --- a/descriptions-next/api.github.com/dereferenced/api.github.com.deref.json +++ b/descriptions-next/api.github.com/dereferenced/api.github.com.deref.json @@ -2854,14 +2854,6 @@ "write" ] }, - "organization_custom_roles": { - "type": "string", - "description": "The level of permission to grant the access token for custom roles management.", - "enum": [ - "read", - "write" - ] - }, "deployments": { "type": "string", "description": "The level of permission to grant the access token for deployments and deployment statuses.", @@ -3006,6 +2998,14 @@ "write" ] }, + "organization_custom_roles": { + "type": "string", + "description": "The level of permission to grant the access token for custom roles management. This property is in beta and is subject to change.", + "enum": [ + "read", + "write" + ] + }, "organization_hooks": { "type": "string", "description": "The level of permission to grant the access token to manage the post-receive hooks for an organization.", @@ -3791,14 +3791,6 @@ "write" ] }, - "organization_custom_roles": { - "type": "string", - "description": "The level of permission to grant the access token for custom roles management.", - "enum": [ - "read", - "write" - ] - }, "deployments": { "type": "string", "description": "The level of permission to grant the access token for deployments and deployment statuses.", @@ -3943,6 +3935,14 @@ "write" ] }, + "organization_custom_roles": { + "type": "string", + "description": "The level of permission to grant the access token for custom roles management. This property is in beta and is subject to change.", + "enum": [ + "read", + "write" + ] + }, "organization_hooks": { "type": "string", "description": "The level of permission to grant the access token to manage the post-receive hooks for an organization.", @@ -4514,14 +4514,6 @@ "write" ] }, - "organization_custom_roles": { - "type": "string", - "description": "The level of permission to grant the access token for custom roles management.", - "enum": [ - "read", - "write" - ] - }, "deployments": { "type": "string", "description": "The level of permission to grant the access token for deployments and deployment statuses.", @@ -4666,6 +4658,14 @@ "write" ] }, + "organization_custom_roles": { + "type": "string", + "description": "The level of permission to grant the access token for custom roles management. This property is in beta and is subject to change.", + "enum": [ + "read", + "write" + ] + }, "organization_hooks": { "type": "string", "description": "The level of permission to grant the access token to manage the post-receive hooks for an organization.", @@ -4807,14 +4807,6 @@ "write" ] }, - "organization_custom_roles": { - "type": "string", - "description": "The level of permission to grant the access token for custom roles management.", - "enum": [ - "read", - "write" - ] - }, "deployments": { "type": "string", "description": "The level of permission to grant the access token for deployments and deployment statuses.", @@ -4959,6 +4951,14 @@ "write" ] }, + "organization_custom_roles": { + "type": "string", + "description": "The level of permission to grant the access token for custom roles management. This property is in beta and is subject to change.", + "enum": [ + "read", + "write" + ] + }, "organization_hooks": { "type": "string", "description": "The level of permission to grant the access token to manage the post-receive hooks for an organization.", @@ -7458,14 +7458,6 @@ "write" ] }, - "organization_custom_roles": { - "type": "string", - "description": "The level of permission to grant the access token for custom roles management.", - "enum": [ - "read", - "write" - ] - }, "deployments": { "type": "string", "description": "The level of permission to grant the access token for deployments and deployment statuses.", @@ -7610,6 +7602,14 @@ "write" ] }, + "organization_custom_roles": { + "type": "string", + "description": "The level of permission to grant the access token for custom roles management. This property is in beta and is subject to change.", + "enum": [ + "read", + "write" + ] + }, "organization_hooks": { "type": "string", "description": "The level of permission to grant the access token to manage the post-receive hooks for an organization.", @@ -8432,14 +8432,6 @@ "write" ] }, - "organization_custom_roles": { - "type": "string", - "description": "The level of permission to grant the access token for custom roles management.", - "enum": [ - "read", - "write" - ] - }, "deployments": { "type": "string", "description": "The level of permission to grant the access token for deployments and deployment statuses.", @@ -8584,6 +8576,14 @@ "write" ] }, + "organization_custom_roles": { + "type": "string", + "description": "The level of permission to grant the access token for custom roles management. This property is in beta and is subject to change.", + "enum": [ + "read", + "write" + ] + }, "organization_hooks": { "type": "string", "description": "The level of permission to grant the access token to manage the post-receive hooks for an organization.", @@ -9278,14 +9278,6 @@ "write" ] }, - "organization_custom_roles": { - "type": "string", - "description": "The level of permission to grant the access token for custom roles management.", - "enum": [ - "read", - "write" - ] - }, "deployments": { "type": "string", "description": "The level of permission to grant the access token for deployments and deployment statuses.", @@ -9430,6 +9422,14 @@ "write" ] }, + "organization_custom_roles": { + "type": "string", + "description": "The level of permission to grant the access token for custom roles management. This property is in beta and is subject to change.", + "enum": [ + "read", + "write" + ] + }, "organization_hooks": { "type": "string", "description": "The level of permission to grant the access token to manage the post-receive hooks for an organization.", @@ -9826,14 +9826,6 @@ "write" ] }, - "organization_custom_roles": { - "type": "string", - "description": "The level of permission to grant the access token for custom roles management.", - "enum": [ - "read", - "write" - ] - }, "deployments": { "type": "string", "description": "The level of permission to grant the access token for deployments and deployment statuses.", @@ -9978,6 +9970,14 @@ "write" ] }, + "organization_custom_roles": { + "type": "string", + "description": "The level of permission to grant the access token for custom roles management. This property is in beta and is subject to change.", + "enum": [ + "read", + "write" + ] + }, "organization_hooks": { "type": "string", "description": "The level of permission to grant the access token to manage the post-receive hooks for an organization.", @@ -59363,7 +59363,7 @@ "/organizations/{organization_id}/custom_roles": { "get": { "summary": "List custom repository roles in an organization", - "description": "List the custom repository roles available in this organization. In order to see custom\nrepository roles in an organization, the authenticated user must be an organization owner.\n\nFor more information on custom repository roles, see \"[Managing custom repository roles for an organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-custom-repository-roles-for-an-organization)\".", + "description": "List the custom repository roles available in this organization. In order to see custom\nrepository roles in an organization, the authenticated user must be an organization owner.\n\nTo use this endpoint the authenticated user must be an administrator for the organization or of an repository of the organizaiton and must use an access token with `admin:org repo` scope.\nGitHub Apps must have the `organization_custom_roles:read` organization permission to use this endpoint.\n\nFor more information on custom repository roles, see \"[Managing custom repository roles for an organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-custom-repository-roles-for-an-organization)\".", "tags": [ "orgs" ], @@ -91569,14 +91569,6 @@ "write" ] }, - "organization_custom_roles": { - "type": "string", - "description": "The level of permission to grant the access token for custom roles management.", - "enum": [ - "read", - "write" - ] - }, "deployments": { "type": "string", "description": "The level of permission to grant the access token for deployments and deployment statuses.", @@ -91721,6 +91713,14 @@ "write" ] }, + "organization_custom_roles": { + "type": "string", + "description": "The level of permission to grant the access token for custom roles management. This property is in beta and is subject to change.", + "enum": [ + "read", + "write" + ] + }, "organization_hooks": { "type": "string", "description": "The level of permission to grant the access token to manage the post-receive hooks for an organization.", @@ -92520,14 +92520,6 @@ "write" ] }, - "organization_custom_roles": { - "type": "string", - "description": "The level of permission to grant the access token for custom roles management.", - "enum": [ - "read", - "write" - ] - }, "deployments": { "type": "string", "description": "The level of permission to grant the access token for deployments and deployment statuses.", @@ -92672,6 +92664,14 @@ "write" ] }, + "organization_custom_roles": { + "type": "string", + "description": "The level of permission to grant the access token for custom roles management. This property is in beta and is subject to change.", + "enum": [ + "read", + "write" + ] + }, "organization_hooks": { "type": "string", "description": "The level of permission to grant the access token to manage the post-receive hooks for an organization.", @@ -202802,6 +202802,115 @@ "protected", "protection_url" ] + }, + "examples": { + "default": { + "value": { + "name": "main", + "commit": { + "sha": "7fd1a60b01f91b314f59955a4e4d4e80d8edf11d", + "node_id": "MDY6Q29tbWl0MTI5NjI2OTo3ZmQxYTYwYjAxZjkxYjMxNGY1OTk1NWE0ZTRkNGU4MGQ4ZWRmMTFk", + "commit": { + "author": { + "name": "The Octocat", + "email": "octocat@nowhere.com", + "date": "2012-03-06T23:06:50Z" + }, + "committer": { + "name": "The Octocat", + "email": "octocat@nowhere.com", + "date": "2012-03-06T23:06:50Z" + }, + "message": "Merge pull request #6 from Spaceghost/patch-1\n\nNew line at end of file.", + "tree": { + "sha": "b4eecafa9be2f2006ce1b709d6857b07069b4608", + "url": "https://api.github.com/repos/octocat/Hello-World/git/trees/b4eecafa9be2f2006ce1b709d6857b07069b4608" + }, + "url": "https://api.github.com/repos/octocat/Hello-World/git/commits/7fd1a60b01f91b314f59955a4e4d4e80d8edf11d", + "comment_count": 77, + "verification": { + "verified": false, + "reason": "unsigned", + "signature": null, + "payload": null + } + }, + "url": "https://api.github.com/repos/octocat/Hello-World/commits/7fd1a60b01f91b314f59955a4e4d4e80d8edf11d", + "html_url": "https://github.com/octocat/Hello-World/commit/7fd1a60b01f91b314f59955a4e4d4e80d8edf11d", + "comments_url": "https://api.github.com/repos/octocat/Hello-World/commits/7fd1a60b01f91b314f59955a4e4d4e80d8edf11d/comments", + "author": { + "login": "octocat", + "id": 583231, + "node_id": "MDQ6VXNlcjU4MzIzMQ==", + "avatar_url": "https://avatars.githubusercontent.com/u/583231?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/octocat", + "html_url": "https://github.com/octocat", + "followers_url": "https://api.github.com/users/octocat/followers", + "following_url": "https://api.github.com/users/octocat/following{/other_user}", + "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}", + "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/octocat/subscriptions", + "organizations_url": "https://api.github.com/users/octocat/orgs", + "repos_url": "https://api.github.com/users/octocat/repos", + "events_url": "https://api.github.com/users/octocat/events{/privacy}", + "received_events_url": "https://api.github.com/users/octocat/received_events", + "type": "User", + "site_admin": false + }, + "committer": { + "login": "octocat", + "id": 583231, + "node_id": "MDQ6VXNlcjU4MzIzMQ==", + "avatar_url": "https://avatars.githubusercontent.com/u/583231?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/octocat", + "html_url": "https://github.com/octocat", + "followers_url": "https://api.github.com/users/octocat/followers", + "following_url": "https://api.github.com/users/octocat/following{/other_user}", + "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}", + "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/octocat/subscriptions", + "organizations_url": "https://api.github.com/users/octocat/orgs", + "repos_url": "https://api.github.com/users/octocat/repos", + "events_url": "https://api.github.com/users/octocat/events{/privacy}", + "received_events_url": "https://api.github.com/users/octocat/received_events", + "type": "User", + "site_admin": false + }, + "parents": [ + { + "sha": "553c2077f0edc3d5dc5d17262f6aa498e69d6f8e", + "url": "https://api.github.com/repos/octocat/Hello-World/commits/553c2077f0edc3d5dc5d17262f6aa498e69d6f8e", + "html_url": "https://github.com/octocat/Hello-World/commit/553c2077f0edc3d5dc5d17262f6aa498e69d6f8e" + }, + { + "sha": "762941318ee16e59dabbacb1b4049eec22f0d303", + "url": "https://api.github.com/repos/octocat/Hello-World/commits/762941318ee16e59dabbacb1b4049eec22f0d303", + "html_url": "https://github.com/octocat/Hello-World/commit/762941318ee16e59dabbacb1b4049eec22f0d303" + } + ] + }, + "_links": { + "self": "https://api.github.com/repos/octocat/Hello-World/branches/main", + "html": "https://github.com/octocat/Hello-World/tree/main" + }, + "protected": false, + "protection": { + "enabled": false, + "required_status_checks": { + "enforcement_level": "off", + "contexts": [ + + ], + "checks": [ + + ] + } + }, + "protection_url": "https://api.github.com/repos/octocat/Hello-World/branches/main/protection" + } + } } } } @@ -207309,6 +207418,85 @@ "required": [ "url" ] + }, + "examples": { + "default": { + "value": { + "url": "https://api.github.com/repos/octocat/hello-world/branches/main/protection", + "required_status_checks": { + "url": "https://api.github.com/repos/octocat/hello-world/branches/main/protection/required_status_checks", + "strict": true, + "contexts": [ + "continuous-integration/travis-ci" + ], + "contexts_url": "https://api.github.com/repos/octocat/hello-world/branches/main/protection/required_status_checks/contexts", + "checks": [ + { + "context": "continuous-integration/travis-ci", + "app_id": null + } + ] + }, + "restrictions": { + "url": "https://api.github.com/repos/octocat/hello-world/branches/main/protection/restrictions", + "users_url": "https://api.github.com/repos/octocat/hello-world/branches/main/protection/restrictions/users", + "teams_url": "https://api.github.com/repos/octocat/hello-world/branches/main/protection/restrictions/teams", + "apps_url": "https://api.github.com/repos/octocat/hello-world/branches/main/protection/restrictions/apps", + "users": [ + + ], + "teams": [ + + ], + "apps": [ + + ] + }, + "required_pull_request_reviews": { + "url": "https://api.github.com/repos/octocat/hello-world/branches/main/protection/required_pull_request_reviews", + "dismiss_stale_reviews": true, + "require_code_owner_reviews": true, + "required_approving_review_count": 2, + "dismissal_restrictions": { + "url": "https://api.github.com/repos/octocat/hello-world/branches/main/protection/dismissal_restrictions", + "users_url": "https://api.github.com/repos/octocat/hello-world/branches/main/protection/dismissal_restrictions/users", + "teams_url": "https://api.github.com/repos/octocat/hello-world/branches/main/protection/dismissal_restrictions/teams", + "users": [ + + ], + "teams": [ + + ], + "apps": [ + + ] + } + }, + "required_signatures": { + "url": "https://api.github.com/repos/octocat/hello-world/branches/main/protection/required_signatures", + "enabled": false + }, + "enforce_admins": { + "url": "https://api.github.com/repos/octocat/hello-world/branches/main/protection/enforce_admins", + "enabled": true + }, + "required_linear_history": { + "enabled": true + }, + "allow_force_pushes": { + "enabled": true + }, + "allow_deletions": { + "enabled": true + }, + "block_creations": { + "enabled": true + }, + "required_conversation_resolution": { + "enabled": true + } + } + } } } } @@ -212195,7 +212383,7 @@ "properties": { "contexts": { "type": "array", - "description": "contexts parameter", + "description": "The name of the status checks", "items": { "type": "string" } @@ -212212,12 +212400,23 @@ }, { "type": "array", - "description": "contexts parameter", + "description": "The name of the status checks", "items": { "type": "string" } } ] + }, + "examples": { + "default": { + "summary": "Example adding status checks to a branch protection rule", + "value": { + "contexts": [ + "continuous-integration/travis-ci", + "continuous-integration/jenkins" + ] + } + } } } } @@ -212432,7 +212631,7 @@ "properties": { "contexts": { "type": "array", - "description": "contexts parameter", + "description": "The name of the status checks", "items": { "type": "string" } @@ -212449,12 +212648,22 @@ }, { "type": "array", - "description": "contexts parameter", + "description": "The name of the status checks", "items": { "type": "string" } } ] + }, + "examples": { + "default": { + "summary": "Example updating status checks for a branch protection rule", + "value": { + "contexts": [ + "continuous-integration/travis-ci" + ] + } + } } } } @@ -212641,7 +212850,7 @@ "properties": { "contexts": { "type": "array", - "description": "contexts parameter", + "description": "The name of the status checks", "items": { "type": "string" } @@ -212658,12 +212867,22 @@ }, { "type": "array", - "description": "contexts parameter", + "description": "The name of the status checks", "items": { "type": "string" } } ] + }, + "examples": { + "default": { + "summary": "Example removing status checks from a branch protection rule", + "value": { + "contexts": [ + "continuous-integration/travis-ci" + ] + } + } } } } @@ -215785,7 +216004,7 @@ "properties": { "teams": { "type": "array", - "description": "teams parameter", + "description": "The slug values for teams", "items": { "type": "string" } @@ -215802,12 +216021,22 @@ }, { "type": "array", - "description": "teams parameter", + "description": "The slug values for teams", "items": { "type": "string" } } ] + }, + "examples": { + "default": { + "summary": "Example adding a team in a branch protection rule", + "value": { + "teams": [ + "justice-league" + ] + } + } } } } @@ -216179,7 +216408,7 @@ "properties": { "teams": { "type": "array", - "description": "teams parameter", + "description": "The slug values for teams", "items": { "type": "string" } @@ -216190,18 +216419,28 @@ ], "example": { "teams": [ - "my-team" + "justice-league" ] } }, { "type": "array", - "description": "teams parameter", + "description": "The slug values for teams", "items": { "type": "string" } } ] + }, + "examples": { + "default": { + "summary": "Example replacing a team in a branch protection rule", + "value": { + "teams": [ + "justice-league" + ] + } + } } } } @@ -216572,7 +216811,7 @@ "properties": { "teams": { "type": "array", - "description": "teams parameter", + "description": "The slug values for teams", "items": { "type": "string" } @@ -216589,12 +216828,22 @@ }, { "type": "array", - "description": "teams parameter", + "description": "The slug values for teams", "items": { "type": "string" } } ] + }, + "examples": { + "default": { + "summary": "Example removing a team in a branch protection rule", + "value": { + "teams": [ + "justice-league" + ] + } + } } } } @@ -217241,7 +217490,7 @@ "properties": { "users": { "type": "array", - "description": "users parameter", + "description": "The username for users", "items": { "type": "string" } @@ -217263,6 +217512,16 @@ } } ] + }, + "examples": { + "default": { + "summary": "Example adding a user in a branch protection rule", + "value": { + "users": [ + "octocat" + ] + } + } } } } @@ -217601,7 +217860,7 @@ "properties": { "users": { "type": "array", - "description": "users parameter", + "description": "The username for users", "items": { "type": "string" } @@ -217623,6 +217882,16 @@ } } ] + }, + "examples": { + "default": { + "summary": "Example replacing a user in a branch protection rule", + "value": { + "users": [ + "octocat" + ] + } + } } } } @@ -217960,7 +218229,7 @@ "properties": { "users": { "type": "array", - "description": "users parameter", + "description": "The username for users", "items": { "type": "string" } @@ -217982,6 +218251,16 @@ } } ] + }, + "examples": { + "default": { + "summary": "Example removing a user in a branch protection rule", + "value": { + "users": [ + "octocat" + ] + } + } } } } @@ -241659,6 +241938,7 @@ "ref": "refs/heads/main", "analysis_key": ".github/workflows/codeql-analysis.yml:CodeQL-Build", "environment": "", + "category": ".github/workflows/codeql-analysis.yml:CodeQL-Build", "state": "open", "fixed_at": null, "commit_sha": "39406e42cb832f683daa691dd652a8dc36ee8930", @@ -241880,6 +242160,33 @@ "6c81cd8e-b078-4ac3-a3be-1dad7dbd0b53" ] } + }, + { + "name": "direction", + "description": "The direction to sort the results by.", + "in": "query", + "required": false, + "schema": { + "type": "string", + "enum": [ + "asc", + "desc" + ], + "default": "desc" + } + }, + { + "name": "sort", + "description": "The property by which to sort the results.", + "in": "query", + "required": false, + "schema": { + "type": "string", + "enum": [ + "created" + ], + "default": "created" + } } ], "responses": { @@ -242466,7 +242773,7 @@ }, "delete": { "summary": "Delete a code scanning analysis from a repository", - "description": "Deletes a specified code scanning analysis from a repository. For\nprivate repositories, you must use an access token with the `repo` scope. For public repositories,\nyou must use an access token with `public_repo` scope.\nGitHub Apps must have the `security_events` write permission to use this endpoint.\n\nYou can delete one analysis at a time.\nTo delete a series of analyses, start with the most recent analysis and work backwards.\nConceptually, the process is similar to the undo function in a text editor.\n\nWhen you list the analyses for a repository,\none or more will be identified as deletable in the response:\n\n```\n\"deletable\": true\n```\n\nAn analysis is deletable when it's the most recent in a set of analyses.\nTypically, a repository will have multiple sets of analyses\nfor each enabled code scanning tool,\nwhere a set is determined by a unique combination of analysis values:\n\n* `ref`\n* `tool`\n* `analysis_key`\n* `environment`\n\nIf you attempt to delete an analysis that is not the most recent in a set,\nyou'll get a 400 response with the message:\n\n```\nAnalysis specified is not deletable.\n```\n\nThe response from a successful `DELETE` operation provides you with\ntwo alternative URLs for deleting the next analysis in the set:\n`next_analysis_url` and `confirm_delete_url`.\nUse the `next_analysis_url` URL if you want to avoid accidentally deleting the final analysis\nin a set. This is a useful option if you want to preserve at least one analysis\nfor the specified tool in your repository.\nUse the `confirm_delete_url` URL if you are content to remove all analyses for a tool.\nWhen you delete the last analysis in a set, the value of `next_analysis_url` and `confirm_delete_url`\nin the 200 response is `null`.\n\nAs an example of the deletion process,\nlet's imagine that you added a workflow that configured a particular code scanning tool\nto analyze the code in a repository. This tool has added 15 analyses:\n10 on the default branch, and another 5 on a topic branch.\nYou therefore have two separate sets of analyses for this tool.\nYou've now decided that you want to remove all of the analyses for the tool.\nTo do this you must make 15 separate deletion requests.\nTo start, you must find an analysis that's identified as deletable.\nEach set of analyses always has one that's identified as deletable.\nHaving found the deletable analysis for one of the two sets,\ndelete this analysis and then continue deleting the next analysis in the set until they're all deleted.\nThen repeat the process for the second set.\nThe procedure therefore consists of a nested loop:\n\n**Outer loop**:\n* List the analyses for the repository, filtered by tool.\n* Parse this list to find a deletable analysis. If found:\n\n **Inner loop**:\n * Delete the identified analysis.\n * Parse the response for the value of `confirm_delete_url` and, if found, use this in the next iteration.\n\nThe above process assumes that you want to remove all trace of the tool's analyses from the GitHub user interface, for the specified repository, and it therefore uses the `confirm_delete_url` value. Alternatively, you could use the `next_analysis_url` value, which would leave the last analysis in each set undeleted to avoid removing a tool's analysis entirely.", + "description": "Deletes a specified code scanning analysis from a repository. For\nprivate repositories, you must use an access token with the `repo` scope. For public repositories,\nyou must use an access token with `public_repo` scope.\nGitHub Apps must have the `security_events` write permission to use this endpoint.\n\nYou can delete one analysis at a time.\nTo delete a series of analyses, start with the most recent analysis and work backwards.\nConceptually, the process is similar to the undo function in a text editor.\n\nWhen you list the analyses for a repository,\none or more will be identified as deletable in the response:\n\n```\n\"deletable\": true\n```\n\nAn analysis is deletable when it's the most recent in a set of analyses.\nTypically, a repository will have multiple sets of analyses\nfor each enabled code scanning tool,\nwhere a set is determined by a unique combination of analysis values:\n\n* `ref`\n* `tool`\n* `category`\n\nIf you attempt to delete an analysis that is not the most recent in a set,\nyou'll get a 400 response with the message:\n\n```\nAnalysis specified is not deletable.\n```\n\nThe response from a successful `DELETE` operation provides you with\ntwo alternative URLs for deleting the next analysis in the set:\n`next_analysis_url` and `confirm_delete_url`.\nUse the `next_analysis_url` URL if you want to avoid accidentally deleting the final analysis\nin a set. This is a useful option if you want to preserve at least one analysis\nfor the specified tool in your repository.\nUse the `confirm_delete_url` URL if you are content to remove all analyses for a tool.\nWhen you delete the last analysis in a set, the value of `next_analysis_url` and `confirm_delete_url`\nin the 200 response is `null`.\n\nAs an example of the deletion process,\nlet's imagine that you added a workflow that configured a particular code scanning tool\nto analyze the code in a repository. This tool has added 15 analyses:\n10 on the default branch, and another 5 on a topic branch.\nYou therefore have two separate sets of analyses for this tool.\nYou've now decided that you want to remove all of the analyses for the tool.\nTo do this you must make 15 separate deletion requests.\nTo start, you must find an analysis that's identified as deletable.\nEach set of analyses always has one that's identified as deletable.\nHaving found the deletable analysis for one of the two sets,\ndelete this analysis and then continue deleting the next analysis in the set until they're all deleted.\nThen repeat the process for the second set.\nThe procedure therefore consists of a nested loop:\n\n**Outer loop**:\n* List the analyses for the repository, filtered by tool.\n* Parse this list to find a deletable analysis. If found:\n\n **Inner loop**:\n * Delete the identified analysis.\n * Parse the response for the value of `confirm_delete_url` and, if found, use this in the next iteration.\n\nThe above process assumes that you want to remove all trace of the tool's analyses from the GitHub user interface, for the specified repository, and it therefore uses the `confirm_delete_url` value. Alternatively, you could use the `next_analysis_url` value, which would leave the last analysis in each set undeleted to avoid removing a tool's analysis entirely.", "operationId": "code-scanning/delete-analysis", "tags": [ "code-scanning" @@ -279775,7 +280082,7 @@ "/repos/{owner}/{repo}/contents/{path}": { "get": { "summary": "Get repository content", - "description": "Gets the contents of a file or directory in a repository. Specify the file path or directory in `:path`. If you omit\n`:path`, you will receive the contents of the repository's root directory. See the description below regarding what the API response includes for directories. \n\nFiles and symlinks support [a custom media type](https://docs.github.com/rest/reference/repos#custom-media-types) for\nretrieving the raw content or rendered HTML (when supported). All content types support [a custom media\ntype](https://docs.github.com/rest/reference/repos#custom-media-types) to ensure the content is returned in a consistent\nobject format.\n\n**Note**:\n* To get a repository's contents recursively, you can [recursively get the tree](https://docs.github.com/rest/reference/git#trees).\n* This API has an upper limit of 1,000 files for a directory. If you need to retrieve more files, use the [Git Trees\nAPI](https://docs.github.com/rest/reference/git#get-a-tree).\n\n#### Size limits\nIf the requested file's size is:\n* 1 MB or smaller: All features of this endpoint are supported.\n* Between 1-100 MB: Only the `raw` or `object` [custom media types](https://docs.github.com/rest/repos/contents#custom-media-types-for-repository-contents) are supported. Both will work as normal, except that when using the `object` media type, the `content` field will be an empty string and the `encoding` field will be `\"none\"`. To get the contents of these larger files, use the `raw` media type.\n * Greater than 100 MB: This endpoint is not supported.\n\n#### If the content is a directory\nThe response will be an array of objects, one object for each item in the directory.\nWhen listing the contents of a directory, submodules have their \"type\" specified as \"file\". Logically, the value\n_should_ be \"submodule\". This behavior exists in API v3 [for backwards compatibility purposes](https://git.io/v1YCW).\nIn the next major version of the API, the type will be returned as \"submodule\".\n\n#### If the content is a symlink \nIf the requested `:path` points to a symlink, and the symlink's target is a normal file in the repository, then the\nAPI responds with the content of the file (in the format shown in the example. Otherwise, the API responds with an object \ndescribing the symlink itself.\n\n#### If the content is a submodule\nThe `submodule_git_url` identifies the location of the submodule repository, and the `sha` identifies a specific\ncommit within the submodule repository. Git uses the given URL when cloning the submodule repository, and checks out\nthe submodule at that specific commit.\n\nIf the submodule repository is not hosted on github.com, the Git URLs (`git_url` and `_links[\"git\"]`) and the\ngithub.com URLs (`html_url` and `_links[\"html\"]`) will have null values.", + "description": "Gets the contents of a file or directory in a repository. Specify the file path or directory in `:path`. If you omit\n`:path`, you will receive the contents of the repository's root directory. See the description below regarding what the API response includes for directories. \n\nFiles and symlinks support [a custom media type](https://docs.github.com/rest/reference/repos#custom-media-types) for\nretrieving the raw content or rendered HTML (when supported). All content types support [a custom media\ntype](https://docs.github.com/rest/reference/repos#custom-media-types) to ensure the content is returned in a consistent\nobject format.\n\n**Notes**:\n* To get a repository's contents recursively, you can [recursively get the tree](https://docs.github.com/rest/reference/git#trees).\n* This API has an upper limit of 1,000 files for a directory. If you need to retrieve more files, use the [Git Trees\nAPI](https://docs.github.com/rest/reference/git#get-a-tree).\n * Download URLs expire and are meant to be used just once. To ensure the download URL does not expire, please use the contents API to obtain a fresh download URL for each download.\n#### Size limits\nIf the requested file's size is:\n* 1 MB or smaller: All features of this endpoint are supported.\n* Between 1-100 MB: Only the `raw` or `object` [custom media types](https://docs.github.com/rest/repos/contents#custom-media-types-for-repository-contents) are supported. Both will work as normal, except that when using the `object` media type, the `content` field will be an empty string and the `encoding` field will be `\"none\"`. To get the contents of these larger files, use the `raw` media type.\n * Greater than 100 MB: This endpoint is not supported.\n\n#### If the content is a directory\nThe response will be an array of objects, one object for each item in the directory.\nWhen listing the contents of a directory, submodules have their \"type\" specified as \"file\". Logically, the value\n_should_ be \"submodule\". This behavior exists in API v3 [for backwards compatibility purposes](https://git.io/v1YCW).\nIn the next major version of the API, the type will be returned as \"submodule\".\n\n#### If the content is a symlink \nIf the requested `:path` points to a symlink, and the symlink's target is a normal file in the repository, then the\nAPI responds with the content of the file (in the format shown in the example. Otherwise, the API responds with an object \ndescribing the symlink itself.\n\n#### If the content is a submodule\nThe `submodule_git_url` identifies the location of the submodule repository, and the `sha` identifies a specific\ncommit within the submodule repository. Git uses the given URL when cloning the submodule repository, and checks out\nthe submodule at that specific commit.\n\nIf the submodule repository is not hosted on github.com, the Git URLs (`git_url` and `_links[\"git\"]`) and the\ngithub.com URLs (`html_url` and `_links[\"html\"]`) will have null values.", "tags": [ "repos" ], @@ -297805,6 +298112,10 @@ "name": { "type": "string", "description": "When forking from an existing repository, a new name for the fork." + }, + "default_branch_only": { + "type": "boolean", + "description": "When forking from an existing repository, fork with only the default branch." } } } @@ -312912,14 +313223,6 @@ "write" ] }, - "organization_custom_roles": { - "type": "string", - "description": "The level of permission to grant the access token for custom roles management.", - "enum": [ - "read", - "write" - ] - }, "deployments": { "type": "string", "description": "The level of permission to grant the access token for deployments and deployment statuses.", @@ -313064,6 +313367,14 @@ "write" ] }, + "organization_custom_roles": { + "type": "string", + "description": "The level of permission to grant the access token for custom roles management. This property is in beta and is subject to change.", + "enum": [ + "read", + "write" + ] + }, "organization_hooks": { "type": "string", "description": "The level of permission to grant the access token to manage the post-receive hooks for an organization.", @@ -313678,6 +313989,15 @@ "required": [ "limit" ] + }, + "examples": { + "default": { + "summary": "Example request body", + "value": { + "limit": "collaborators_only", + "expiry": "one_day" + } + } } } } @@ -316661,6 +316981,14 @@ ] } } + }, + "examples": { + "default": { + "summary": "Example request body", + "value": { + "permissions": "write" + } + } } } } @@ -322855,7 +323183,8 @@ "type": "User", "site_admin": false }, - "author_association": "COLLABORATOR" + "author_association": "COLLABORATOR", + "state_reason": "completed" } ] } @@ -326386,7 +326715,8 @@ "type": "User", "site_admin": false }, - "author_association": "COLLABORATOR" + "author_association": "COLLABORATOR", + "state_reason": "completed" } } } @@ -335118,7 +335448,8 @@ "closed_at": null, "created_at": "2011-04-22T13:33:48Z", "updated_at": "2011-04-22T13:33:48Z", - "author_association": "COLLABORATOR" + "author_association": "COLLABORATOR", + "state_reason": "completed" } } ] @@ -340133,7 +340464,8 @@ "closed_at": null, "created_at": "2011-04-22T13:33:48Z", "updated_at": "2011-04-22T13:33:48Z", - "author_association": "COLLABORATOR" + "author_association": "COLLABORATOR", + "state_reason": "completed" } } } @@ -343509,7 +343841,8 @@ "type": "User", "site_admin": false }, - "author_association": "COLLABORATOR" + "author_association": "COLLABORATOR", + "state_reason": "completed" } } } @@ -343690,6 +344023,16 @@ "closed" ] }, + "state_reason": { + "type": [ + "string", + "null" + ], + "description": "The reason for the current state", + "examples": [ + "not_planned" + ] + }, "milestone": { "oneOf": [ { @@ -347008,7 +347351,8 @@ "type": "User", "site_admin": false }, - "author_association": "COLLABORATOR" + "author_association": "COLLABORATOR", + "state_reason": "completed" } } } @@ -350534,7 +350878,8 @@ "type": "User", "site_admin": false }, - "author_association": "COLLABORATOR" + "author_association": "COLLABORATOR", + "state_reason": "completed" } } } @@ -353857,7 +354202,8 @@ "type": "User", "site_admin": false }, - "author_association": "COLLABORATOR" + "author_association": "COLLABORATOR", + "state_reason": "completed" } } } @@ -479143,7 +479489,8 @@ "body": "...", "score": 1, "locked": true, - "author_association": "COLLABORATOR" + "author_association": "COLLABORATOR", + "state_reason": "completed" } ] } @@ -530621,14 +530968,6 @@ "write" ] }, - "organization_custom_roles": { - "type": "string", - "description": "The level of permission to grant the access token for custom roles management.", - "enum": [ - "read", - "write" - ] - }, "deployments": { "type": "string", "description": "The level of permission to grant the access token for deployments and deployment statuses.", @@ -530773,6 +531112,14 @@ "write" ] }, + "organization_custom_roles": { + "type": "string", + "description": "The level of permission to grant the access token for custom roles management. This property is in beta and is subject to change.", + "enum": [ + "read", + "write" + ] + }, "organization_hooks": { "type": "string", "description": "The level of permission to grant the access token to manage the post-receive hooks for an organization.", @@ -585360,14 +585707,6 @@ "write" ] }, - "organization_custom_roles": { - "type": "string", - "description": "The level of permission to grant the access token for custom roles management.", - "enum": [ - "read", - "write" - ] - }, "deployments": { "type": "string", "description": "The level of permission to grant the access token for deployments and deployment statuses.", @@ -585512,6 +585851,14 @@ "write" ] }, + "organization_custom_roles": { + "type": "string", + "description": "The level of permission to grant the access token for custom roles management. This property is in beta and is subject to change.", + "enum": [ + "read", + "write" + ] + }, "organization_hooks": { "type": "string", "description": "The level of permission to grant the access token to manage the post-receive hooks for an organization.", diff --git a/descriptions-next/api.github.com/dereferenced/api.github.com.deref.yaml b/descriptions-next/api.github.com/dereferenced/api.github.com.deref.yaml index a661e6986a..fbc297b55b 100644 --- a/descriptions-next/api.github.com/dereferenced/api.github.com.deref.yaml +++ b/descriptions-next/api.github.com/dereferenced/api.github.com.deref.yaml @@ -1497,13 +1497,6 @@ paths: enum: - read - write - organization_custom_roles: - type: string - description: The level of permission to grant the access - token for custom roles management. - enum: - - read - - write deployments: type: string description: The level of permission to grant the access @@ -1635,6 +1628,14 @@ paths: enum: - read - write + organization_custom_roles: + type: string + description: The level of permission to grant the access + token for custom roles management. This property is in + beta and is subject to change. + enum: + - read + - write organization_hooks: type: string description: The level of permission to grant the access @@ -14875,6 +14876,9 @@ paths: List the custom repository roles available in this organization. In order to see custom repository roles in an organization, the authenticated user must be an organization owner. + To use this endpoint the authenticated user must be an administrator for the organization or of an repository of the organizaiton and must use an access token with `admin:org repo` scope. + GitHub Apps must have the `organization_custom_roles:read` organization permission to use this endpoint. + For more information on custom repository roles, see "[Managing custom repository roles for an organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-custom-repository-roles-for-an-organization)". tags: - orgs @@ -37085,6 +37089,95 @@ paths: - protection - protected - protection_url + examples: + default: + value: + name: main + commit: + sha: 7fd1a60b01f91b314f59955a4e4d4e80d8edf11d + node_id: MDY6Q29tbWl0MTI5NjI2OTo3ZmQxYTYwYjAxZjkxYjMxNGY1OTk1NWE0ZTRkNGU4MGQ4ZWRmMTFk + commit: + author: + name: The Octocat + email: octocat@nowhere.com + date: '2012-03-06T23:06:50Z' + committer: + name: The Octocat + email: octocat@nowhere.com + date: '2012-03-06T23:06:50Z' + message: |- + Merge pull request #6 from Spaceghost/patch-1 + + New line at end of file. + tree: + sha: b4eecafa9be2f2006ce1b709d6857b07069b4608 + url: https://api.github.com/repos/octocat/Hello-World/git/trees/b4eecafa9be2f2006ce1b709d6857b07069b4608 + url: https://api.github.com/repos/octocat/Hello-World/git/commits/7fd1a60b01f91b314f59955a4e4d4e80d8edf11d + comment_count: 77 + verification: + verified: false + reason: unsigned + signature: + payload: + url: https://api.github.com/repos/octocat/Hello-World/commits/7fd1a60b01f91b314f59955a4e4d4e80d8edf11d + html_url: https://github.com/octocat/Hello-World/commit/7fd1a60b01f91b314f59955a4e4d4e80d8edf11d + comments_url: https://api.github.com/repos/octocat/Hello-World/commits/7fd1a60b01f91b314f59955a4e4d4e80d8edf11d/comments + author: + login: octocat + id: 583231 + node_id: MDQ6VXNlcjU4MzIzMQ== + avatar_url: https://avatars.githubusercontent.com/u/583231?v=4 + gravatar_id: '' + url: https://api.github.com/users/octocat + html_url: https://github.com/octocat + followers_url: https://api.github.com/users/octocat/followers + following_url: https://api.github.com/users/octocat/following{/other_user} + gists_url: https://api.github.com/users/octocat/gists{/gist_id} + starred_url: https://api.github.com/users/octocat/starred{/owner}{/repo} + subscriptions_url: https://api.github.com/users/octocat/subscriptions + organizations_url: https://api.github.com/users/octocat/orgs + repos_url: https://api.github.com/users/octocat/repos + events_url: https://api.github.com/users/octocat/events{/privacy} + received_events_url: https://api.github.com/users/octocat/received_events + type: User + site_admin: false + committer: + login: octocat + id: 583231 + node_id: MDQ6VXNlcjU4MzIzMQ== + avatar_url: https://avatars.githubusercontent.com/u/583231?v=4 + gravatar_id: '' + url: https://api.github.com/users/octocat + html_url: https://github.com/octocat + followers_url: https://api.github.com/users/octocat/followers + following_url: https://api.github.com/users/octocat/following{/other_user} + gists_url: https://api.github.com/users/octocat/gists{/gist_id} + starred_url: https://api.github.com/users/octocat/starred{/owner}{/repo} + subscriptions_url: https://api.github.com/users/octocat/subscriptions + organizations_url: https://api.github.com/users/octocat/orgs + repos_url: https://api.github.com/users/octocat/repos + events_url: https://api.github.com/users/octocat/events{/privacy} + received_events_url: https://api.github.com/users/octocat/received_events + type: User + site_admin: false + parents: + - sha: 553c2077f0edc3d5dc5d17262f6aa498e69d6f8e + url: https://api.github.com/repos/octocat/Hello-World/commits/553c2077f0edc3d5dc5d17262f6aa498e69d6f8e + html_url: https://github.com/octocat/Hello-World/commit/553c2077f0edc3d5dc5d17262f6aa498e69d6f8e + - sha: 762941318ee16e59dabbacb1b4049eec22f0d303 + url: https://api.github.com/repos/octocat/Hello-World/commits/762941318ee16e59dabbacb1b4049eec22f0d303 + html_url: https://github.com/octocat/Hello-World/commit/762941318ee16e59dabbacb1b4049eec22f0d303 + _links: + self: https://api.github.com/repos/octocat/Hello-World/branches/main + html: https://github.com/octocat/Hello-World/tree/main + protected: false + protection: + enabled: false + required_status_checks: + enforcement_level: 'off' + contexts: [] + checks: [] + protection_url: https://api.github.com/repos/octocat/Hello-World/branches/main/protection '301': *216 '404': *15 x-github: @@ -37714,6 +37807,55 @@ paths: - enabled required: - url + examples: + default: + value: + url: https://api.github.com/repos/octocat/hello-world/branches/main/protection + required_status_checks: + url: https://api.github.com/repos/octocat/hello-world/branches/main/protection/required_status_checks + strict: true + contexts: + - continuous-integration/travis-ci + contexts_url: https://api.github.com/repos/octocat/hello-world/branches/main/protection/required_status_checks/contexts + checks: + - context: continuous-integration/travis-ci + app_id: + restrictions: + url: https://api.github.com/repos/octocat/hello-world/branches/main/protection/restrictions + users_url: https://api.github.com/repos/octocat/hello-world/branches/main/protection/restrictions/users + teams_url: https://api.github.com/repos/octocat/hello-world/branches/main/protection/restrictions/teams + apps_url: https://api.github.com/repos/octocat/hello-world/branches/main/protection/restrictions/apps + users: [] + teams: [] + apps: [] + required_pull_request_reviews: + url: https://api.github.com/repos/octocat/hello-world/branches/main/protection/required_pull_request_reviews + dismiss_stale_reviews: true + require_code_owner_reviews: true + required_approving_review_count: 2 + dismissal_restrictions: + url: https://api.github.com/repos/octocat/hello-world/branches/main/protection/dismissal_restrictions + users_url: https://api.github.com/repos/octocat/hello-world/branches/main/protection/dismissal_restrictions/users + teams_url: https://api.github.com/repos/octocat/hello-world/branches/main/protection/dismissal_restrictions/teams + users: [] + teams: [] + apps: [] + required_signatures: + url: https://api.github.com/repos/octocat/hello-world/branches/main/protection/required_signatures + enabled: false + enforce_admins: + url: https://api.github.com/repos/octocat/hello-world/branches/main/protection/enforce_admins + enabled: true + required_linear_history: + enabled: true + allow_force_pushes: + enabled: true + allow_deletions: + enabled: true + block_creations: + enabled: true + required_conversation_resolution: + enabled: true '403': *22 '422': *49 '404': *15 @@ -38377,7 +38519,7 @@ paths: properties: contexts: type: array - description: contexts parameter + description: The name of the status checks items: type: string required: @@ -38386,9 +38528,16 @@ paths: contexts: - contexts - type: array - description: contexts parameter + description: The name of the status checks items: type: string + examples: + default: + summary: Example adding status checks to a branch protection rule + value: + contexts: + - continuous-integration/travis-ci + - continuous-integration/jenkins responses: '200': description: Response @@ -38439,7 +38588,7 @@ paths: properties: contexts: type: array - description: contexts parameter + description: The name of the status checks items: type: string required: @@ -38448,9 +38597,15 @@ paths: contexts: - contexts - type: array - description: contexts parameter + description: The name of the status checks items: type: string + examples: + default: + summary: Example updating status checks for a branch protection rule + value: + contexts: + - continuous-integration/travis-ci responses: '200': description: Response @@ -38498,7 +38653,7 @@ paths: properties: contexts: type: array - description: contexts parameter + description: The name of the status checks items: type: string required: @@ -38507,9 +38662,15 @@ paths: contexts: - contexts - type: array - description: contexts parameter + description: The name of the status checks items: type: string + examples: + default: + summary: Example removing status checks from a branch protection rule + value: + contexts: + - continuous-integration/travis-ci responses: '200': description: Response @@ -38962,7 +39123,7 @@ paths: properties: teams: type: array - description: teams parameter + description: The slug values for teams items: type: string required: @@ -38971,9 +39132,15 @@ paths: teams: - my-team - type: array - description: teams parameter + description: The slug values for teams items: type: string + examples: + default: + summary: Example adding a team in a branch protection rule + value: + teams: + - justice-league responses: '200': description: Response @@ -39021,18 +39188,24 @@ paths: properties: teams: type: array - description: teams parameter + description: The slug values for teams items: type: string required: - teams example: teams: - - my-team + - justice-league - type: array - description: teams parameter + description: The slug values for teams items: type: string + examples: + default: + summary: Example replacing a team in a branch protection rule + value: + teams: + - justice-league responses: '200': description: Response @@ -39079,7 +39252,7 @@ paths: properties: teams: type: array - description: teams parameter + description: The slug values for teams items: type: string required: @@ -39088,9 +39261,15 @@ paths: teams: - my-team - type: array - description: teams parameter + description: The slug values for teams items: type: string + examples: + default: + summary: Example removing a team in a branch protection rule + value: + teams: + - justice-league responses: '200': description: Response @@ -39171,7 +39350,7 @@ paths: properties: users: type: array - description: users parameter + description: The username for users items: type: string required: @@ -39182,6 +39361,12 @@ paths: - type: array items: type: string + examples: + default: + summary: Example adding a user in a branch protection rule + value: + users: + - octocat responses: '200': description: Response @@ -39229,7 +39414,7 @@ paths: properties: users: type: array - description: users parameter + description: The username for users items: type: string required: @@ -39240,6 +39425,12 @@ paths: - type: array items: type: string + examples: + default: + summary: Example replacing a user in a branch protection rule + value: + users: + - octocat responses: '200': description: Response @@ -39286,7 +39477,7 @@ paths: properties: users: type: array - description: users parameter + description: The username for users items: type: string required: @@ -39297,6 +39488,12 @@ paths: - type: array items: type: string + examples: + default: + summary: Example removing a user in a branch protection rule + value: + users: + - octocat responses: '200': description: Response @@ -42205,6 +42402,7 @@ paths: - ref: refs/heads/main analysis_key: ".github/workflows/codeql-analysis.yml:CodeQL-Build" environment: '' + category: ".github/workflows/codeql-analysis.yml:CodeQL-Build" state: open fixed_at: commit_sha: 39406e42cb832f683daa691dd652a8dc36ee8930 @@ -42294,6 +42492,16 @@ paths: description: An identifier for the upload. examples: - 6c81cd8e-b078-4ac3-a3be-1dad7dbd0b53 + - *53 + - name: sort + description: The property by which to sort the results. + in: query + required: false + schema: + type: string + enum: + - created + default: created responses: '200': description: Response @@ -42543,8 +42751,7 @@ paths: * `ref` * `tool` - * `analysis_key` - * `environment` + * `category` If you attempt to delete an analysis that is not the most recent in a set, you'll get a 400 response with the message: @@ -47372,14 +47579,16 @@ paths: support [a custom media type](https://docs.github.com/rest/reference/repos#custom-media-types) for\nretrieving the raw content or rendered HTML (when supported). All content types support [a custom media\ntype](https://docs.github.com/rest/reference/repos#custom-media-types) - to ensure the content is returned in a consistent\nobject format.\n\n**Note**:\n* + to ensure the content is returned in a consistent\nobject format.\n\n**Notes**:\n* \ To get a repository's contents recursively, you can [recursively get the tree](https://docs.github.com/rest/reference/git#trees).\n* This API has an upper limit of 1,000 files for a directory. If you need to retrieve more - files, use the [Git Trees\nAPI](https://docs.github.com/rest/reference/git#get-a-tree).\n\n#### - Size limits\nIf the requested file's size is:\n* 1 MB or smaller: All features - of this endpoint are supported.\n* Between 1-100 MB: Only the `raw` or `object` - [custom media types](https://docs.github.com/rest/repos/contents#custom-media-types-for-repository-contents) + files, use the [Git Trees\nAPI](https://docs.github.com/rest/reference/git#get-a-tree).\n + * Download URLs expire and are meant to be used just once. To ensure the + download URL does not expire, please use the contents API to obtain a fresh + download URL for each download.\n#### Size limits\nIf the requested file's + size is:\n* 1 MB or smaller: All features of this endpoint are supported.\n* + Between 1-100 MB: Only the `raw` or `object` [custom media types](https://docs.github.com/rest/repos/contents#custom-media-types-for-repository-contents) are supported. Both will work as normal, except that when using the `object` media type, the `content` field will be an empty string and the `encoding` field will be `\"none\"`. To get the contents of these larger files, use the @@ -50942,6 +51151,10 @@ paths: type: string description: When forking from an existing repository, a new name for the fork. + default_branch_only: + type: boolean + description: When forking from an existing repository, fork with + only the default branch. responses: '202': description: Response @@ -53746,6 +53959,12 @@ paths: content: application/json: schema: *345 + examples: + default: + summary: Example request body + value: + limit: collaborators_only + expiry: one_day responses: '200': description: Response @@ -53964,6 +54183,11 @@ paths: - maintain - triage - admin + examples: + default: + summary: Example request body + value: + permissions: write responses: '200': description: Response @@ -54341,6 +54565,7 @@ paths: type: User site_admin: false author_association: COLLABORATOR + state_reason: completed headers: Link: *26 '301': *216 @@ -54593,6 +54818,7 @@ paths: type: User site_admin: false author_association: COLLABORATOR + state_reason: completed headers: Location: example: https://api.github.com/repos/octocat/Hello-World/issues/1347 @@ -55282,6 +55508,7 @@ paths: created_at: '2011-04-22T13:33:48Z' updated_at: '2011-04-22T13:33:48Z' author_association: COLLABORATOR + state_reason: completed headers: Link: *26 '422': *10 @@ -55504,6 +55731,7 @@ paths: created_at: '2011-04-22T13:33:48Z' updated_at: '2011-04-22T13:33:48Z' author_association: COLLABORATOR + state_reason: completed '404': *15 '410': *214 '403': *22 @@ -55606,6 +55834,13 @@ paths: enum: - open - closed + state_reason: + type: + - string + - 'null' + description: The reason for the current state + examples: + - not_planned milestone: oneOf: - type: string @@ -72538,6 +72773,7 @@ paths: score: 1 locked: true author_association: COLLABORATOR + state_reason: completed '503': *62 '422': *10 '304': *25 diff --git a/descriptions-next/ghes-3.2/dereferenced/ghes-3.2.deref.json b/descriptions-next/ghes-3.2/dereferenced/ghes-3.2.deref.json index b2cbf155d8..1c4a1cfacb 100644 --- a/descriptions-next/ghes-3.2/dereferenced/ghes-3.2.deref.json +++ b/descriptions-next/ghes-3.2/dereferenced/ghes-3.2.deref.json @@ -4438,14 +4438,6 @@ "write" ] }, - "organization_custom_roles": { - "type": "string", - "description": "The level of permission to grant the access token for custom roles management.", - "enum": [ - "read", - "write" - ] - }, "deployments": { "type": "string", "description": "The level of permission to grant the access token for deployments and deployment statuses.", @@ -5691,14 +5683,6 @@ "write" ] }, - "organization_custom_roles": { - "type": "string", - "description": "The level of permission to grant the access token for custom roles management.", - "enum": [ - "read", - "write" - ] - }, "deployments": { "type": "string", "description": "The level of permission to grant the access token for deployments and deployment statuses.", @@ -6489,14 +6473,6 @@ "write" ] }, - "organization_custom_roles": { - "type": "string", - "description": "The level of permission to grant the access token for custom roles management.", - "enum": [ - "read", - "write" - ] - }, "deployments": { "type": "string", "description": "The level of permission to grant the access token for deployments and deployment statuses.", @@ -9493,14 +9469,6 @@ "write" ] }, - "organization_custom_roles": { - "type": "string", - "description": "The level of permission to grant the access token for custom roles management.", - "enum": [ - "read", - "write" - ] - }, "deployments": { "type": "string", "description": "The level of permission to grant the access token for deployments and deployment statuses.", @@ -10438,14 +10406,6 @@ "write" ] }, - "organization_custom_roles": { - "type": "string", - "description": "The level of permission to grant the access token for custom roles management.", - "enum": [ - "read", - "write" - ] - }, "deployments": { "type": "string", "description": "The level of permission to grant the access token for deployments and deployment statuses.", @@ -11169,14 +11129,6 @@ "write" ] }, - "organization_custom_roles": { - "type": "string", - "description": "The level of permission to grant the access token for custom roles management.", - "enum": [ - "read", - "write" - ] - }, "deployments": { "type": "string", "description": "The level of permission to grant the access token for deployments and deployment statuses.", @@ -11470,14 +11422,6 @@ "write" ] }, - "organization_custom_roles": { - "type": "string", - "description": "The level of permission to grant the access token for custom roles management.", - "enum": [ - "read", - "write" - ] - }, "deployments": { "type": "string", "description": "The level of permission to grant the access token for deployments and deployment statuses.", @@ -14948,14 +14892,6 @@ "write" ] }, - "organization_custom_roles": { - "type": "string", - "description": "The level of permission to grant the access token for custom roles management.", - "enum": [ - "read", - "write" - ] - }, "deployments": { "type": "string", "description": "The level of permission to grant the access token for deployments and deployment statuses.", @@ -15930,14 +15866,6 @@ "write" ] }, - "organization_custom_roles": { - "type": "string", - "description": "The level of permission to grant the access token for custom roles management.", - "enum": [ - "read", - "write" - ] - }, "deployments": { "type": "string", "description": "The level of permission to grant the access token for deployments and deployment statuses.", @@ -16784,14 +16712,6 @@ "write" ] }, - "organization_custom_roles": { - "type": "string", - "description": "The level of permission to grant the access token for custom roles management.", - "enum": [ - "read", - "write" - ] - }, "deployments": { "type": "string", "description": "The level of permission to grant the access token for deployments and deployment statuses.", @@ -17340,14 +17260,6 @@ "write" ] }, - "organization_custom_roles": { - "type": "string", - "description": "The level of permission to grant the access token for custom roles management.", - "enum": [ - "read", - "write" - ] - }, "deployments": { "type": "string", "description": "The level of permission to grant the access token for deployments and deployment statuses.", @@ -18396,14 +18308,6 @@ "write" ] }, - "organization_custom_roles": { - "type": "string", - "description": "The level of permission to grant the access token for custom roles management.", - "enum": [ - "read", - "write" - ] - }, "deployments": { "type": "string", "description": "The level of permission to grant the access token for deployments and deployment statuses.", @@ -19290,14 +19194,6 @@ "write" ] }, - "organization_custom_roles": { - "type": "string", - "description": "The level of permission to grant the access token for custom roles management.", - "enum": [ - "read", - "write" - ] - }, "deployments": { "type": "string", "description": "The level of permission to grant the access token for deployments and deployment statuses.", @@ -20676,14 +20572,6 @@ "write" ] }, - "organization_custom_roles": { - "type": "string", - "description": "The level of permission to grant the access token for custom roles management.", - "enum": [ - "read", - "write" - ] - }, "deployments": { "type": "string", "description": "The level of permission to grant the access token for deployments and deployment statuses.", @@ -21668,14 +21556,6 @@ "write" ] }, - "organization_custom_roles": { - "type": "string", - "description": "The level of permission to grant the access token for custom roles management.", - "enum": [ - "read", - "write" - ] - }, "deployments": { "type": "string", "description": "The level of permission to grant the access token for deployments and deployment statuses.", @@ -22733,14 +22613,6 @@ "write" ] }, - "organization_custom_roles": { - "type": "string", - "description": "The level of permission to grant the access token for custom roles management.", - "enum": [ - "read", - "write" - ] - }, "deployments": { "type": "string", "description": "The level of permission to grant the access token for deployments and deployment statuses.", @@ -23539,14 +23411,6 @@ "write" ] }, - "organization_custom_roles": { - "type": "string", - "description": "The level of permission to grant the access token for custom roles management.", - "enum": [ - "read", - "write" - ] - }, "deployments": { "type": "string", "description": "The level of permission to grant the access token for deployments and deployment statuses.", @@ -24582,14 +24446,6 @@ "write" ] }, - "organization_custom_roles": { - "type": "string", - "description": "The level of permission to grant the access token for custom roles management.", - "enum": [ - "read", - "write" - ] - }, "deployments": { "type": "string", "description": "The level of permission to grant the access token for deployments and deployment statuses.", @@ -25388,14 +25244,6 @@ "write" ] }, - "organization_custom_roles": { - "type": "string", - "description": "The level of permission to grant the access token for custom roles management.", - "enum": [ - "read", - "write" - ] - }, "deployments": { "type": "string", "description": "The level of permission to grant the access token for deployments and deployment statuses.", @@ -26305,14 +26153,6 @@ "write" ] }, - "organization_custom_roles": { - "type": "string", - "description": "The level of permission to grant the access token for custom roles management.", - "enum": [ - "read", - "write" - ] - }, "deployments": { "type": "string", "description": "The level of permission to grant the access token for deployments and deployment statuses.", @@ -27247,14 +27087,6 @@ "write" ] }, - "organization_custom_roles": { - "type": "string", - "description": "The level of permission to grant the access token for custom roles management.", - "enum": [ - "read", - "write" - ] - }, "deployments": { "type": "string", "description": "The level of permission to grant the access token for deployments and deployment statuses.", @@ -88566,14 +88398,6 @@ "write" ] }, - "organization_custom_roles": { - "type": "string", - "description": "The level of permission to grant the access token for custom roles management.", - "enum": [ - "read", - "write" - ] - }, "deployments": { "type": "string", "description": "The level of permission to grant the access token for deployments and deployment statuses.", @@ -89525,14 +89349,6 @@ "write" ] }, - "organization_custom_roles": { - "type": "string", - "description": "The level of permission to grant the access token for custom roles management.", - "enum": [ - "read", - "write" - ] - }, "deployments": { "type": "string", "description": "The level of permission to grant the access token for deployments and deployment statuses.", @@ -163212,6 +163028,115 @@ "protected", "protection_url" ] + }, + "examples": { + "default": { + "value": { + "name": "main", + "commit": { + "sha": "7fd1a60b01f91b314f59955a4e4d4e80d8edf11d", + "node_id": "MDY6Q29tbWl0MTI5NjI2OTo3ZmQxYTYwYjAxZjkxYjMxNGY1OTk1NWE0ZTRkNGU4MGQ4ZWRmMTFk", + "commit": { + "author": { + "name": "The Octocat", + "email": "octocat@nowhere.com", + "date": "2012-03-06T23:06:50Z" + }, + "committer": { + "name": "The Octocat", + "email": "octocat@nowhere.com", + "date": "2012-03-06T23:06:50Z" + }, + "message": "Merge pull request #6 from Spaceghost/patch-1\n\nNew line at end of file.", + "tree": { + "sha": "b4eecafa9be2f2006ce1b709d6857b07069b4608", + "url": "https://api.github.com/repos/octocat/Hello-World/git/trees/b4eecafa9be2f2006ce1b709d6857b07069b4608" + }, + "url": "https://api.github.com/repos/octocat/Hello-World/git/commits/7fd1a60b01f91b314f59955a4e4d4e80d8edf11d", + "comment_count": 77, + "verification": { + "verified": false, + "reason": "unsigned", + "signature": null, + "payload": null + } + }, + "url": "https://api.github.com/repos/octocat/Hello-World/commits/7fd1a60b01f91b314f59955a4e4d4e80d8edf11d", + "html_url": "https://github.com/octocat/Hello-World/commit/7fd1a60b01f91b314f59955a4e4d4e80d8edf11d", + "comments_url": "https://api.github.com/repos/octocat/Hello-World/commits/7fd1a60b01f91b314f59955a4e4d4e80d8edf11d/comments", + "author": { + "login": "octocat", + "id": 583231, + "node_id": "MDQ6VXNlcjU4MzIzMQ==", + "avatar_url": "https://avatars.githubusercontent.com/u/583231?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/octocat", + "html_url": "https://github.com/octocat", + "followers_url": "https://api.github.com/users/octocat/followers", + "following_url": "https://api.github.com/users/octocat/following{/other_user}", + "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}", + "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/octocat/subscriptions", + "organizations_url": "https://api.github.com/users/octocat/orgs", + "repos_url": "https://api.github.com/users/octocat/repos", + "events_url": "https://api.github.com/users/octocat/events{/privacy}", + "received_events_url": "https://api.github.com/users/octocat/received_events", + "type": "User", + "site_admin": false + }, + "committer": { + "login": "octocat", + "id": 583231, + "node_id": "MDQ6VXNlcjU4MzIzMQ==", + "avatar_url": "https://avatars.githubusercontent.com/u/583231?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/octocat", + "html_url": "https://github.com/octocat", + "followers_url": "https://api.github.com/users/octocat/followers", + "following_url": "https://api.github.com/users/octocat/following{/other_user}", + "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}", + "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/octocat/subscriptions", + "organizations_url": "https://api.github.com/users/octocat/orgs", + "repos_url": "https://api.github.com/users/octocat/repos", + "events_url": "https://api.github.com/users/octocat/events{/privacy}", + "received_events_url": "https://api.github.com/users/octocat/received_events", + "type": "User", + "site_admin": false + }, + "parents": [ + { + "sha": "553c2077f0edc3d5dc5d17262f6aa498e69d6f8e", + "url": "https://api.github.com/repos/octocat/Hello-World/commits/553c2077f0edc3d5dc5d17262f6aa498e69d6f8e", + "html_url": "https://github.com/octocat/Hello-World/commit/553c2077f0edc3d5dc5d17262f6aa498e69d6f8e" + }, + { + "sha": "762941318ee16e59dabbacb1b4049eec22f0d303", + "url": "https://api.github.com/repos/octocat/Hello-World/commits/762941318ee16e59dabbacb1b4049eec22f0d303", + "html_url": "https://github.com/octocat/Hello-World/commit/762941318ee16e59dabbacb1b4049eec22f0d303" + } + ] + }, + "_links": { + "self": "https://api.github.com/repos/octocat/Hello-World/branches/main", + "html": "https://github.com/octocat/Hello-World/tree/main" + }, + "protected": false, + "protection": { + "enabled": false, + "required_status_checks": { + "enforcement_level": "off", + "contexts": [ + + ], + "checks": [ + + ] + } + }, + "protection_url": "https://api.github.com/repos/octocat/Hello-World/branches/main/protection" + } + } } } } @@ -166250,6 +166175,85 @@ "required": [ "url" ] + }, + "examples": { + "default": { + "value": { + "url": "https://api.github.com/repos/octocat/hello-world/branches/main/protection", + "required_status_checks": { + "url": "https://api.github.com/repos/octocat/hello-world/branches/main/protection/required_status_checks", + "strict": true, + "contexts": [ + "continuous-integration/travis-ci" + ], + "contexts_url": "https://api.github.com/repos/octocat/hello-world/branches/main/protection/required_status_checks/contexts", + "checks": [ + { + "context": "continuous-integration/travis-ci", + "app_id": null + } + ] + }, + "restrictions": { + "url": "https://api.github.com/repos/octocat/hello-world/branches/main/protection/restrictions", + "users_url": "https://api.github.com/repos/octocat/hello-world/branches/main/protection/restrictions/users", + "teams_url": "https://api.github.com/repos/octocat/hello-world/branches/main/protection/restrictions/teams", + "apps_url": "https://api.github.com/repos/octocat/hello-world/branches/main/protection/restrictions/apps", + "users": [ + + ], + "teams": [ + + ], + "apps": [ + + ] + }, + "required_pull_request_reviews": { + "url": "https://api.github.com/repos/octocat/hello-world/branches/main/protection/required_pull_request_reviews", + "dismiss_stale_reviews": true, + "require_code_owner_reviews": true, + "required_approving_review_count": 2, + "dismissal_restrictions": { + "url": "https://api.github.com/repos/octocat/hello-world/branches/main/protection/dismissal_restrictions", + "users_url": "https://api.github.com/repos/octocat/hello-world/branches/main/protection/dismissal_restrictions/users", + "teams_url": "https://api.github.com/repos/octocat/hello-world/branches/main/protection/dismissal_restrictions/teams", + "users": [ + + ], + "teams": [ + + ], + "apps": [ + + ] + } + }, + "required_signatures": { + "url": "https://api.github.com/repos/octocat/hello-world/branches/main/protection/required_signatures", + "enabled": false + }, + "enforce_admins": { + "url": "https://api.github.com/repos/octocat/hello-world/branches/main/protection/enforce_admins", + "enabled": true + }, + "required_linear_history": { + "enabled": true + }, + "allow_force_pushes": { + "enabled": true + }, + "allow_deletions": { + "enabled": true + }, + "block_creations": { + "enabled": true + }, + "required_conversation_resolution": { + "enabled": true + } + } + } } } } @@ -169667,7 +169671,7 @@ "properties": { "contexts": { "type": "array", - "description": "contexts parameter", + "description": "The name of the status checks", "items": { "type": "string" } @@ -169684,12 +169688,23 @@ }, { "type": "array", - "description": "contexts parameter", + "description": "The name of the status checks", "items": { "type": "string" } } ] + }, + "examples": { + "default": { + "summary": "Example adding status checks to a branch protection rule", + "value": { + "contexts": [ + "continuous-integration/travis-ci", + "continuous-integration/jenkins" + ] + } + } } } } @@ -169904,7 +169919,7 @@ "properties": { "contexts": { "type": "array", - "description": "contexts parameter", + "description": "The name of the status checks", "items": { "type": "string" } @@ -169921,12 +169936,22 @@ }, { "type": "array", - "description": "contexts parameter", + "description": "The name of the status checks", "items": { "type": "string" } } ] + }, + "examples": { + "default": { + "summary": "Example updating status checks for a branch protection rule", + "value": { + "contexts": [ + "continuous-integration/travis-ci" + ] + } + } } } } @@ -170113,7 +170138,7 @@ "properties": { "contexts": { "type": "array", - "description": "contexts parameter", + "description": "The name of the status checks", "items": { "type": "string" } @@ -170130,12 +170155,22 @@ }, { "type": "array", - "description": "contexts parameter", + "description": "The name of the status checks", "items": { "type": "string" } } ] + }, + "examples": { + "default": { + "summary": "Example removing status checks from a branch protection rule", + "value": { + "contexts": [ + "continuous-integration/travis-ci" + ] + } + } } } } @@ -173257,7 +173292,7 @@ "properties": { "teams": { "type": "array", - "description": "teams parameter", + "description": "The slug values for teams", "items": { "type": "string" } @@ -173274,12 +173309,22 @@ }, { "type": "array", - "description": "teams parameter", + "description": "The slug values for teams", "items": { "type": "string" } } ] + }, + "examples": { + "default": { + "summary": "Example adding a team in a branch protection rule", + "value": { + "teams": [ + "justice-league" + ] + } + } } } } @@ -173651,7 +173696,7 @@ "properties": { "teams": { "type": "array", - "description": "teams parameter", + "description": "The slug values for teams", "items": { "type": "string" } @@ -173662,18 +173707,28 @@ ], "example": { "teams": [ - "my-team" + "justice-league" ] } }, { "type": "array", - "description": "teams parameter", + "description": "The slug values for teams", "items": { "type": "string" } } ] + }, + "examples": { + "default": { + "summary": "Example replacing a team in a branch protection rule", + "value": { + "teams": [ + "justice-league" + ] + } + } } } } @@ -174044,7 +174099,7 @@ "properties": { "teams": { "type": "array", - "description": "teams parameter", + "description": "The slug values for teams", "items": { "type": "string" } @@ -174061,12 +174116,22 @@ }, { "type": "array", - "description": "teams parameter", + "description": "The slug values for teams", "items": { "type": "string" } } ] + }, + "examples": { + "default": { + "summary": "Example removing a team in a branch protection rule", + "value": { + "teams": [ + "justice-league" + ] + } + } } } } @@ -174713,7 +174778,7 @@ "properties": { "users": { "type": "array", - "description": "users parameter", + "description": "The username for users", "items": { "type": "string" } @@ -174735,6 +174800,16 @@ } } ] + }, + "examples": { + "default": { + "summary": "Example adding a user in a branch protection rule", + "value": { + "users": [ + "octocat" + ] + } + } } } } @@ -175073,7 +175148,7 @@ "properties": { "users": { "type": "array", - "description": "users parameter", + "description": "The username for users", "items": { "type": "string" } @@ -175095,6 +175170,16 @@ } } ] + }, + "examples": { + "default": { + "summary": "Example replacing a user in a branch protection rule", + "value": { + "users": [ + "octocat" + ] + } + } } } } @@ -175432,7 +175517,7 @@ "properties": { "users": { "type": "array", - "description": "users parameter", + "description": "The username for users", "items": { "type": "string" } @@ -175454,6 +175539,16 @@ } } ] + }, + "examples": { + "default": { + "summary": "Example removing a user in a branch protection rule", + "value": { + "users": [ + "octocat" + ] + } + } } } } @@ -223980,7 +224075,7 @@ "/repos/{owner}/{repo}/contents/{path}": { "get": { "summary": "Get repository content", - "description": "Gets the contents of a file or directory in a repository. Specify the file path or directory in `:path`. If you omit\n`:path`, you will receive the contents of the repository's root directory. See the description below regarding what the API response includes for directories. \n\nFiles and symlinks support [a custom media type](https://docs.github.com/enterprise-server@3.2/rest/reference/repos#custom-media-types) for\nretrieving the raw content or rendered HTML (when supported). All content types support [a custom media\ntype](https://docs.github.com/enterprise-server@3.2/rest/reference/repos#custom-media-types) to ensure the content is returned in a consistent\nobject format.\n\n**Note**:\n* To get a repository's contents recursively, you can [recursively get the tree](https://docs.github.com/enterprise-server@3.2/rest/reference/git#trees).\n* This API has an upper limit of 1,000 files for a directory. If you need to retrieve more files, use the [Git Trees\nAPI](https://docs.github.com/enterprise-server@3.2/rest/reference/git#get-a-tree).\n* This API supports files up to 1 megabyte in size.\n\n#### If the content is a directory\nThe response will be an array of objects, one object for each item in the directory.\nWhen listing the contents of a directory, submodules have their \"type\" specified as \"file\". Logically, the value\n_should_ be \"submodule\". This behavior exists in API v3 [for backwards compatibility purposes](https://git.io/v1YCW).\nIn the next major version of the API, the type will be returned as \"submodule\".\n\n#### If the content is a symlink \nIf the requested `:path` points to a symlink, and the symlink's target is a normal file in the repository, then the\nAPI responds with the content of the file (in the format shown in the example. Otherwise, the API responds with an object \ndescribing the symlink itself.\n\n#### If the content is a submodule\nThe `submodule_git_url` identifies the location of the submodule repository, and the `sha` identifies a specific\ncommit within the submodule repository. Git uses the given URL when cloning the submodule repository, and checks out\nthe submodule at that specific commit.\n\nIf the submodule repository is not hosted on github.com, the Git URLs (`git_url` and `_links[\"git\"]`) and the\ngithub.com URLs (`html_url` and `_links[\"html\"]`) will have null values.", + "description": "Gets the contents of a file or directory in a repository. Specify the file path or directory in `:path`. If you omit\n`:path`, you will receive the contents of the repository's root directory. See the description below regarding what the API response includes for directories. \n\nFiles and symlinks support [a custom media type](https://docs.github.com/enterprise-server@3.2/rest/reference/repos#custom-media-types) for\nretrieving the raw content or rendered HTML (when supported). All content types support [a custom media\ntype](https://docs.github.com/enterprise-server@3.2/rest/reference/repos#custom-media-types) to ensure the content is returned in a consistent\nobject format.\n\n**Notes**:\n* To get a repository's contents recursively, you can [recursively get the tree](https://docs.github.com/enterprise-server@3.2/rest/reference/git#trees).\n* This API has an upper limit of 1,000 files for a directory. If you need to retrieve more files, use the [Git Trees\nAPI](https://docs.github.com/enterprise-server@3.2/rest/reference/git#get-a-tree).\n * Download URLs expire and are meant to be used just once. To ensure the download URL does not expire, please use the contents API to obtain a fresh download URL for each download. \n* This API supports files up to 1 megabyte in size.\n\n#### If the content is a directory\nThe response will be an array of objects, one object for each item in the directory.\nWhen listing the contents of a directory, submodules have their \"type\" specified as \"file\". Logically, the value\n_should_ be \"submodule\". This behavior exists in API v3 [for backwards compatibility purposes](https://git.io/v1YCW).\nIn the next major version of the API, the type will be returned as \"submodule\".\n\n#### If the content is a symlink \nIf the requested `:path` points to a symlink, and the symlink's target is a normal file in the repository, then the\nAPI responds with the content of the file (in the format shown in the example. Otherwise, the API responds with an object \ndescribing the symlink itself.\n\n#### If the content is a submodule\nThe `submodule_git_url` identifies the location of the submodule repository, and the `sha` identifies a specific\ncommit within the submodule repository. Git uses the given URL when cloning the submodule repository, and checks out\nthe submodule at that specific commit.\n\nIf the submodule repository is not hosted on github.com, the Git URLs (`git_url` and `_links[\"git\"]`) and the\ngithub.com URLs (`html_url` and `_links[\"html\"]`) will have null values.", "tags": [ "repos" ], @@ -253675,14 +253770,6 @@ "write" ] }, - "organization_custom_roles": { - "type": "string", - "description": "The level of permission to grant the access token for custom roles management.", - "enum": [ - "read", - "write" - ] - }, "deployments": { "type": "string", "description": "The level of permission to grant the access token for deployments and deployment statuses.", @@ -257038,6 +257125,14 @@ ] } } + }, + "examples": { + "default": { + "summary": "Example request body", + "value": { + "permissions": "write" + } + } } } } @@ -263036,7 +263131,8 @@ "type": "User", "site_admin": false }, - "author_association": "COLLABORATOR" + "author_association": "COLLABORATOR", + "state_reason": "completed" } ] } @@ -266484,7 +266580,8 @@ "type": "User", "site_admin": false }, - "author_association": "COLLABORATOR" + "author_association": "COLLABORATOR", + "state_reason": "completed" } } } @@ -275155,7 +275252,8 @@ "closed_at": null, "created_at": "2011-04-22T13:33:48Z", "updated_at": "2011-04-22T13:33:48Z", - "author_association": "COLLABORATOR" + "author_association": "COLLABORATOR", + "state_reason": "completed" } } ] @@ -280084,7 +280182,8 @@ "closed_at": null, "created_at": "2011-04-22T13:33:48Z", "updated_at": "2011-04-22T13:33:48Z", - "author_association": "COLLABORATOR" + "author_association": "COLLABORATOR", + "state_reason": "completed" } } } @@ -283374,7 +283473,8 @@ "type": "User", "site_admin": false }, - "author_association": "COLLABORATOR" + "author_association": "COLLABORATOR", + "state_reason": "completed" } } } @@ -283560,6 +283660,16 @@ "closed" ] }, + "state_reason": { + "type": [ + "string", + "null" + ], + "description": "The reason for the current state", + "examples": [ + "not_planned" + ] + }, "milestone": { "oneOf": [ { @@ -286786,7 +286896,8 @@ "type": "User", "site_admin": false }, - "author_association": "COLLABORATOR" + "author_association": "COLLABORATOR", + "state_reason": "completed" } } } @@ -290220,7 +290331,8 @@ "type": "User", "site_admin": false }, - "author_association": "COLLABORATOR" + "author_association": "COLLABORATOR", + "state_reason": "completed" } } } @@ -293451,7 +293563,8 @@ "type": "User", "site_admin": false }, - "author_association": "COLLABORATOR" + "author_association": "COLLABORATOR", + "state_reason": "completed" } } } @@ -402325,7 +402438,8 @@ "body": "...", "score": 1, "locked": true, - "author_association": "COLLABORATOR" + "author_association": "COLLABORATOR", + "state_reason": "completed" } ] } @@ -426063,14 +426177,6 @@ "write" ] }, - "organization_custom_roles": { - "type": "string", - "description": "The level of permission to grant the access token for custom roles management.", - "enum": [ - "read", - "write" - ] - }, "deployments": { "type": "string", "description": "The level of permission to grant the access token for deployments and deployment statuses.", @@ -463505,14 +463611,6 @@ "write" ] }, - "organization_custom_roles": { - "type": "string", - "description": "The level of permission to grant the access token for custom roles management.", - "enum": [ - "read", - "write" - ] - }, "deployments": { "type": "string", "description": "The level of permission to grant the access token for deployments and deployment statuses.", diff --git a/descriptions-next/ghes-3.2/dereferenced/ghes-3.2.deref.yaml b/descriptions-next/ghes-3.2/dereferenced/ghes-3.2.deref.yaml index c2921f7a33..bb0a090563 100644 --- a/descriptions-next/ghes-3.2/dereferenced/ghes-3.2.deref.yaml +++ b/descriptions-next/ghes-3.2/dereferenced/ghes-3.2.deref.yaml @@ -2609,13 +2609,6 @@ paths: enum: - read - write - organization_custom_roles: - type: string - description: The level of permission to grant the - access token for custom roles management. - enum: - - read - - write deployments: type: string description: The level of permission to grant the @@ -31345,6 +31338,95 @@ paths: - protection - protected - protection_url + examples: + default: + value: + name: main + commit: + sha: 7fd1a60b01f91b314f59955a4e4d4e80d8edf11d + node_id: MDY6Q29tbWl0MTI5NjI2OTo3ZmQxYTYwYjAxZjkxYjMxNGY1OTk1NWE0ZTRkNGU4MGQ4ZWRmMTFk + commit: + author: + name: The Octocat + email: octocat@nowhere.com + date: '2012-03-06T23:06:50Z' + committer: + name: The Octocat + email: octocat@nowhere.com + date: '2012-03-06T23:06:50Z' + message: |- + Merge pull request #6 from Spaceghost/patch-1 + + New line at end of file. + tree: + sha: b4eecafa9be2f2006ce1b709d6857b07069b4608 + url: https://api.github.com/repos/octocat/Hello-World/git/trees/b4eecafa9be2f2006ce1b709d6857b07069b4608 + url: https://api.github.com/repos/octocat/Hello-World/git/commits/7fd1a60b01f91b314f59955a4e4d4e80d8edf11d + comment_count: 77 + verification: + verified: false + reason: unsigned + signature: + payload: + url: https://api.github.com/repos/octocat/Hello-World/commits/7fd1a60b01f91b314f59955a4e4d4e80d8edf11d + html_url: https://github.com/octocat/Hello-World/commit/7fd1a60b01f91b314f59955a4e4d4e80d8edf11d + comments_url: https://api.github.com/repos/octocat/Hello-World/commits/7fd1a60b01f91b314f59955a4e4d4e80d8edf11d/comments + author: + login: octocat + id: 583231 + node_id: MDQ6VXNlcjU4MzIzMQ== + avatar_url: https://avatars.githubusercontent.com/u/583231?v=4 + gravatar_id: '' + url: https://api.github.com/users/octocat + html_url: https://github.com/octocat + followers_url: https://api.github.com/users/octocat/followers + following_url: https://api.github.com/users/octocat/following{/other_user} + gists_url: https://api.github.com/users/octocat/gists{/gist_id} + starred_url: https://api.github.com/users/octocat/starred{/owner}{/repo} + subscriptions_url: https://api.github.com/users/octocat/subscriptions + organizations_url: https://api.github.com/users/octocat/orgs + repos_url: https://api.github.com/users/octocat/repos + events_url: https://api.github.com/users/octocat/events{/privacy} + received_events_url: https://api.github.com/users/octocat/received_events + type: User + site_admin: false + committer: + login: octocat + id: 583231 + node_id: MDQ6VXNlcjU4MzIzMQ== + avatar_url: https://avatars.githubusercontent.com/u/583231?v=4 + gravatar_id: '' + url: https://api.github.com/users/octocat + html_url: https://github.com/octocat + followers_url: https://api.github.com/users/octocat/followers + following_url: https://api.github.com/users/octocat/following{/other_user} + gists_url: https://api.github.com/users/octocat/gists{/gist_id} + starred_url: https://api.github.com/users/octocat/starred{/owner}{/repo} + subscriptions_url: https://api.github.com/users/octocat/subscriptions + organizations_url: https://api.github.com/users/octocat/orgs + repos_url: https://api.github.com/users/octocat/repos + events_url: https://api.github.com/users/octocat/events{/privacy} + received_events_url: https://api.github.com/users/octocat/received_events + type: User + site_admin: false + parents: + - sha: 553c2077f0edc3d5dc5d17262f6aa498e69d6f8e + url: https://api.github.com/repos/octocat/Hello-World/commits/553c2077f0edc3d5dc5d17262f6aa498e69d6f8e + html_url: https://github.com/octocat/Hello-World/commit/553c2077f0edc3d5dc5d17262f6aa498e69d6f8e + - sha: 762941318ee16e59dabbacb1b4049eec22f0d303 + url: https://api.github.com/repos/octocat/Hello-World/commits/762941318ee16e59dabbacb1b4049eec22f0d303 + html_url: https://github.com/octocat/Hello-World/commit/762941318ee16e59dabbacb1b4049eec22f0d303 + _links: + self: https://api.github.com/repos/octocat/Hello-World/branches/main + html: https://github.com/octocat/Hello-World/tree/main + protected: false + protection: + enabled: false + required_status_checks: + enforcement_level: 'off' + contexts: [] + checks: [] + protection_url: https://api.github.com/repos/octocat/Hello-World/branches/main/protection '301': *171 '404': *35 x-github: @@ -31932,6 +32014,55 @@ paths: - enabled required: - url + examples: + default: + value: + url: https://api.github.com/repos/octocat/hello-world/branches/main/protection + required_status_checks: + url: https://api.github.com/repos/octocat/hello-world/branches/main/protection/required_status_checks + strict: true + contexts: + - continuous-integration/travis-ci + contexts_url: https://api.github.com/repos/octocat/hello-world/branches/main/protection/required_status_checks/contexts + checks: + - context: continuous-integration/travis-ci + app_id: + restrictions: + url: https://api.github.com/repos/octocat/hello-world/branches/main/protection/restrictions + users_url: https://api.github.com/repos/octocat/hello-world/branches/main/protection/restrictions/users + teams_url: https://api.github.com/repos/octocat/hello-world/branches/main/protection/restrictions/teams + apps_url: https://api.github.com/repos/octocat/hello-world/branches/main/protection/restrictions/apps + users: [] + teams: [] + apps: [] + required_pull_request_reviews: + url: https://api.github.com/repos/octocat/hello-world/branches/main/protection/required_pull_request_reviews + dismiss_stale_reviews: true + require_code_owner_reviews: true + required_approving_review_count: 2 + dismissal_restrictions: + url: https://api.github.com/repos/octocat/hello-world/branches/main/protection/dismissal_restrictions + users_url: https://api.github.com/repos/octocat/hello-world/branches/main/protection/dismissal_restrictions/users + teams_url: https://api.github.com/repos/octocat/hello-world/branches/main/protection/dismissal_restrictions/teams + users: [] + teams: [] + apps: [] + required_signatures: + url: https://api.github.com/repos/octocat/hello-world/branches/main/protection/required_signatures + enabled: false + enforce_admins: + url: https://api.github.com/repos/octocat/hello-world/branches/main/protection/enforce_admins + enabled: true + required_linear_history: + enabled: true + allow_force_pushes: + enabled: true + allow_deletions: + enabled: true + block_creations: + enabled: true + required_conversation_resolution: + enabled: true '403': *37 '422': *136 '404': *35 @@ -32567,7 +32698,7 @@ paths: properties: contexts: type: array - description: contexts parameter + description: The name of the status checks items: type: string required: @@ -32576,9 +32707,16 @@ paths: contexts: - contexts - type: array - description: contexts parameter + description: The name of the status checks items: type: string + examples: + default: + summary: Example adding status checks to a branch protection rule + value: + contexts: + - continuous-integration/travis-ci + - continuous-integration/jenkins responses: '200': description: Response @@ -32629,7 +32767,7 @@ paths: properties: contexts: type: array - description: contexts parameter + description: The name of the status checks items: type: string required: @@ -32638,9 +32776,15 @@ paths: contexts: - contexts - type: array - description: contexts parameter + description: The name of the status checks items: type: string + examples: + default: + summary: Example updating status checks for a branch protection rule + value: + contexts: + - continuous-integration/travis-ci responses: '200': description: Response @@ -32688,7 +32832,7 @@ paths: properties: contexts: type: array - description: contexts parameter + description: The name of the status checks items: type: string required: @@ -32697,9 +32841,15 @@ paths: contexts: - contexts - type: array - description: contexts parameter + description: The name of the status checks items: type: string + examples: + default: + summary: Example removing status checks from a branch protection rule + value: + contexts: + - continuous-integration/travis-ci responses: '200': description: Response @@ -33152,7 +33302,7 @@ paths: properties: teams: type: array - description: teams parameter + description: The slug values for teams items: type: string required: @@ -33161,9 +33311,15 @@ paths: teams: - my-team - type: array - description: teams parameter + description: The slug values for teams items: type: string + examples: + default: + summary: Example adding a team in a branch protection rule + value: + teams: + - justice-league responses: '200': description: Response @@ -33211,18 +33367,24 @@ paths: properties: teams: type: array - description: teams parameter + description: The slug values for teams items: type: string required: - teams example: teams: - - my-team + - justice-league - type: array - description: teams parameter + description: The slug values for teams items: type: string + examples: + default: + summary: Example replacing a team in a branch protection rule + value: + teams: + - justice-league responses: '200': description: Response @@ -33269,7 +33431,7 @@ paths: properties: teams: type: array - description: teams parameter + description: The slug values for teams items: type: string required: @@ -33278,9 +33440,15 @@ paths: teams: - my-team - type: array - description: teams parameter + description: The slug values for teams items: type: string + examples: + default: + summary: Example removing a team in a branch protection rule + value: + teams: + - justice-league responses: '200': description: Response @@ -33361,7 +33529,7 @@ paths: properties: users: type: array - description: users parameter + description: The username for users items: type: string required: @@ -33372,6 +33540,12 @@ paths: - type: array items: type: string + examples: + default: + summary: Example adding a user in a branch protection rule + value: + users: + - octocat responses: '200': description: Response @@ -33419,7 +33593,7 @@ paths: properties: users: type: array - description: users parameter + description: The username for users items: type: string required: @@ -33430,6 +33604,12 @@ paths: - type: array items: type: string + examples: + default: + summary: Example replacing a user in a branch protection rule + value: + users: + - octocat responses: '200': description: Response @@ -33476,7 +33656,7 @@ paths: properties: users: type: array - description: users parameter + description: The username for users items: type: string required: @@ -33487,6 +33667,12 @@ paths: - type: array items: type: string + examples: + default: + summary: Example removing a user in a branch protection rule + value: + users: + - octocat responses: '200': description: Response @@ -40587,29 +40773,31 @@ paths: support [a custom media type](https://docs.github.com/enterprise-server@3.2/rest/reference/repos#custom-media-types) for\nretrieving the raw content or rendered HTML (when supported). All content types support [a custom media\ntype](https://docs.github.com/enterprise-server@3.2/rest/reference/repos#custom-media-types) - to ensure the content is returned in a consistent\nobject format.\n\n**Note**:\n* + to ensure the content is returned in a consistent\nobject format.\n\n**Notes**:\n* \ To get a repository's contents recursively, you can [recursively get the tree](https://docs.github.com/enterprise-server@3.2/rest/reference/git#trees).\n* \ This API has an upper limit of 1,000 files for a directory. If you need - to retrieve more files, use the [Git Trees\nAPI](https://docs.github.com/enterprise-server@3.2/rest/reference/git#get-a-tree).\n* - \ This API supports files up to 1 megabyte in size.\n\n#### If the content - is a directory\nThe response will be an array of objects, one object for each - item in the directory.\nWhen listing the contents of a directory, submodules - have their \"type\" specified as \"file\". Logically, the value\n_should_ - be \"submodule\". This behavior exists in API v3 [for backwards compatibility - purposes](https://git.io/v1YCW).\nIn the next major version of the API, the - type will be returned as \"submodule\".\n\n#### If the content is a symlink - \nIf the requested `:path` points to a symlink, and the symlink's target is - a normal file in the repository, then the\nAPI responds with the content of - the file (in the format shown in the example. Otherwise, the API responds - with an object \ndescribing the symlink itself.\n\n#### If the content is - a submodule\nThe `submodule_git_url` identifies the location of the submodule - repository, and the `sha` identifies a specific\ncommit within the submodule - repository. Git uses the given URL when cloning the submodule repository, - and checks out\nthe submodule at that specific commit.\n\nIf the submodule - repository is not hosted on github.com, the Git URLs (`git_url` and `_links[\"git\"]`) - and the\ngithub.com URLs (`html_url` and `_links[\"html\"]`) will have null - values." + to retrieve more files, use the [Git Trees\nAPI](https://docs.github.com/enterprise-server@3.2/rest/reference/git#get-a-tree).\n + * Download URLs expire and are meant to be used just once. To ensure the + download URL does not expire, please use the contents API to obtain a fresh + download URL for each download. \n* This API supports files up to 1 megabyte + in size.\n\n#### If the content is a directory\nThe response will be an array + of objects, one object for each item in the directory.\nWhen listing the contents + of a directory, submodules have their \"type\" specified as \"file\". Logically, + the value\n_should_ be \"submodule\". This behavior exists in API v3 [for + backwards compatibility purposes](https://git.io/v1YCW).\nIn the next major + version of the API, the type will be returned as \"submodule\".\n\n#### If + the content is a symlink \nIf the requested `:path` points to a symlink, and + the symlink's target is a normal file in the repository, then the\nAPI responds + with the content of the file (in the format shown in the example. Otherwise, + the API responds with an object \ndescribing the symlink itself.\n\n#### If + the content is a submodule\nThe `submodule_git_url` identifies the location + of the submodule repository, and the `sha` identifies a specific\ncommit within + the submodule repository. Git uses the given URL when cloning the submodule + repository, and checks out\nthe submodule at that specific commit.\n\nIf the + submodule repository is not hosted on github.com, the Git URLs (`git_url` + and `_links[\"git\"]`) and the\ngithub.com URLs (`html_url` and `_links[\"html\"]`) + will have null values." tags: - repos operationId: repos/get-content @@ -45732,6 +45920,11 @@ paths: - maintain - triage - admin + examples: + default: + summary: Example request body + value: + permissions: write responses: '200': description: Response @@ -46109,6 +46302,7 @@ paths: type: User site_admin: false author_association: COLLABORATOR + state_reason: completed headers: Link: *7 '301': *171 @@ -46363,6 +46557,7 @@ paths: type: User site_admin: false author_association: COLLABORATOR + state_reason: completed headers: Location: example: https://api.github.com/repos/octocat/Hello-World/issues/1347 @@ -47072,6 +47267,7 @@ paths: created_at: '2011-04-22T13:33:48Z' updated_at: '2011-04-22T13:33:48Z' author_association: COLLABORATOR + state_reason: completed headers: Link: *7 '422': *31 @@ -47304,6 +47500,7 @@ paths: created_at: '2011-04-22T13:33:48Z' updated_at: '2011-04-22T13:33:48Z' author_association: COLLABORATOR + state_reason: completed '404': *35 '410': *138 '403': *37 @@ -47409,6 +47606,13 @@ paths: enum: - open - closed + state_reason: + type: + - string + - 'null' + description: The reason for the current state + examples: + - not_planned milestone: oneOf: - type: string @@ -61273,6 +61477,7 @@ paths: score: 1 locked: true author_association: COLLABORATOR + state_reason: completed '503': *224 '422': *31 '304': *40 diff --git a/descriptions-next/ghes-3.2/ghes-3.2.json b/descriptions-next/ghes-3.2/ghes-3.2.json index 225575b653..65870d7fb9 100644 --- a/descriptions-next/ghes-3.2/ghes-3.2.json +++ b/descriptions-next/ghes-3.2/ghes-3.2.json @@ -20582,6 +20582,11 @@ "application/json": { "schema": { "$ref": "#/components/schemas/branch-with-protection" + }, + "examples": { + "default": { + "$ref": "#/components/examples/branch-get" + } } } } @@ -20919,6 +20924,11 @@ "application/json": { "schema": { "$ref": "#/components/schemas/protected-branch" + }, + "examples": { + "default": { + "$ref": "#/components/examples/branch-protection-update" + } } } } @@ -21763,7 +21773,7 @@ "properties": { "contexts": { "type": "array", - "description": "contexts parameter", + "description": "The name of the status checks", "items": { "type": "string" } @@ -21780,12 +21790,23 @@ }, { "type": "array", - "description": "contexts parameter", + "description": "The name of the status checks", "items": { "type": "string" } } ] + }, + "examples": { + "default": { + "summary": "Example adding status checks to a branch protection rule", + "value": { + "contexts": [ + "continuous-integration/travis-ci", + "continuous-integration/jenkins" + ] + } + } } } } @@ -21863,7 +21884,7 @@ "properties": { "contexts": { "type": "array", - "description": "contexts parameter", + "description": "The name of the status checks", "items": { "type": "string" } @@ -21880,12 +21901,22 @@ }, { "type": "array", - "description": "contexts parameter", + "description": "The name of the status checks", "items": { "type": "string" } } ] + }, + "examples": { + "default": { + "summary": "Example updating status checks for a branch protection rule", + "value": { + "contexts": [ + "continuous-integration/travis-ci" + ] + } + } } } } @@ -21958,7 +21989,7 @@ "properties": { "contexts": { "type": "array", - "description": "contexts parameter", + "description": "The name of the status checks", "items": { "type": "string" } @@ -21975,12 +22006,22 @@ }, { "type": "array", - "description": "contexts parameter", + "description": "The name of the status checks", "items": { "type": "string" } } ] + }, + "examples": { + "default": { + "summary": "Example removing status checks from a branch protection rule", + "value": { + "contexts": [ + "continuous-integration/travis-ci" + ] + } + } } } } @@ -22516,7 +22557,7 @@ "properties": { "teams": { "type": "array", - "description": "teams parameter", + "description": "The slug values for teams", "items": { "type": "string" } @@ -22533,12 +22574,22 @@ }, { "type": "array", - "description": "teams parameter", + "description": "The slug values for teams", "items": { "type": "string" } } ] + }, + "examples": { + "default": { + "summary": "Example adding a team in a branch protection rule", + "value": { + "teams": [ + "justice-league" + ] + } + } } } } @@ -22607,7 +22658,7 @@ "properties": { "teams": { "type": "array", - "description": "teams parameter", + "description": "The slug values for teams", "items": { "type": "string" } @@ -22618,18 +22669,28 @@ ], "example": { "teams": [ - "my-team" + "justice-league" ] } }, { "type": "array", - "description": "teams parameter", + "description": "The slug values for teams", "items": { "type": "string" } } ] + }, + "examples": { + "default": { + "summary": "Example replacing a team in a branch protection rule", + "value": { + "teams": [ + "justice-league" + ] + } + } } } } @@ -22697,7 +22758,7 @@ "properties": { "teams": { "type": "array", - "description": "teams parameter", + "description": "The slug values for teams", "items": { "type": "string" } @@ -22714,12 +22775,22 @@ }, { "type": "array", - "description": "teams parameter", + "description": "The slug values for teams", "items": { "type": "string" } } ] + }, + "examples": { + "default": { + "summary": "Example removing a team in a branch protection rule", + "value": { + "teams": [ + "justice-league" + ] + } + } } } } @@ -22842,7 +22913,7 @@ "properties": { "users": { "type": "array", - "description": "users parameter", + "description": "The username for users", "items": { "type": "string" } @@ -22864,6 +22935,16 @@ } } ] + }, + "examples": { + "default": { + "summary": "Example adding a user in a branch protection rule", + "value": { + "users": [ + "octocat" + ] + } + } } } } @@ -22932,7 +23013,7 @@ "properties": { "users": { "type": "array", - "description": "users parameter", + "description": "The username for users", "items": { "type": "string" } @@ -22954,6 +23035,16 @@ } } ] + }, + "examples": { + "default": { + "summary": "Example replacing a user in a branch protection rule", + "value": { + "users": [ + "octocat" + ] + } + } } } } @@ -23021,7 +23112,7 @@ "properties": { "users": { "type": "array", - "description": "users parameter", + "description": "The username for users", "items": { "type": "string" } @@ -23043,6 +23134,16 @@ } } ] + }, + "examples": { + "default": { + "summary": "Example removing a user in a branch protection rule", + "value": { + "users": [ + "octocat" + ] + } + } } } } @@ -26751,7 +26852,7 @@ "/repos/{owner}/{repo}/contents/{path}": { "get": { "summary": "Get repository content", - "description": "Gets the contents of a file or directory in a repository. Specify the file path or directory in `:path`. If you omit\n`:path`, you will receive the contents of the repository's root directory. See the description below regarding what the API response includes for directories. \n\nFiles and symlinks support [a custom media type](https://docs.github.com/enterprise-server@3.2/rest/reference/repos#custom-media-types) for\nretrieving the raw content or rendered HTML (when supported). All content types support [a custom media\ntype](https://docs.github.com/enterprise-server@3.2/rest/reference/repos#custom-media-types) to ensure the content is returned in a consistent\nobject format.\n\n**Note**:\n* To get a repository's contents recursively, you can [recursively get the tree](https://docs.github.com/enterprise-server@3.2/rest/reference/git#trees).\n* This API has an upper limit of 1,000 files for a directory. If you need to retrieve more files, use the [Git Trees\nAPI](https://docs.github.com/enterprise-server@3.2/rest/reference/git#get-a-tree).\n* This API supports files up to 1 megabyte in size.\n\n#### If the content is a directory\nThe response will be an array of objects, one object for each item in the directory.\nWhen listing the contents of a directory, submodules have their \"type\" specified as \"file\". Logically, the value\n_should_ be \"submodule\". This behavior exists in API v3 [for backwards compatibility purposes](https://git.io/v1YCW).\nIn the next major version of the API, the type will be returned as \"submodule\".\n\n#### If the content is a symlink \nIf the requested `:path` points to a symlink, and the symlink's target is a normal file in the repository, then the\nAPI responds with the content of the file (in the format shown in the example. Otherwise, the API responds with an object \ndescribing the symlink itself.\n\n#### If the content is a submodule\nThe `submodule_git_url` identifies the location of the submodule repository, and the `sha` identifies a specific\ncommit within the submodule repository. Git uses the given URL when cloning the submodule repository, and checks out\nthe submodule at that specific commit.\n\nIf the submodule repository is not hosted on github.com, the Git URLs (`git_url` and `_links[\"git\"]`) and the\ngithub.com URLs (`html_url` and `_links[\"html\"]`) will have null values.", + "description": "Gets the contents of a file or directory in a repository. Specify the file path or directory in `:path`. If you omit\n`:path`, you will receive the contents of the repository's root directory. See the description below regarding what the API response includes for directories. \n\nFiles and symlinks support [a custom media type](https://docs.github.com/enterprise-server@3.2/rest/reference/repos#custom-media-types) for\nretrieving the raw content or rendered HTML (when supported). All content types support [a custom media\ntype](https://docs.github.com/enterprise-server@3.2/rest/reference/repos#custom-media-types) to ensure the content is returned in a consistent\nobject format.\n\n**Notes**:\n* To get a repository's contents recursively, you can [recursively get the tree](https://docs.github.com/enterprise-server@3.2/rest/reference/git#trees).\n* This API has an upper limit of 1,000 files for a directory. If you need to retrieve more files, use the [Git Trees\nAPI](https://docs.github.com/enterprise-server@3.2/rest/reference/git#get-a-tree).\n * Download URLs expire and are meant to be used just once. To ensure the download URL does not expire, please use the contents API to obtain a fresh download URL for each download. \n* This API supports files up to 1 megabyte in size.\n\n#### If the content is a directory\nThe response will be an array of objects, one object for each item in the directory.\nWhen listing the contents of a directory, submodules have their \"type\" specified as \"file\". Logically, the value\n_should_ be \"submodule\". This behavior exists in API v3 [for backwards compatibility purposes](https://git.io/v1YCW).\nIn the next major version of the API, the type will be returned as \"submodule\".\n\n#### If the content is a symlink \nIf the requested `:path` points to a symlink, and the symlink's target is a normal file in the repository, then the\nAPI responds with the content of the file (in the format shown in the example. Otherwise, the API responds with an object \ndescribing the symlink itself.\n\n#### If the content is a submodule\nThe `submodule_git_url` identifies the location of the submodule repository, and the `sha` identifies a specific\ncommit within the submodule repository. Git uses the given URL when cloning the submodule repository, and checks out\nthe submodule at that specific commit.\n\nIf the submodule repository is not hosted on github.com, the Git URLs (`git_url` and `_links[\"git\"]`) and the\ngithub.com URLs (`html_url` and `_links[\"html\"]`) will have null values.", "tags": [ "repos" ], @@ -30829,6 +30930,14 @@ ] } } + }, + "examples": { + "default": { + "summary": "Example request body", + "value": { + "permissions": "write" + } + } } } } @@ -31996,6 +32105,16 @@ "closed" ] }, + "state_reason": { + "type": [ + "string", + "null" + ], + "description": "The reason for the current state", + "examples": [ + "not_planned" + ] + }, "milestone": { "oneOf": [ { @@ -50130,14 +50249,6 @@ "write" ] }, - "organization_custom_roles": { - "type": "string", - "description": "The level of permission to grant the access token for custom roles management.", - "enum": [ - "read", - "write" - ] - }, "deployments": { "type": "string", "description": "The level of permission to grant the access token for deployments and deployment statuses.", @@ -83628,6 +83739,113 @@ } ] }, + "branch-get": { + "value": { + "name": "main", + "commit": { + "sha": "7fd1a60b01f91b314f59955a4e4d4e80d8edf11d", + "node_id": "MDY6Q29tbWl0MTI5NjI2OTo3ZmQxYTYwYjAxZjkxYjMxNGY1OTk1NWE0ZTRkNGU4MGQ4ZWRmMTFk", + "commit": { + "author": { + "name": "The Octocat", + "email": "octocat@nowhere.com", + "date": "2012-03-06T23:06:50Z" + }, + "committer": { + "name": "The Octocat", + "email": "octocat@nowhere.com", + "date": "2012-03-06T23:06:50Z" + }, + "message": "Merge pull request #6 from Spaceghost/patch-1\n\nNew line at end of file.", + "tree": { + "sha": "b4eecafa9be2f2006ce1b709d6857b07069b4608", + "url": "https://api.github.com/repos/octocat/Hello-World/git/trees/b4eecafa9be2f2006ce1b709d6857b07069b4608" + }, + "url": "https://api.github.com/repos/octocat/Hello-World/git/commits/7fd1a60b01f91b314f59955a4e4d4e80d8edf11d", + "comment_count": 77, + "verification": { + "verified": false, + "reason": "unsigned", + "signature": null, + "payload": null + } + }, + "url": "https://api.github.com/repos/octocat/Hello-World/commits/7fd1a60b01f91b314f59955a4e4d4e80d8edf11d", + "html_url": "https://github.com/octocat/Hello-World/commit/7fd1a60b01f91b314f59955a4e4d4e80d8edf11d", + "comments_url": "https://api.github.com/repos/octocat/Hello-World/commits/7fd1a60b01f91b314f59955a4e4d4e80d8edf11d/comments", + "author": { + "login": "octocat", + "id": 583231, + "node_id": "MDQ6VXNlcjU4MzIzMQ==", + "avatar_url": "https://avatars.githubusercontent.com/u/583231?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/octocat", + "html_url": "https://github.com/octocat", + "followers_url": "https://api.github.com/users/octocat/followers", + "following_url": "https://api.github.com/users/octocat/following{/other_user}", + "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}", + "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/octocat/subscriptions", + "organizations_url": "https://api.github.com/users/octocat/orgs", + "repos_url": "https://api.github.com/users/octocat/repos", + "events_url": "https://api.github.com/users/octocat/events{/privacy}", + "received_events_url": "https://api.github.com/users/octocat/received_events", + "type": "User", + "site_admin": false + }, + "committer": { + "login": "octocat", + "id": 583231, + "node_id": "MDQ6VXNlcjU4MzIzMQ==", + "avatar_url": "https://avatars.githubusercontent.com/u/583231?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/octocat", + "html_url": "https://github.com/octocat", + "followers_url": "https://api.github.com/users/octocat/followers", + "following_url": "https://api.github.com/users/octocat/following{/other_user}", + "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}", + "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/octocat/subscriptions", + "organizations_url": "https://api.github.com/users/octocat/orgs", + "repos_url": "https://api.github.com/users/octocat/repos", + "events_url": "https://api.github.com/users/octocat/events{/privacy}", + "received_events_url": "https://api.github.com/users/octocat/received_events", + "type": "User", + "site_admin": false + }, + "parents": [ + { + "sha": "553c2077f0edc3d5dc5d17262f6aa498e69d6f8e", + "url": "https://api.github.com/repos/octocat/Hello-World/commits/553c2077f0edc3d5dc5d17262f6aa498e69d6f8e", + "html_url": "https://github.com/octocat/Hello-World/commit/553c2077f0edc3d5dc5d17262f6aa498e69d6f8e" + }, + { + "sha": "762941318ee16e59dabbacb1b4049eec22f0d303", + "url": "https://api.github.com/repos/octocat/Hello-World/commits/762941318ee16e59dabbacb1b4049eec22f0d303", + "html_url": "https://github.com/octocat/Hello-World/commit/762941318ee16e59dabbacb1b4049eec22f0d303" + } + ] + }, + "_links": { + "self": "https://api.github.com/repos/octocat/Hello-World/branches/main", + "html": "https://github.com/octocat/Hello-World/tree/main" + }, + "protected": false, + "protection": { + "enabled": false, + "required_status_checks": { + "enforcement_level": "off", + "contexts": [ + + ], + "checks": [ + + ] + } + }, + "protection_url": "https://api.github.com/repos/octocat/Hello-World/branches/main/protection" + } + }, "branch-protection": { "value": { "url": "https://api.github.com/repos/octocat/Hello-World/branches/master/protection", @@ -83824,6 +84042,83 @@ } } }, + "branch-protection-update": { + "value": { + "url": "https://api.github.com/repos/octocat/hello-world/branches/main/protection", + "required_status_checks": { + "url": "https://api.github.com/repos/octocat/hello-world/branches/main/protection/required_status_checks", + "strict": true, + "contexts": [ + "continuous-integration/travis-ci" + ], + "contexts_url": "https://api.github.com/repos/octocat/hello-world/branches/main/protection/required_status_checks/contexts", + "checks": [ + { + "context": "continuous-integration/travis-ci", + "app_id": null + } + ] + }, + "restrictions": { + "url": "https://api.github.com/repos/octocat/hello-world/branches/main/protection/restrictions", + "users_url": "https://api.github.com/repos/octocat/hello-world/branches/main/protection/restrictions/users", + "teams_url": "https://api.github.com/repos/octocat/hello-world/branches/main/protection/restrictions/teams", + "apps_url": "https://api.github.com/repos/octocat/hello-world/branches/main/protection/restrictions/apps", + "users": [ + + ], + "teams": [ + + ], + "apps": [ + + ] + }, + "required_pull_request_reviews": { + "url": "https://api.github.com/repos/octocat/hello-world/branches/main/protection/required_pull_request_reviews", + "dismiss_stale_reviews": true, + "require_code_owner_reviews": true, + "required_approving_review_count": 2, + "dismissal_restrictions": { + "url": "https://api.github.com/repos/octocat/hello-world/branches/main/protection/dismissal_restrictions", + "users_url": "https://api.github.com/repos/octocat/hello-world/branches/main/protection/dismissal_restrictions/users", + "teams_url": "https://api.github.com/repos/octocat/hello-world/branches/main/protection/dismissal_restrictions/teams", + "users": [ + + ], + "teams": [ + + ], + "apps": [ + + ] + } + }, + "required_signatures": { + "url": "https://api.github.com/repos/octocat/hello-world/branches/main/protection/required_signatures", + "enabled": false + }, + "enforce_admins": { + "url": "https://api.github.com/repos/octocat/hello-world/branches/main/protection/enforce_admins", + "enabled": true + }, + "required_linear_history": { + "enabled": true + }, + "allow_force_pushes": { + "enabled": true + }, + "allow_deletions": { + "enabled": true + }, + "block_creations": { + "enabled": true + }, + "required_conversation_resolution": { + "enabled": true + } + } + }, "protected-branch-admin-enforced-2": { "value": { "url": "https://api.github.com/repos/octocat/Hello-World/branches/master/protection/enforce_admins", @@ -88596,7 +88891,8 @@ "type": "User", "site_admin": false }, - "author_association": "COLLABORATOR" + "author_association": "COLLABORATOR", + "state_reason": "completed" } ] }, @@ -88756,7 +89052,8 @@ "type": "User", "site_admin": false }, - "author_association": "COLLABORATOR" + "author_association": "COLLABORATOR", + "state_reason": "completed" } }, "issue-comment-items": { @@ -88992,7 +89289,8 @@ "closed_at": null, "created_at": "2011-04-22T13:33:48Z", "updated_at": "2011-04-22T13:33:48Z", - "author_association": "COLLABORATOR" + "author_association": "COLLABORATOR", + "state_reason": "completed" } } ] @@ -89201,7 +89499,8 @@ "closed_at": null, "created_at": "2011-04-22T13:33:48Z", "updated_at": "2011-04-22T13:33:48Z", - "author_association": "COLLABORATOR" + "author_association": "COLLABORATOR", + "state_reason": "completed" } } }, @@ -93365,7 +93664,8 @@ "body": "...", "score": 1, "locked": true, - "author_association": "COLLABORATOR" + "author_association": "COLLABORATOR", + "state_reason": "completed" } ] } diff --git a/descriptions-next/ghes-3.2/ghes-3.2.yaml b/descriptions-next/ghes-3.2/ghes-3.2.yaml index 67e08fc420..729667445a 100644 --- a/descriptions-next/ghes-3.2/ghes-3.2.yaml +++ b/descriptions-next/ghes-3.2/ghes-3.2.yaml @@ -14865,6 +14865,9 @@ paths: application/json: schema: "$ref": "#/components/schemas/branch-with-protection" + examples: + default: + "$ref": "#/components/examples/branch-get" '301': "$ref": "#/components/responses/moved_permanently" '404': @@ -15153,6 +15156,9 @@ paths: application/json: schema: "$ref": "#/components/schemas/protected-branch" + examples: + default: + "$ref": "#/components/examples/branch-protection-update" '403': "$ref": "#/components/responses/forbidden" '422': @@ -15764,7 +15770,7 @@ paths: properties: contexts: type: array - description: contexts parameter + description: The name of the status checks items: type: string required: @@ -15773,9 +15779,16 @@ paths: contexts: - contexts - type: array - description: contexts parameter + description: The name of the status checks items: type: string + examples: + default: + summary: Example adding status checks to a branch protection rule + value: + contexts: + - continuous-integration/travis-ci + - continuous-integration/jenkins responses: '200': description: Response @@ -15829,7 +15842,7 @@ paths: properties: contexts: type: array - description: contexts parameter + description: The name of the status checks items: type: string required: @@ -15838,9 +15851,15 @@ paths: contexts: - contexts - type: array - description: contexts parameter + description: The name of the status checks items: type: string + examples: + default: + summary: Example updating status checks for a branch protection rule + value: + contexts: + - continuous-integration/travis-ci responses: '200': description: Response @@ -15890,7 +15909,7 @@ paths: properties: contexts: type: array - description: contexts parameter + description: The name of the status checks items: type: string required: @@ -15899,9 +15918,15 @@ paths: contexts: - contexts - type: array - description: contexts parameter + description: The name of the status checks items: type: string + examples: + default: + summary: Example removing status checks from a branch protection rule + value: + contexts: + - continuous-integration/travis-ci responses: '200': description: Response @@ -16269,7 +16294,7 @@ paths: properties: teams: type: array - description: teams parameter + description: The slug values for teams items: type: string required: @@ -16278,9 +16303,15 @@ paths: teams: - my-team - type: array - description: teams parameter + description: The slug values for teams items: type: string + examples: + default: + summary: Example adding a team in a branch protection rule + value: + teams: + - justice-league responses: '200': description: Response @@ -16331,18 +16362,24 @@ paths: properties: teams: type: array - description: teams parameter + description: The slug values for teams items: type: string required: - teams example: teams: - - my-team + - justice-league - type: array - description: teams parameter + description: The slug values for teams items: type: string + examples: + default: + summary: Example replacing a team in a branch protection rule + value: + teams: + - justice-league responses: '200': description: Response @@ -16392,7 +16429,7 @@ paths: properties: teams: type: array - description: teams parameter + description: The slug values for teams items: type: string required: @@ -16401,9 +16438,15 @@ paths: teams: - my-team - type: array - description: teams parameter + description: The slug values for teams items: type: string + examples: + default: + summary: Example removing a team in a branch protection rule + value: + teams: + - justice-league responses: '200': description: Response @@ -16490,7 +16533,7 @@ paths: properties: users: type: array - description: users parameter + description: The username for users items: type: string required: @@ -16501,6 +16544,12 @@ paths: - type: array items: type: string + examples: + default: + summary: Example adding a user in a branch protection rule + value: + users: + - octocat responses: '200': description: Response @@ -16551,7 +16600,7 @@ paths: properties: users: type: array - description: users parameter + description: The username for users items: type: string required: @@ -16562,6 +16611,12 @@ paths: - type: array items: type: string + examples: + default: + summary: Example replacing a user in a branch protection rule + value: + users: + - octocat responses: '200': description: Response @@ -16611,7 +16666,7 @@ paths: properties: users: type: array - description: users parameter + description: The username for users items: type: string required: @@ -16622,6 +16677,12 @@ paths: - type: array items: type: string + examples: + default: + summary: Example removing a user in a branch protection rule + value: + users: + - octocat responses: '200': description: Response @@ -19540,29 +19601,31 @@ paths: support [a custom media type](https://docs.github.com/enterprise-server@3.2/rest/reference/repos#custom-media-types) for\nretrieving the raw content or rendered HTML (when supported). All content types support [a custom media\ntype](https://docs.github.com/enterprise-server@3.2/rest/reference/repos#custom-media-types) - to ensure the content is returned in a consistent\nobject format.\n\n**Note**:\n* + to ensure the content is returned in a consistent\nobject format.\n\n**Notes**:\n* \ To get a repository's contents recursively, you can [recursively get the tree](https://docs.github.com/enterprise-server@3.2/rest/reference/git#trees).\n* \ This API has an upper limit of 1,000 files for a directory. If you need - to retrieve more files, use the [Git Trees\nAPI](https://docs.github.com/enterprise-server@3.2/rest/reference/git#get-a-tree).\n* - \ This API supports files up to 1 megabyte in size.\n\n#### If the content - is a directory\nThe response will be an array of objects, one object for each - item in the directory.\nWhen listing the contents of a directory, submodules - have their \"type\" specified as \"file\". Logically, the value\n_should_ - be \"submodule\". This behavior exists in API v3 [for backwards compatibility - purposes](https://git.io/v1YCW).\nIn the next major version of the API, the - type will be returned as \"submodule\".\n\n#### If the content is a symlink - \nIf the requested `:path` points to a symlink, and the symlink's target is - a normal file in the repository, then the\nAPI responds with the content of - the file (in the format shown in the example. Otherwise, the API responds - with an object \ndescribing the symlink itself.\n\n#### If the content is - a submodule\nThe `submodule_git_url` identifies the location of the submodule - repository, and the `sha` identifies a specific\ncommit within the submodule - repository. Git uses the given URL when cloning the submodule repository, - and checks out\nthe submodule at that specific commit.\n\nIf the submodule - repository is not hosted on github.com, the Git URLs (`git_url` and `_links[\"git\"]`) - and the\ngithub.com URLs (`html_url` and `_links[\"html\"]`) will have null - values." + to retrieve more files, use the [Git Trees\nAPI](https://docs.github.com/enterprise-server@3.2/rest/reference/git#get-a-tree).\n + * Download URLs expire and are meant to be used just once. To ensure the + download URL does not expire, please use the contents API to obtain a fresh + download URL for each download. \n* This API supports files up to 1 megabyte + in size.\n\n#### If the content is a directory\nThe response will be an array + of objects, one object for each item in the directory.\nWhen listing the contents + of a directory, submodules have their \"type\" specified as \"file\". Logically, + the value\n_should_ be \"submodule\". This behavior exists in API v3 [for + backwards compatibility purposes](https://git.io/v1YCW).\nIn the next major + version of the API, the type will be returned as \"submodule\".\n\n#### If + the content is a symlink \nIf the requested `:path` points to a symlink, and + the symlink's target is a normal file in the repository, then the\nAPI responds + with the content of the file (in the format shown in the example. Otherwise, + the API responds with an object \ndescribing the symlink itself.\n\n#### If + the content is a submodule\nThe `submodule_git_url` identifies the location + of the submodule repository, and the `sha` identifies a specific\ncommit within + the submodule repository. Git uses the given URL when cloning the submodule + repository, and checks out\nthe submodule at that specific commit.\n\nIf the + submodule repository is not hosted on github.com, the Git URLs (`git_url` + and `_links[\"git\"]`) and the\ngithub.com URLs (`html_url` and `_links[\"html\"]`) + will have null values." tags: - repos operationId: repos/get-content @@ -22623,6 +22686,11 @@ paths: - maintain - triage - admin + examples: + default: + summary: Example request body + value: + permissions: write responses: '200': description: Response @@ -23455,6 +23523,13 @@ paths: enum: - open - closed + state_reason: + type: + - string + - 'null' + description: The reason for the current state + examples: + - not_planned milestone: oneOf: - type: string @@ -36461,13 +36536,6 @@ components: enum: - read - write - organization_custom_roles: - type: string - description: The level of permission to grant the access token for custom - roles management. - enum: - - read - - write deployments: type: string description: The level of permission to grant the access token for deployments @@ -62213,6 +62281,94 @@ components: - ci-test - linter protection_url: https://api.github.com/repos/octocat/hello-world/branches/master/protection + branch-get: + value: + name: main + commit: + sha: 7fd1a60b01f91b314f59955a4e4d4e80d8edf11d + node_id: MDY6Q29tbWl0MTI5NjI2OTo3ZmQxYTYwYjAxZjkxYjMxNGY1OTk1NWE0ZTRkNGU4MGQ4ZWRmMTFk + commit: + author: + name: The Octocat + email: octocat@nowhere.com + date: '2012-03-06T23:06:50Z' + committer: + name: The Octocat + email: octocat@nowhere.com + date: '2012-03-06T23:06:50Z' + message: |- + Merge pull request #6 from Spaceghost/patch-1 + + New line at end of file. + tree: + sha: b4eecafa9be2f2006ce1b709d6857b07069b4608 + url: https://api.github.com/repos/octocat/Hello-World/git/trees/b4eecafa9be2f2006ce1b709d6857b07069b4608 + url: https://api.github.com/repos/octocat/Hello-World/git/commits/7fd1a60b01f91b314f59955a4e4d4e80d8edf11d + comment_count: 77 + verification: + verified: false + reason: unsigned + signature: + payload: + url: https://api.github.com/repos/octocat/Hello-World/commits/7fd1a60b01f91b314f59955a4e4d4e80d8edf11d + html_url: https://github.com/octocat/Hello-World/commit/7fd1a60b01f91b314f59955a4e4d4e80d8edf11d + comments_url: https://api.github.com/repos/octocat/Hello-World/commits/7fd1a60b01f91b314f59955a4e4d4e80d8edf11d/comments + author: + login: octocat + id: 583231 + node_id: MDQ6VXNlcjU4MzIzMQ== + avatar_url: https://avatars.githubusercontent.com/u/583231?v=4 + gravatar_id: '' + url: https://api.github.com/users/octocat + html_url: https://github.com/octocat + followers_url: https://api.github.com/users/octocat/followers + following_url: https://api.github.com/users/octocat/following{/other_user} + gists_url: https://api.github.com/users/octocat/gists{/gist_id} + starred_url: https://api.github.com/users/octocat/starred{/owner}{/repo} + subscriptions_url: https://api.github.com/users/octocat/subscriptions + organizations_url: https://api.github.com/users/octocat/orgs + repos_url: https://api.github.com/users/octocat/repos + events_url: https://api.github.com/users/octocat/events{/privacy} + received_events_url: https://api.github.com/users/octocat/received_events + type: User + site_admin: false + committer: + login: octocat + id: 583231 + node_id: MDQ6VXNlcjU4MzIzMQ== + avatar_url: https://avatars.githubusercontent.com/u/583231?v=4 + gravatar_id: '' + url: https://api.github.com/users/octocat + html_url: https://github.com/octocat + followers_url: https://api.github.com/users/octocat/followers + following_url: https://api.github.com/users/octocat/following{/other_user} + gists_url: https://api.github.com/users/octocat/gists{/gist_id} + starred_url: https://api.github.com/users/octocat/starred{/owner}{/repo} + subscriptions_url: https://api.github.com/users/octocat/subscriptions + organizations_url: https://api.github.com/users/octocat/orgs + repos_url: https://api.github.com/users/octocat/repos + events_url: https://api.github.com/users/octocat/events{/privacy} + received_events_url: https://api.github.com/users/octocat/received_events + type: User + site_admin: false + parents: + - sha: 553c2077f0edc3d5dc5d17262f6aa498e69d6f8e + url: https://api.github.com/repos/octocat/Hello-World/commits/553c2077f0edc3d5dc5d17262f6aa498e69d6f8e + html_url: https://github.com/octocat/Hello-World/commit/553c2077f0edc3d5dc5d17262f6aa498e69d6f8e + - sha: 762941318ee16e59dabbacb1b4049eec22f0d303 + url: https://api.github.com/repos/octocat/Hello-World/commits/762941318ee16e59dabbacb1b4049eec22f0d303 + html_url: https://github.com/octocat/Hello-World/commit/762941318ee16e59dabbacb1b4049eec22f0d303 + _links: + self: https://api.github.com/repos/octocat/Hello-World/branches/main + html: https://github.com/octocat/Hello-World/tree/main + protected: false + protection: + enabled: false + required_status_checks: + enforcement_level: 'off' + contexts: [] + checks: [] + protection_url: https://api.github.com/repos/octocat/Hello-World/branches/main/protection branch-protection: value: url: https://api.github.com/repos/octocat/Hello-World/branches/master/protection @@ -62373,6 +62529,54 @@ components: enabled: true required_conversation_resolution: enabled: true + branch-protection-update: + value: + url: https://api.github.com/repos/octocat/hello-world/branches/main/protection + required_status_checks: + url: https://api.github.com/repos/octocat/hello-world/branches/main/protection/required_status_checks + strict: true + contexts: + - continuous-integration/travis-ci + contexts_url: https://api.github.com/repos/octocat/hello-world/branches/main/protection/required_status_checks/contexts + checks: + - context: continuous-integration/travis-ci + app_id: + restrictions: + url: https://api.github.com/repos/octocat/hello-world/branches/main/protection/restrictions + users_url: https://api.github.com/repos/octocat/hello-world/branches/main/protection/restrictions/users + teams_url: https://api.github.com/repos/octocat/hello-world/branches/main/protection/restrictions/teams + apps_url: https://api.github.com/repos/octocat/hello-world/branches/main/protection/restrictions/apps + users: [] + teams: [] + apps: [] + required_pull_request_reviews: + url: https://api.github.com/repos/octocat/hello-world/branches/main/protection/required_pull_request_reviews + dismiss_stale_reviews: true + require_code_owner_reviews: true + required_approving_review_count: 2 + dismissal_restrictions: + url: https://api.github.com/repos/octocat/hello-world/branches/main/protection/dismissal_restrictions + users_url: https://api.github.com/repos/octocat/hello-world/branches/main/protection/dismissal_restrictions/users + teams_url: https://api.github.com/repos/octocat/hello-world/branches/main/protection/dismissal_restrictions/teams + users: [] + teams: [] + apps: [] + required_signatures: + url: https://api.github.com/repos/octocat/hello-world/branches/main/protection/required_signatures + enabled: false + enforce_admins: + url: https://api.github.com/repos/octocat/hello-world/branches/main/protection/enforce_admins + enabled: true + required_linear_history: + enabled: true + allow_force_pushes: + enabled: true + allow_deletions: + enabled: true + block_creations: + enabled: true + required_conversation_resolution: + enabled: true protected-branch-admin-enforced-2: value: url: https://api.github.com/repos/octocat/Hello-World/branches/master/protection/enforce_admins @@ -66502,6 +66706,7 @@ components: type: User site_admin: false author_association: COLLABORATOR + state_reason: completed issue: value: id: 1 @@ -66647,6 +66852,7 @@ components: type: User site_admin: false author_association: COLLABORATOR + state_reason: completed issue-comment-items: value: - id: 1 @@ -66860,6 +67066,7 @@ components: created_at: '2011-04-22T13:33:48Z' updated_at: '2011-04-22T13:33:48Z' author_association: COLLABORATOR + state_reason: completed issue-event: value: id: 1 @@ -67049,6 +67256,7 @@ components: created_at: '2011-04-22T13:33:48Z' updated_at: '2011-04-22T13:33:48Z' author_association: COLLABORATOR + state_reason: completed issue-event-for-issue-items: value: - id: 1 @@ -70782,6 +70990,7 @@ components: score: 1 locked: true author_association: COLLABORATOR + state_reason: completed label-search-result-item-paginated: value: total_count: 2 diff --git a/descriptions-next/ghes-3.3/dereferenced/ghes-3.3.deref.json b/descriptions-next/ghes-3.3/dereferenced/ghes-3.3.deref.json index f81dad9fce..b5c9714ad4 100644 --- a/descriptions-next/ghes-3.3/dereferenced/ghes-3.3.deref.json +++ b/descriptions-next/ghes-3.3/dereferenced/ghes-3.3.deref.json @@ -4292,14 +4292,6 @@ "write" ] }, - "organization_custom_roles": { - "type": "string", - "description": "The level of permission to grant the access token for custom roles management.", - "enum": [ - "read", - "write" - ] - }, "deployments": { "type": "string", "description": "The level of permission to grant the access token for deployments and deployment statuses.", @@ -5545,14 +5537,6 @@ "write" ] }, - "organization_custom_roles": { - "type": "string", - "description": "The level of permission to grant the access token for custom roles management.", - "enum": [ - "read", - "write" - ] - }, "deployments": { "type": "string", "description": "The level of permission to grant the access token for deployments and deployment statuses.", @@ -6343,14 +6327,6 @@ "write" ] }, - "organization_custom_roles": { - "type": "string", - "description": "The level of permission to grant the access token for custom roles management.", - "enum": [ - "read", - "write" - ] - }, "deployments": { "type": "string", "description": "The level of permission to grant the access token for deployments and deployment statuses.", @@ -9347,14 +9323,6 @@ "write" ] }, - "organization_custom_roles": { - "type": "string", - "description": "The level of permission to grant the access token for custom roles management.", - "enum": [ - "read", - "write" - ] - }, "deployments": { "type": "string", "description": "The level of permission to grant the access token for deployments and deployment statuses.", @@ -10292,14 +10260,6 @@ "write" ] }, - "organization_custom_roles": { - "type": "string", - "description": "The level of permission to grant the access token for custom roles management.", - "enum": [ - "read", - "write" - ] - }, "deployments": { "type": "string", "description": "The level of permission to grant the access token for deployments and deployment statuses.", @@ -11023,14 +10983,6 @@ "write" ] }, - "organization_custom_roles": { - "type": "string", - "description": "The level of permission to grant the access token for custom roles management.", - "enum": [ - "read", - "write" - ] - }, "deployments": { "type": "string", "description": "The level of permission to grant the access token for deployments and deployment statuses.", @@ -11324,14 +11276,6 @@ "write" ] }, - "organization_custom_roles": { - "type": "string", - "description": "The level of permission to grant the access token for custom roles management.", - "enum": [ - "read", - "write" - ] - }, "deployments": { "type": "string", "description": "The level of permission to grant the access token for deployments and deployment statuses.", @@ -14813,14 +14757,6 @@ "write" ] }, - "organization_custom_roles": { - "type": "string", - "description": "The level of permission to grant the access token for custom roles management.", - "enum": [ - "read", - "write" - ] - }, "deployments": { "type": "string", "description": "The level of permission to grant the access token for deployments and deployment statuses.", @@ -15795,14 +15731,6 @@ "write" ] }, - "organization_custom_roles": { - "type": "string", - "description": "The level of permission to grant the access token for custom roles management.", - "enum": [ - "read", - "write" - ] - }, "deployments": { "type": "string", "description": "The level of permission to grant the access token for deployments and deployment statuses.", @@ -16649,14 +16577,6 @@ "write" ] }, - "organization_custom_roles": { - "type": "string", - "description": "The level of permission to grant the access token for custom roles management.", - "enum": [ - "read", - "write" - ] - }, "deployments": { "type": "string", "description": "The level of permission to grant the access token for deployments and deployment statuses.", @@ -17205,14 +17125,6 @@ "write" ] }, - "organization_custom_roles": { - "type": "string", - "description": "The level of permission to grant the access token for custom roles management.", - "enum": [ - "read", - "write" - ] - }, "deployments": { "type": "string", "description": "The level of permission to grant the access token for deployments and deployment statuses.", @@ -18261,14 +18173,6 @@ "write" ] }, - "organization_custom_roles": { - "type": "string", - "description": "The level of permission to grant the access token for custom roles management.", - "enum": [ - "read", - "write" - ] - }, "deployments": { "type": "string", "description": "The level of permission to grant the access token for deployments and deployment statuses.", @@ -19155,14 +19059,6 @@ "write" ] }, - "organization_custom_roles": { - "type": "string", - "description": "The level of permission to grant the access token for custom roles management.", - "enum": [ - "read", - "write" - ] - }, "deployments": { "type": "string", "description": "The level of permission to grant the access token for deployments and deployment statuses.", @@ -20541,14 +20437,6 @@ "write" ] }, - "organization_custom_roles": { - "type": "string", - "description": "The level of permission to grant the access token for custom roles management.", - "enum": [ - "read", - "write" - ] - }, "deployments": { "type": "string", "description": "The level of permission to grant the access token for deployments and deployment statuses.", @@ -21533,14 +21421,6 @@ "write" ] }, - "organization_custom_roles": { - "type": "string", - "description": "The level of permission to grant the access token for custom roles management.", - "enum": [ - "read", - "write" - ] - }, "deployments": { "type": "string", "description": "The level of permission to grant the access token for deployments and deployment statuses.", @@ -22598,14 +22478,6 @@ "write" ] }, - "organization_custom_roles": { - "type": "string", - "description": "The level of permission to grant the access token for custom roles management.", - "enum": [ - "read", - "write" - ] - }, "deployments": { "type": "string", "description": "The level of permission to grant the access token for deployments and deployment statuses.", @@ -23404,14 +23276,6 @@ "write" ] }, - "organization_custom_roles": { - "type": "string", - "description": "The level of permission to grant the access token for custom roles management.", - "enum": [ - "read", - "write" - ] - }, "deployments": { "type": "string", "description": "The level of permission to grant the access token for deployments and deployment statuses.", @@ -24447,14 +24311,6 @@ "write" ] }, - "organization_custom_roles": { - "type": "string", - "description": "The level of permission to grant the access token for custom roles management.", - "enum": [ - "read", - "write" - ] - }, "deployments": { "type": "string", "description": "The level of permission to grant the access token for deployments and deployment statuses.", @@ -25253,14 +25109,6 @@ "write" ] }, - "organization_custom_roles": { - "type": "string", - "description": "The level of permission to grant the access token for custom roles management.", - "enum": [ - "read", - "write" - ] - }, "deployments": { "type": "string", "description": "The level of permission to grant the access token for deployments and deployment statuses.", @@ -26170,14 +26018,6 @@ "write" ] }, - "organization_custom_roles": { - "type": "string", - "description": "The level of permission to grant the access token for custom roles management.", - "enum": [ - "read", - "write" - ] - }, "deployments": { "type": "string", "description": "The level of permission to grant the access token for deployments and deployment statuses.", @@ -27112,14 +26952,6 @@ "write" ] }, - "organization_custom_roles": { - "type": "string", - "description": "The level of permission to grant the access token for custom roles management.", - "enum": [ - "read", - "write" - ] - }, "deployments": { "type": "string", "description": "The level of permission to grant the access token for deployments and deployment statuses.", @@ -89352,14 +89184,6 @@ "write" ] }, - "organization_custom_roles": { - "type": "string", - "description": "The level of permission to grant the access token for custom roles management.", - "enum": [ - "read", - "write" - ] - }, "deployments": { "type": "string", "description": "The level of permission to grant the access token for deployments and deployment statuses.", @@ -90311,14 +90135,6 @@ "write" ] }, - "organization_custom_roles": { - "type": "string", - "description": "The level of permission to grant the access token for custom roles management.", - "enum": [ - "read", - "write" - ] - }, "deployments": { "type": "string", "description": "The level of permission to grant the access token for deployments and deployment statuses.", @@ -165228,6 +165044,115 @@ "protected", "protection_url" ] + }, + "examples": { + "default": { + "value": { + "name": "main", + "commit": { + "sha": "7fd1a60b01f91b314f59955a4e4d4e80d8edf11d", + "node_id": "MDY6Q29tbWl0MTI5NjI2OTo3ZmQxYTYwYjAxZjkxYjMxNGY1OTk1NWE0ZTRkNGU4MGQ4ZWRmMTFk", + "commit": { + "author": { + "name": "The Octocat", + "email": "octocat@nowhere.com", + "date": "2012-03-06T23:06:50Z" + }, + "committer": { + "name": "The Octocat", + "email": "octocat@nowhere.com", + "date": "2012-03-06T23:06:50Z" + }, + "message": "Merge pull request #6 from Spaceghost/patch-1\n\nNew line at end of file.", + "tree": { + "sha": "b4eecafa9be2f2006ce1b709d6857b07069b4608", + "url": "https://api.github.com/repos/octocat/Hello-World/git/trees/b4eecafa9be2f2006ce1b709d6857b07069b4608" + }, + "url": "https://api.github.com/repos/octocat/Hello-World/git/commits/7fd1a60b01f91b314f59955a4e4d4e80d8edf11d", + "comment_count": 77, + "verification": { + "verified": false, + "reason": "unsigned", + "signature": null, + "payload": null + } + }, + "url": "https://api.github.com/repos/octocat/Hello-World/commits/7fd1a60b01f91b314f59955a4e4d4e80d8edf11d", + "html_url": "https://github.com/octocat/Hello-World/commit/7fd1a60b01f91b314f59955a4e4d4e80d8edf11d", + "comments_url": "https://api.github.com/repos/octocat/Hello-World/commits/7fd1a60b01f91b314f59955a4e4d4e80d8edf11d/comments", + "author": { + "login": "octocat", + "id": 583231, + "node_id": "MDQ6VXNlcjU4MzIzMQ==", + "avatar_url": "https://avatars.githubusercontent.com/u/583231?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/octocat", + "html_url": "https://github.com/octocat", + "followers_url": "https://api.github.com/users/octocat/followers", + "following_url": "https://api.github.com/users/octocat/following{/other_user}", + "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}", + "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/octocat/subscriptions", + "organizations_url": "https://api.github.com/users/octocat/orgs", + "repos_url": "https://api.github.com/users/octocat/repos", + "events_url": "https://api.github.com/users/octocat/events{/privacy}", + "received_events_url": "https://api.github.com/users/octocat/received_events", + "type": "User", + "site_admin": false + }, + "committer": { + "login": "octocat", + "id": 583231, + "node_id": "MDQ6VXNlcjU4MzIzMQ==", + "avatar_url": "https://avatars.githubusercontent.com/u/583231?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/octocat", + "html_url": "https://github.com/octocat", + "followers_url": "https://api.github.com/users/octocat/followers", + "following_url": "https://api.github.com/users/octocat/following{/other_user}", + "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}", + "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/octocat/subscriptions", + "organizations_url": "https://api.github.com/users/octocat/orgs", + "repos_url": "https://api.github.com/users/octocat/repos", + "events_url": "https://api.github.com/users/octocat/events{/privacy}", + "received_events_url": "https://api.github.com/users/octocat/received_events", + "type": "User", + "site_admin": false + }, + "parents": [ + { + "sha": "553c2077f0edc3d5dc5d17262f6aa498e69d6f8e", + "url": "https://api.github.com/repos/octocat/Hello-World/commits/553c2077f0edc3d5dc5d17262f6aa498e69d6f8e", + "html_url": "https://github.com/octocat/Hello-World/commit/553c2077f0edc3d5dc5d17262f6aa498e69d6f8e" + }, + { + "sha": "762941318ee16e59dabbacb1b4049eec22f0d303", + "url": "https://api.github.com/repos/octocat/Hello-World/commits/762941318ee16e59dabbacb1b4049eec22f0d303", + "html_url": "https://github.com/octocat/Hello-World/commit/762941318ee16e59dabbacb1b4049eec22f0d303" + } + ] + }, + "_links": { + "self": "https://api.github.com/repos/octocat/Hello-World/branches/main", + "html": "https://github.com/octocat/Hello-World/tree/main" + }, + "protected": false, + "protection": { + "enabled": false, + "required_status_checks": { + "enforcement_level": "off", + "contexts": [ + + ], + "checks": [ + + ] + } + }, + "protection_url": "https://api.github.com/repos/octocat/Hello-World/branches/main/protection" + } + } } } } @@ -168260,6 +168185,85 @@ "required": [ "url" ] + }, + "examples": { + "default": { + "value": { + "url": "https://api.github.com/repos/octocat/hello-world/branches/main/protection", + "required_status_checks": { + "url": "https://api.github.com/repos/octocat/hello-world/branches/main/protection/required_status_checks", + "strict": true, + "contexts": [ + "continuous-integration/travis-ci" + ], + "contexts_url": "https://api.github.com/repos/octocat/hello-world/branches/main/protection/required_status_checks/contexts", + "checks": [ + { + "context": "continuous-integration/travis-ci", + "app_id": null + } + ] + }, + "restrictions": { + "url": "https://api.github.com/repos/octocat/hello-world/branches/main/protection/restrictions", + "users_url": "https://api.github.com/repos/octocat/hello-world/branches/main/protection/restrictions/users", + "teams_url": "https://api.github.com/repos/octocat/hello-world/branches/main/protection/restrictions/teams", + "apps_url": "https://api.github.com/repos/octocat/hello-world/branches/main/protection/restrictions/apps", + "users": [ + + ], + "teams": [ + + ], + "apps": [ + + ] + }, + "required_pull_request_reviews": { + "url": "https://api.github.com/repos/octocat/hello-world/branches/main/protection/required_pull_request_reviews", + "dismiss_stale_reviews": true, + "require_code_owner_reviews": true, + "required_approving_review_count": 2, + "dismissal_restrictions": { + "url": "https://api.github.com/repos/octocat/hello-world/branches/main/protection/dismissal_restrictions", + "users_url": "https://api.github.com/repos/octocat/hello-world/branches/main/protection/dismissal_restrictions/users", + "teams_url": "https://api.github.com/repos/octocat/hello-world/branches/main/protection/dismissal_restrictions/teams", + "users": [ + + ], + "teams": [ + + ], + "apps": [ + + ] + } + }, + "required_signatures": { + "url": "https://api.github.com/repos/octocat/hello-world/branches/main/protection/required_signatures", + "enabled": false + }, + "enforce_admins": { + "url": "https://api.github.com/repos/octocat/hello-world/branches/main/protection/enforce_admins", + "enabled": true + }, + "required_linear_history": { + "enabled": true + }, + "allow_force_pushes": { + "enabled": true + }, + "allow_deletions": { + "enabled": true + }, + "block_creations": { + "enabled": true + }, + "required_conversation_resolution": { + "enabled": true + } + } + } } } } @@ -171641,7 +171645,7 @@ "properties": { "contexts": { "type": "array", - "description": "contexts parameter", + "description": "The name of the status checks", "items": { "type": "string" } @@ -171658,12 +171662,23 @@ }, { "type": "array", - "description": "contexts parameter", + "description": "The name of the status checks", "items": { "type": "string" } } ] + }, + "examples": { + "default": { + "summary": "Example adding status checks to a branch protection rule", + "value": { + "contexts": [ + "continuous-integration/travis-ci", + "continuous-integration/jenkins" + ] + } + } } } } @@ -171878,7 +171893,7 @@ "properties": { "contexts": { "type": "array", - "description": "contexts parameter", + "description": "The name of the status checks", "items": { "type": "string" } @@ -171895,12 +171910,22 @@ }, { "type": "array", - "description": "contexts parameter", + "description": "The name of the status checks", "items": { "type": "string" } } ] + }, + "examples": { + "default": { + "summary": "Example updating status checks for a branch protection rule", + "value": { + "contexts": [ + "continuous-integration/travis-ci" + ] + } + } } } } @@ -172087,7 +172112,7 @@ "properties": { "contexts": { "type": "array", - "description": "contexts parameter", + "description": "The name of the status checks", "items": { "type": "string" } @@ -172104,12 +172129,22 @@ }, { "type": "array", - "description": "contexts parameter", + "description": "The name of the status checks", "items": { "type": "string" } } ] + }, + "examples": { + "default": { + "summary": "Example removing status checks from a branch protection rule", + "value": { + "contexts": [ + "continuous-integration/travis-ci" + ] + } + } } } } @@ -175231,7 +175266,7 @@ "properties": { "teams": { "type": "array", - "description": "teams parameter", + "description": "The slug values for teams", "items": { "type": "string" } @@ -175248,12 +175283,22 @@ }, { "type": "array", - "description": "teams parameter", + "description": "The slug values for teams", "items": { "type": "string" } } ] + }, + "examples": { + "default": { + "summary": "Example adding a team in a branch protection rule", + "value": { + "teams": [ + "justice-league" + ] + } + } } } } @@ -175625,7 +175670,7 @@ "properties": { "teams": { "type": "array", - "description": "teams parameter", + "description": "The slug values for teams", "items": { "type": "string" } @@ -175636,18 +175681,28 @@ ], "example": { "teams": [ - "my-team" + "justice-league" ] } }, { "type": "array", - "description": "teams parameter", + "description": "The slug values for teams", "items": { "type": "string" } } ] + }, + "examples": { + "default": { + "summary": "Example replacing a team in a branch protection rule", + "value": { + "teams": [ + "justice-league" + ] + } + } } } } @@ -176018,7 +176073,7 @@ "properties": { "teams": { "type": "array", - "description": "teams parameter", + "description": "The slug values for teams", "items": { "type": "string" } @@ -176035,12 +176090,22 @@ }, { "type": "array", - "description": "teams parameter", + "description": "The slug values for teams", "items": { "type": "string" } } ] + }, + "examples": { + "default": { + "summary": "Example removing a team in a branch protection rule", + "value": { + "teams": [ + "justice-league" + ] + } + } } } } @@ -176687,7 +176752,7 @@ "properties": { "users": { "type": "array", - "description": "users parameter", + "description": "The username for users", "items": { "type": "string" } @@ -176709,6 +176774,16 @@ } } ] + }, + "examples": { + "default": { + "summary": "Example adding a user in a branch protection rule", + "value": { + "users": [ + "octocat" + ] + } + } } } } @@ -177047,7 +177122,7 @@ "properties": { "users": { "type": "array", - "description": "users parameter", + "description": "The username for users", "items": { "type": "string" } @@ -177069,6 +177144,16 @@ } } ] + }, + "examples": { + "default": { + "summary": "Example replacing a user in a branch protection rule", + "value": { + "users": [ + "octocat" + ] + } + } } } } @@ -177406,7 +177491,7 @@ "properties": { "users": { "type": "array", - "description": "users parameter", + "description": "The username for users", "items": { "type": "string" } @@ -177428,6 +177513,16 @@ } } ] + }, + "examples": { + "default": { + "summary": "Example removing a user in a branch protection rule", + "value": { + "users": [ + "octocat" + ] + } + } } } } @@ -226124,7 +226219,7 @@ "/repos/{owner}/{repo}/contents/{path}": { "get": { "summary": "Get repository content", - "description": "Gets the contents of a file or directory in a repository. Specify the file path or directory in `:path`. If you omit\n`:path`, you will receive the contents of the repository's root directory. See the description below regarding what the API response includes for directories. \n\nFiles and symlinks support [a custom media type](https://docs.github.com/enterprise-server@3.3/rest/reference/repos#custom-media-types) for\nretrieving the raw content or rendered HTML (when supported). All content types support [a custom media\ntype](https://docs.github.com/enterprise-server@3.3/rest/reference/repos#custom-media-types) to ensure the content is returned in a consistent\nobject format.\n\n**Note**:\n* To get a repository's contents recursively, you can [recursively get the tree](https://docs.github.com/enterprise-server@3.3/rest/reference/git#trees).\n* This API has an upper limit of 1,000 files for a directory. If you need to retrieve more files, use the [Git Trees\nAPI](https://docs.github.com/enterprise-server@3.3/rest/reference/git#get-a-tree).\n* This API supports files up to 1 megabyte in size.\n\n#### If the content is a directory\nThe response will be an array of objects, one object for each item in the directory.\nWhen listing the contents of a directory, submodules have their \"type\" specified as \"file\". Logically, the value\n_should_ be \"submodule\". This behavior exists in API v3 [for backwards compatibility purposes](https://git.io/v1YCW).\nIn the next major version of the API, the type will be returned as \"submodule\".\n\n#### If the content is a symlink \nIf the requested `:path` points to a symlink, and the symlink's target is a normal file in the repository, then the\nAPI responds with the content of the file (in the format shown in the example. Otherwise, the API responds with an object \ndescribing the symlink itself.\n\n#### If the content is a submodule\nThe `submodule_git_url` identifies the location of the submodule repository, and the `sha` identifies a specific\ncommit within the submodule repository. Git uses the given URL when cloning the submodule repository, and checks out\nthe submodule at that specific commit.\n\nIf the submodule repository is not hosted on github.com, the Git URLs (`git_url` and `_links[\"git\"]`) and the\ngithub.com URLs (`html_url` and `_links[\"html\"]`) will have null values.", + "description": "Gets the contents of a file or directory in a repository. Specify the file path or directory in `:path`. If you omit\n`:path`, you will receive the contents of the repository's root directory. See the description below regarding what the API response includes for directories. \n\nFiles and symlinks support [a custom media type](https://docs.github.com/enterprise-server@3.3/rest/reference/repos#custom-media-types) for\nretrieving the raw content or rendered HTML (when supported). All content types support [a custom media\ntype](https://docs.github.com/enterprise-server@3.3/rest/reference/repos#custom-media-types) to ensure the content is returned in a consistent\nobject format.\n\n**Notes**:\n* To get a repository's contents recursively, you can [recursively get the tree](https://docs.github.com/enterprise-server@3.3/rest/reference/git#trees).\n* This API has an upper limit of 1,000 files for a directory. If you need to retrieve more files, use the [Git Trees\nAPI](https://docs.github.com/enterprise-server@3.3/rest/reference/git#get-a-tree).\n * Download URLs expire and are meant to be used just once. To ensure the download URL does not expire, please use the contents API to obtain a fresh download URL for each download. \n* This API supports files up to 1 megabyte in size.\n\n#### If the content is a directory\nThe response will be an array of objects, one object for each item in the directory.\nWhen listing the contents of a directory, submodules have their \"type\" specified as \"file\". Logically, the value\n_should_ be \"submodule\". This behavior exists in API v3 [for backwards compatibility purposes](https://git.io/v1YCW).\nIn the next major version of the API, the type will be returned as \"submodule\".\n\n#### If the content is a symlink \nIf the requested `:path` points to a symlink, and the symlink's target is a normal file in the repository, then the\nAPI responds with the content of the file (in the format shown in the example. Otherwise, the API responds with an object \ndescribing the symlink itself.\n\n#### If the content is a submodule\nThe `submodule_git_url` identifies the location of the submodule repository, and the `sha` identifies a specific\ncommit within the submodule repository. Git uses the given URL when cloning the submodule repository, and checks out\nthe submodule at that specific commit.\n\nIf the submodule repository is not hosted on github.com, the Git URLs (`git_url` and `_links[\"git\"]`) and the\ngithub.com URLs (`html_url` and `_links[\"html\"]`) will have null values.", "tags": [ "repos" ], @@ -255835,14 +255930,6 @@ "write" ] }, - "organization_custom_roles": { - "type": "string", - "description": "The level of permission to grant the access token for custom roles management.", - "enum": [ - "read", - "write" - ] - }, "deployments": { "type": "string", "description": "The level of permission to grant the access token for deployments and deployment statuses.", @@ -259209,6 +259296,14 @@ ] } } + }, + "examples": { + "default": { + "summary": "Example request body", + "value": { + "permissions": "write" + } + } } } } @@ -265229,7 +265324,8 @@ "type": "User", "site_admin": false }, - "author_association": "COLLABORATOR" + "author_association": "COLLABORATOR", + "state_reason": "completed" } ] } @@ -268679,7 +268775,8 @@ "type": "User", "site_admin": false }, - "author_association": "COLLABORATOR" + "author_association": "COLLABORATOR", + "state_reason": "completed" } } } @@ -277330,7 +277427,8 @@ "closed_at": null, "created_at": "2011-04-22T13:33:48Z", "updated_at": "2011-04-22T13:33:48Z", - "author_association": "COLLABORATOR" + "author_association": "COLLABORATOR", + "state_reason": "completed" } } ] @@ -282264,7 +282362,8 @@ "closed_at": null, "created_at": "2011-04-22T13:33:48Z", "updated_at": "2011-04-22T13:33:48Z", - "author_association": "COLLABORATOR" + "author_association": "COLLABORATOR", + "state_reason": "completed" } } } @@ -285559,7 +285658,8 @@ "type": "User", "site_admin": false }, - "author_association": "COLLABORATOR" + "author_association": "COLLABORATOR", + "state_reason": "completed" } } } @@ -285740,6 +285840,16 @@ "closed" ] }, + "state_reason": { + "type": [ + "string", + "null" + ], + "description": "The reason for the current state", + "examples": [ + "not_planned" + ] + }, "milestone": { "oneOf": [ { @@ -288977,7 +289087,8 @@ "type": "User", "site_admin": false }, - "author_association": "COLLABORATOR" + "author_association": "COLLABORATOR", + "state_reason": "completed" } } } @@ -292422,7 +292533,8 @@ "type": "User", "site_admin": false }, - "author_association": "COLLABORATOR" + "author_association": "COLLABORATOR", + "state_reason": "completed" } } } @@ -295664,7 +295776,8 @@ "type": "User", "site_admin": false }, - "author_association": "COLLABORATOR" + "author_association": "COLLABORATOR", + "state_reason": "completed" } } } @@ -405062,7 +405175,8 @@ "body": "...", "score": 1, "locked": true, - "author_association": "COLLABORATOR" + "author_association": "COLLABORATOR", + "state_reason": "completed" } ] } @@ -428707,14 +428821,6 @@ "write" ] }, - "organization_custom_roles": { - "type": "string", - "description": "The level of permission to grant the access token for custom roles management.", - "enum": [ - "read", - "write" - ] - }, "deployments": { "type": "string", "description": "The level of permission to grant the access token for deployments and deployment statuses.", @@ -466242,14 +466348,6 @@ "write" ] }, - "organization_custom_roles": { - "type": "string", - "description": "The level of permission to grant the access token for custom roles management.", - "enum": [ - "read", - "write" - ] - }, "deployments": { "type": "string", "description": "The level of permission to grant the access token for deployments and deployment statuses.", diff --git a/descriptions-next/ghes-3.3/dereferenced/ghes-3.3.deref.yaml b/descriptions-next/ghes-3.3/dereferenced/ghes-3.3.deref.yaml index 44c8cbf5f1..c4f347dbef 100644 --- a/descriptions-next/ghes-3.3/dereferenced/ghes-3.3.deref.yaml +++ b/descriptions-next/ghes-3.3/dereferenced/ghes-3.3.deref.yaml @@ -2529,13 +2529,6 @@ paths: enum: - read - write - organization_custom_roles: - type: string - description: The level of permission to grant the - access token for custom roles management. - enum: - - read - - write deployments: type: string description: The level of permission to grant the @@ -31896,6 +31889,95 @@ paths: - protection - protected - protection_url + examples: + default: + value: + name: main + commit: + sha: 7fd1a60b01f91b314f59955a4e4d4e80d8edf11d + node_id: MDY6Q29tbWl0MTI5NjI2OTo3ZmQxYTYwYjAxZjkxYjMxNGY1OTk1NWE0ZTRkNGU4MGQ4ZWRmMTFk + commit: + author: + name: The Octocat + email: octocat@nowhere.com + date: '2012-03-06T23:06:50Z' + committer: + name: The Octocat + email: octocat@nowhere.com + date: '2012-03-06T23:06:50Z' + message: |- + Merge pull request #6 from Spaceghost/patch-1 + + New line at end of file. + tree: + sha: b4eecafa9be2f2006ce1b709d6857b07069b4608 + url: https://api.github.com/repos/octocat/Hello-World/git/trees/b4eecafa9be2f2006ce1b709d6857b07069b4608 + url: https://api.github.com/repos/octocat/Hello-World/git/commits/7fd1a60b01f91b314f59955a4e4d4e80d8edf11d + comment_count: 77 + verification: + verified: false + reason: unsigned + signature: + payload: + url: https://api.github.com/repos/octocat/Hello-World/commits/7fd1a60b01f91b314f59955a4e4d4e80d8edf11d + html_url: https://github.com/octocat/Hello-World/commit/7fd1a60b01f91b314f59955a4e4d4e80d8edf11d + comments_url: https://api.github.com/repos/octocat/Hello-World/commits/7fd1a60b01f91b314f59955a4e4d4e80d8edf11d/comments + author: + login: octocat + id: 583231 + node_id: MDQ6VXNlcjU4MzIzMQ== + avatar_url: https://avatars.githubusercontent.com/u/583231?v=4 + gravatar_id: '' + url: https://api.github.com/users/octocat + html_url: https://github.com/octocat + followers_url: https://api.github.com/users/octocat/followers + following_url: https://api.github.com/users/octocat/following{/other_user} + gists_url: https://api.github.com/users/octocat/gists{/gist_id} + starred_url: https://api.github.com/users/octocat/starred{/owner}{/repo} + subscriptions_url: https://api.github.com/users/octocat/subscriptions + organizations_url: https://api.github.com/users/octocat/orgs + repos_url: https://api.github.com/users/octocat/repos + events_url: https://api.github.com/users/octocat/events{/privacy} + received_events_url: https://api.github.com/users/octocat/received_events + type: User + site_admin: false + committer: + login: octocat + id: 583231 + node_id: MDQ6VXNlcjU4MzIzMQ== + avatar_url: https://avatars.githubusercontent.com/u/583231?v=4 + gravatar_id: '' + url: https://api.github.com/users/octocat + html_url: https://github.com/octocat + followers_url: https://api.github.com/users/octocat/followers + following_url: https://api.github.com/users/octocat/following{/other_user} + gists_url: https://api.github.com/users/octocat/gists{/gist_id} + starred_url: https://api.github.com/users/octocat/starred{/owner}{/repo} + subscriptions_url: https://api.github.com/users/octocat/subscriptions + organizations_url: https://api.github.com/users/octocat/orgs + repos_url: https://api.github.com/users/octocat/repos + events_url: https://api.github.com/users/octocat/events{/privacy} + received_events_url: https://api.github.com/users/octocat/received_events + type: User + site_admin: false + parents: + - sha: 553c2077f0edc3d5dc5d17262f6aa498e69d6f8e + url: https://api.github.com/repos/octocat/Hello-World/commits/553c2077f0edc3d5dc5d17262f6aa498e69d6f8e + html_url: https://github.com/octocat/Hello-World/commit/553c2077f0edc3d5dc5d17262f6aa498e69d6f8e + - sha: 762941318ee16e59dabbacb1b4049eec22f0d303 + url: https://api.github.com/repos/octocat/Hello-World/commits/762941318ee16e59dabbacb1b4049eec22f0d303 + html_url: https://github.com/octocat/Hello-World/commit/762941318ee16e59dabbacb1b4049eec22f0d303 + _links: + self: https://api.github.com/repos/octocat/Hello-World/branches/main + html: https://github.com/octocat/Hello-World/tree/main + protected: false + protection: + enabled: false + required_status_checks: + enforcement_level: 'off' + contexts: [] + checks: [] + protection_url: https://api.github.com/repos/octocat/Hello-World/branches/main/protection '301': *170 '404': *33 x-github: @@ -32475,6 +32557,55 @@ paths: - enabled required: - url + examples: + default: + value: + url: https://api.github.com/repos/octocat/hello-world/branches/main/protection + required_status_checks: + url: https://api.github.com/repos/octocat/hello-world/branches/main/protection/required_status_checks + strict: true + contexts: + - continuous-integration/travis-ci + contexts_url: https://api.github.com/repos/octocat/hello-world/branches/main/protection/required_status_checks/contexts + checks: + - context: continuous-integration/travis-ci + app_id: + restrictions: + url: https://api.github.com/repos/octocat/hello-world/branches/main/protection/restrictions + users_url: https://api.github.com/repos/octocat/hello-world/branches/main/protection/restrictions/users + teams_url: https://api.github.com/repos/octocat/hello-world/branches/main/protection/restrictions/teams + apps_url: https://api.github.com/repos/octocat/hello-world/branches/main/protection/restrictions/apps + users: [] + teams: [] + apps: [] + required_pull_request_reviews: + url: https://api.github.com/repos/octocat/hello-world/branches/main/protection/required_pull_request_reviews + dismiss_stale_reviews: true + require_code_owner_reviews: true + required_approving_review_count: 2 + dismissal_restrictions: + url: https://api.github.com/repos/octocat/hello-world/branches/main/protection/dismissal_restrictions + users_url: https://api.github.com/repos/octocat/hello-world/branches/main/protection/dismissal_restrictions/users + teams_url: https://api.github.com/repos/octocat/hello-world/branches/main/protection/dismissal_restrictions/teams + users: [] + teams: [] + apps: [] + required_signatures: + url: https://api.github.com/repos/octocat/hello-world/branches/main/protection/required_signatures + enabled: false + enforce_admins: + url: https://api.github.com/repos/octocat/hello-world/branches/main/protection/enforce_admins + enabled: true + required_linear_history: + enabled: true + allow_force_pushes: + enabled: true + allow_deletions: + enabled: true + block_creations: + enabled: true + required_conversation_resolution: + enabled: true '403': *35 '422': *137 '404': *33 @@ -33092,7 +33223,7 @@ paths: properties: contexts: type: array - description: contexts parameter + description: The name of the status checks items: type: string required: @@ -33101,9 +33232,16 @@ paths: contexts: - contexts - type: array - description: contexts parameter + description: The name of the status checks items: type: string + examples: + default: + summary: Example adding status checks to a branch protection rule + value: + contexts: + - continuous-integration/travis-ci + - continuous-integration/jenkins responses: '200': description: Response @@ -33154,7 +33292,7 @@ paths: properties: contexts: type: array - description: contexts parameter + description: The name of the status checks items: type: string required: @@ -33163,9 +33301,15 @@ paths: contexts: - contexts - type: array - description: contexts parameter + description: The name of the status checks items: type: string + examples: + default: + summary: Example updating status checks for a branch protection rule + value: + contexts: + - continuous-integration/travis-ci responses: '200': description: Response @@ -33213,7 +33357,7 @@ paths: properties: contexts: type: array - description: contexts parameter + description: The name of the status checks items: type: string required: @@ -33222,9 +33366,15 @@ paths: contexts: - contexts - type: array - description: contexts parameter + description: The name of the status checks items: type: string + examples: + default: + summary: Example removing status checks from a branch protection rule + value: + contexts: + - continuous-integration/travis-ci responses: '200': description: Response @@ -33677,7 +33827,7 @@ paths: properties: teams: type: array - description: teams parameter + description: The slug values for teams items: type: string required: @@ -33686,9 +33836,15 @@ paths: teams: - my-team - type: array - description: teams parameter + description: The slug values for teams items: type: string + examples: + default: + summary: Example adding a team in a branch protection rule + value: + teams: + - justice-league responses: '200': description: Response @@ -33736,18 +33892,24 @@ paths: properties: teams: type: array - description: teams parameter + description: The slug values for teams items: type: string required: - teams example: teams: - - my-team + - justice-league - type: array - description: teams parameter + description: The slug values for teams items: type: string + examples: + default: + summary: Example replacing a team in a branch protection rule + value: + teams: + - justice-league responses: '200': description: Response @@ -33794,7 +33956,7 @@ paths: properties: teams: type: array - description: teams parameter + description: The slug values for teams items: type: string required: @@ -33803,9 +33965,15 @@ paths: teams: - my-team - type: array - description: teams parameter + description: The slug values for teams items: type: string + examples: + default: + summary: Example removing a team in a branch protection rule + value: + teams: + - justice-league responses: '200': description: Response @@ -33886,7 +34054,7 @@ paths: properties: users: type: array - description: users parameter + description: The username for users items: type: string required: @@ -33897,6 +34065,12 @@ paths: - type: array items: type: string + examples: + default: + summary: Example adding a user in a branch protection rule + value: + users: + - octocat responses: '200': description: Response @@ -33944,7 +34118,7 @@ paths: properties: users: type: array - description: users parameter + description: The username for users items: type: string required: @@ -33955,6 +34129,12 @@ paths: - type: array items: type: string + examples: + default: + summary: Example replacing a user in a branch protection rule + value: + users: + - octocat responses: '200': description: Response @@ -34001,7 +34181,7 @@ paths: properties: users: type: array - description: users parameter + description: The username for users items: type: string required: @@ -34012,6 +34192,12 @@ paths: - type: array items: type: string + examples: + default: + summary: Example removing a user in a branch protection rule + value: + users: + - octocat responses: '200': description: Response @@ -41117,29 +41303,31 @@ paths: support [a custom media type](https://docs.github.com/enterprise-server@3.3/rest/reference/repos#custom-media-types) for\nretrieving the raw content or rendered HTML (when supported). All content types support [a custom media\ntype](https://docs.github.com/enterprise-server@3.3/rest/reference/repos#custom-media-types) - to ensure the content is returned in a consistent\nobject format.\n\n**Note**:\n* + to ensure the content is returned in a consistent\nobject format.\n\n**Notes**:\n* \ To get a repository's contents recursively, you can [recursively get the tree](https://docs.github.com/enterprise-server@3.3/rest/reference/git#trees).\n* \ This API has an upper limit of 1,000 files for a directory. If you need - to retrieve more files, use the [Git Trees\nAPI](https://docs.github.com/enterprise-server@3.3/rest/reference/git#get-a-tree).\n* - \ This API supports files up to 1 megabyte in size.\n\n#### If the content - is a directory\nThe response will be an array of objects, one object for each - item in the directory.\nWhen listing the contents of a directory, submodules - have their \"type\" specified as \"file\". Logically, the value\n_should_ - be \"submodule\". This behavior exists in API v3 [for backwards compatibility - purposes](https://git.io/v1YCW).\nIn the next major version of the API, the - type will be returned as \"submodule\".\n\n#### If the content is a symlink - \nIf the requested `:path` points to a symlink, and the symlink's target is - a normal file in the repository, then the\nAPI responds with the content of - the file (in the format shown in the example. Otherwise, the API responds - with an object \ndescribing the symlink itself.\n\n#### If the content is - a submodule\nThe `submodule_git_url` identifies the location of the submodule - repository, and the `sha` identifies a specific\ncommit within the submodule - repository. Git uses the given URL when cloning the submodule repository, - and checks out\nthe submodule at that specific commit.\n\nIf the submodule - repository is not hosted on github.com, the Git URLs (`git_url` and `_links[\"git\"]`) - and the\ngithub.com URLs (`html_url` and `_links[\"html\"]`) will have null - values." + to retrieve more files, use the [Git Trees\nAPI](https://docs.github.com/enterprise-server@3.3/rest/reference/git#get-a-tree).\n + * Download URLs expire and are meant to be used just once. To ensure the + download URL does not expire, please use the contents API to obtain a fresh + download URL for each download. \n* This API supports files up to 1 megabyte + in size.\n\n#### If the content is a directory\nThe response will be an array + of objects, one object for each item in the directory.\nWhen listing the contents + of a directory, submodules have their \"type\" specified as \"file\". Logically, + the value\n_should_ be \"submodule\". This behavior exists in API v3 [for + backwards compatibility purposes](https://git.io/v1YCW).\nIn the next major + version of the API, the type will be returned as \"submodule\".\n\n#### If + the content is a symlink \nIf the requested `:path` points to a symlink, and + the symlink's target is a normal file in the repository, then the\nAPI responds + with the content of the file (in the format shown in the example. Otherwise, + the API responds with an object \ndescribing the symlink itself.\n\n#### If + the content is a submodule\nThe `submodule_git_url` identifies the location + of the submodule repository, and the `sha` identifies a specific\ncommit within + the submodule repository. Git uses the given URL when cloning the submodule + repository, and checks out\nthe submodule at that specific commit.\n\nIf the + submodule repository is not hosted on github.com, the Git URLs (`git_url` + and `_links[\"git\"]`) and the\ngithub.com URLs (`html_url` and `_links[\"html\"]`) + will have null values." tags: - repos operationId: repos/get-content @@ -46220,6 +46408,11 @@ paths: - maintain - triage - admin + examples: + default: + summary: Example request body + value: + permissions: write responses: '200': description: Response @@ -46597,6 +46790,7 @@ paths: type: User site_admin: false author_association: COLLABORATOR + state_reason: completed headers: Link: *6 '301': *170 @@ -46849,6 +47043,7 @@ paths: type: User site_admin: false author_association: COLLABORATOR + state_reason: completed headers: Location: example: https://api.github.com/repos/octocat/Hello-World/issues/1347 @@ -47550,6 +47745,7 @@ paths: created_at: '2011-04-22T13:33:48Z' updated_at: '2011-04-22T13:33:48Z' author_association: COLLABORATOR + state_reason: completed headers: Link: *6 '422': *29 @@ -47772,6 +47968,7 @@ paths: created_at: '2011-04-22T13:33:48Z' updated_at: '2011-04-22T13:33:48Z' author_association: COLLABORATOR + state_reason: completed '404': *33 '410': *139 '403': *35 @@ -47874,6 +48071,13 @@ paths: enum: - open - closed + state_reason: + type: + - string + - 'null' + description: The reason for the current state + examples: + - not_planned milestone: oneOf: - type: string @@ -61956,6 +62160,7 @@ paths: score: 1 locked: true author_association: COLLABORATOR + state_reason: completed '503': *140 '422': *29 '304': *38 diff --git a/descriptions-next/ghes-3.3/ghes-3.3.json b/descriptions-next/ghes-3.3/ghes-3.3.json index ab74a3e6f6..1ae4d9030b 100644 --- a/descriptions-next/ghes-3.3/ghes-3.3.json +++ b/descriptions-next/ghes-3.3/ghes-3.3.json @@ -20475,6 +20475,11 @@ "application/json": { "schema": { "$ref": "#/components/schemas/branch-with-protection" + }, + "examples": { + "default": { + "$ref": "#/components/examples/branch-get" + } } } } @@ -20805,6 +20810,11 @@ "application/json": { "schema": { "$ref": "#/components/schemas/protected-branch" + }, + "examples": { + "default": { + "$ref": "#/components/examples/branch-protection-update" + } } } } @@ -21607,7 +21617,7 @@ "properties": { "contexts": { "type": "array", - "description": "contexts parameter", + "description": "The name of the status checks", "items": { "type": "string" } @@ -21624,12 +21634,23 @@ }, { "type": "array", - "description": "contexts parameter", + "description": "The name of the status checks", "items": { "type": "string" } } ] + }, + "examples": { + "default": { + "summary": "Example adding status checks to a branch protection rule", + "value": { + "contexts": [ + "continuous-integration/travis-ci", + "continuous-integration/jenkins" + ] + } + } } } } @@ -21707,7 +21728,7 @@ "properties": { "contexts": { "type": "array", - "description": "contexts parameter", + "description": "The name of the status checks", "items": { "type": "string" } @@ -21724,12 +21745,22 @@ }, { "type": "array", - "description": "contexts parameter", + "description": "The name of the status checks", "items": { "type": "string" } } ] + }, + "examples": { + "default": { + "summary": "Example updating status checks for a branch protection rule", + "value": { + "contexts": [ + "continuous-integration/travis-ci" + ] + } + } } } } @@ -21802,7 +21833,7 @@ "properties": { "contexts": { "type": "array", - "description": "contexts parameter", + "description": "The name of the status checks", "items": { "type": "string" } @@ -21819,12 +21850,22 @@ }, { "type": "array", - "description": "contexts parameter", + "description": "The name of the status checks", "items": { "type": "string" } } ] + }, + "examples": { + "default": { + "summary": "Example removing status checks from a branch protection rule", + "value": { + "contexts": [ + "continuous-integration/travis-ci" + ] + } + } } } } @@ -22360,7 +22401,7 @@ "properties": { "teams": { "type": "array", - "description": "teams parameter", + "description": "The slug values for teams", "items": { "type": "string" } @@ -22377,12 +22418,22 @@ }, { "type": "array", - "description": "teams parameter", + "description": "The slug values for teams", "items": { "type": "string" } } ] + }, + "examples": { + "default": { + "summary": "Example adding a team in a branch protection rule", + "value": { + "teams": [ + "justice-league" + ] + } + } } } } @@ -22451,7 +22502,7 @@ "properties": { "teams": { "type": "array", - "description": "teams parameter", + "description": "The slug values for teams", "items": { "type": "string" } @@ -22462,18 +22513,28 @@ ], "example": { "teams": [ - "my-team" + "justice-league" ] } }, { "type": "array", - "description": "teams parameter", + "description": "The slug values for teams", "items": { "type": "string" } } ] + }, + "examples": { + "default": { + "summary": "Example replacing a team in a branch protection rule", + "value": { + "teams": [ + "justice-league" + ] + } + } } } } @@ -22541,7 +22602,7 @@ "properties": { "teams": { "type": "array", - "description": "teams parameter", + "description": "The slug values for teams", "items": { "type": "string" } @@ -22558,12 +22619,22 @@ }, { "type": "array", - "description": "teams parameter", + "description": "The slug values for teams", "items": { "type": "string" } } ] + }, + "examples": { + "default": { + "summary": "Example removing a team in a branch protection rule", + "value": { + "teams": [ + "justice-league" + ] + } + } } } } @@ -22686,7 +22757,7 @@ "properties": { "users": { "type": "array", - "description": "users parameter", + "description": "The username for users", "items": { "type": "string" } @@ -22708,6 +22779,16 @@ } } ] + }, + "examples": { + "default": { + "summary": "Example adding a user in a branch protection rule", + "value": { + "users": [ + "octocat" + ] + } + } } } } @@ -22776,7 +22857,7 @@ "properties": { "users": { "type": "array", - "description": "users parameter", + "description": "The username for users", "items": { "type": "string" } @@ -22798,6 +22879,16 @@ } } ] + }, + "examples": { + "default": { + "summary": "Example replacing a user in a branch protection rule", + "value": { + "users": [ + "octocat" + ] + } + } } } } @@ -22865,7 +22956,7 @@ "properties": { "users": { "type": "array", - "description": "users parameter", + "description": "The username for users", "items": { "type": "string" } @@ -22887,6 +22978,16 @@ } } ] + }, + "examples": { + "default": { + "summary": "Example removing a user in a branch protection rule", + "value": { + "users": [ + "octocat" + ] + } + } } } } @@ -26615,7 +26716,7 @@ "/repos/{owner}/{repo}/contents/{path}": { "get": { "summary": "Get repository content", - "description": "Gets the contents of a file or directory in a repository. Specify the file path or directory in `:path`. If you omit\n`:path`, you will receive the contents of the repository's root directory. See the description below regarding what the API response includes for directories. \n\nFiles and symlinks support [a custom media type](https://docs.github.com/enterprise-server@3.3/rest/reference/repos#custom-media-types) for\nretrieving the raw content or rendered HTML (when supported). All content types support [a custom media\ntype](https://docs.github.com/enterprise-server@3.3/rest/reference/repos#custom-media-types) to ensure the content is returned in a consistent\nobject format.\n\n**Note**:\n* To get a repository's contents recursively, you can [recursively get the tree](https://docs.github.com/enterprise-server@3.3/rest/reference/git#trees).\n* This API has an upper limit of 1,000 files for a directory. If you need to retrieve more files, use the [Git Trees\nAPI](https://docs.github.com/enterprise-server@3.3/rest/reference/git#get-a-tree).\n* This API supports files up to 1 megabyte in size.\n\n#### If the content is a directory\nThe response will be an array of objects, one object for each item in the directory.\nWhen listing the contents of a directory, submodules have their \"type\" specified as \"file\". Logically, the value\n_should_ be \"submodule\". This behavior exists in API v3 [for backwards compatibility purposes](https://git.io/v1YCW).\nIn the next major version of the API, the type will be returned as \"submodule\".\n\n#### If the content is a symlink \nIf the requested `:path` points to a symlink, and the symlink's target is a normal file in the repository, then the\nAPI responds with the content of the file (in the format shown in the example. Otherwise, the API responds with an object \ndescribing the symlink itself.\n\n#### If the content is a submodule\nThe `submodule_git_url` identifies the location of the submodule repository, and the `sha` identifies a specific\ncommit within the submodule repository. Git uses the given URL when cloning the submodule repository, and checks out\nthe submodule at that specific commit.\n\nIf the submodule repository is not hosted on github.com, the Git URLs (`git_url` and `_links[\"git\"]`) and the\ngithub.com URLs (`html_url` and `_links[\"html\"]`) will have null values.", + "description": "Gets the contents of a file or directory in a repository. Specify the file path or directory in `:path`. If you omit\n`:path`, you will receive the contents of the repository's root directory. See the description below regarding what the API response includes for directories. \n\nFiles and symlinks support [a custom media type](https://docs.github.com/enterprise-server@3.3/rest/reference/repos#custom-media-types) for\nretrieving the raw content or rendered HTML (when supported). All content types support [a custom media\ntype](https://docs.github.com/enterprise-server@3.3/rest/reference/repos#custom-media-types) to ensure the content is returned in a consistent\nobject format.\n\n**Notes**:\n* To get a repository's contents recursively, you can [recursively get the tree](https://docs.github.com/enterprise-server@3.3/rest/reference/git#trees).\n* This API has an upper limit of 1,000 files for a directory. If you need to retrieve more files, use the [Git Trees\nAPI](https://docs.github.com/enterprise-server@3.3/rest/reference/git#get-a-tree).\n * Download URLs expire and are meant to be used just once. To ensure the download URL does not expire, please use the contents API to obtain a fresh download URL for each download. \n* This API supports files up to 1 megabyte in size.\n\n#### If the content is a directory\nThe response will be an array of objects, one object for each item in the directory.\nWhen listing the contents of a directory, submodules have their \"type\" specified as \"file\". Logically, the value\n_should_ be \"submodule\". This behavior exists in API v3 [for backwards compatibility purposes](https://git.io/v1YCW).\nIn the next major version of the API, the type will be returned as \"submodule\".\n\n#### If the content is a symlink \nIf the requested `:path` points to a symlink, and the symlink's target is a normal file in the repository, then the\nAPI responds with the content of the file (in the format shown in the example. Otherwise, the API responds with an object \ndescribing the symlink itself.\n\n#### If the content is a submodule\nThe `submodule_git_url` identifies the location of the submodule repository, and the `sha` identifies a specific\ncommit within the submodule repository. Git uses the given URL when cloning the submodule repository, and checks out\nthe submodule at that specific commit.\n\nIf the submodule repository is not hosted on github.com, the Git URLs (`git_url` and `_links[\"git\"]`) and the\ngithub.com URLs (`html_url` and `_links[\"html\"]`) will have null values.", "tags": [ "repos" ], @@ -30631,6 +30732,14 @@ ] } } + }, + "examples": { + "default": { + "summary": "Example request body", + "value": { + "permissions": "write" + } + } } } } @@ -31730,6 +31839,16 @@ "closed" ] }, + "state_reason": { + "type": [ + "string", + "null" + ], + "description": "The reason for the current state", + "examples": [ + "not_planned" + ] + }, "milestone": { "oneOf": [ { @@ -49811,14 +49930,6 @@ "write" ] }, - "organization_custom_roles": { - "type": "string", - "description": "The level of permission to grant the access token for custom roles management.", - "enum": [ - "read", - "write" - ] - }, "deployments": { "type": "string", "description": "The level of permission to grant the access token for deployments and deployment statuses.", @@ -84013,6 +84124,113 @@ } ] }, + "branch-get": { + "value": { + "name": "main", + "commit": { + "sha": "7fd1a60b01f91b314f59955a4e4d4e80d8edf11d", + "node_id": "MDY6Q29tbWl0MTI5NjI2OTo3ZmQxYTYwYjAxZjkxYjMxNGY1OTk1NWE0ZTRkNGU4MGQ4ZWRmMTFk", + "commit": { + "author": { + "name": "The Octocat", + "email": "octocat@nowhere.com", + "date": "2012-03-06T23:06:50Z" + }, + "committer": { + "name": "The Octocat", + "email": "octocat@nowhere.com", + "date": "2012-03-06T23:06:50Z" + }, + "message": "Merge pull request #6 from Spaceghost/patch-1\n\nNew line at end of file.", + "tree": { + "sha": "b4eecafa9be2f2006ce1b709d6857b07069b4608", + "url": "https://api.github.com/repos/octocat/Hello-World/git/trees/b4eecafa9be2f2006ce1b709d6857b07069b4608" + }, + "url": "https://api.github.com/repos/octocat/Hello-World/git/commits/7fd1a60b01f91b314f59955a4e4d4e80d8edf11d", + "comment_count": 77, + "verification": { + "verified": false, + "reason": "unsigned", + "signature": null, + "payload": null + } + }, + "url": "https://api.github.com/repos/octocat/Hello-World/commits/7fd1a60b01f91b314f59955a4e4d4e80d8edf11d", + "html_url": "https://github.com/octocat/Hello-World/commit/7fd1a60b01f91b314f59955a4e4d4e80d8edf11d", + "comments_url": "https://api.github.com/repos/octocat/Hello-World/commits/7fd1a60b01f91b314f59955a4e4d4e80d8edf11d/comments", + "author": { + "login": "octocat", + "id": 583231, + "node_id": "MDQ6VXNlcjU4MzIzMQ==", + "avatar_url": "https://avatars.githubusercontent.com/u/583231?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/octocat", + "html_url": "https://github.com/octocat", + "followers_url": "https://api.github.com/users/octocat/followers", + "following_url": "https://api.github.com/users/octocat/following{/other_user}", + "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}", + "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/octocat/subscriptions", + "organizations_url": "https://api.github.com/users/octocat/orgs", + "repos_url": "https://api.github.com/users/octocat/repos", + "events_url": "https://api.github.com/users/octocat/events{/privacy}", + "received_events_url": "https://api.github.com/users/octocat/received_events", + "type": "User", + "site_admin": false + }, + "committer": { + "login": "octocat", + "id": 583231, + "node_id": "MDQ6VXNlcjU4MzIzMQ==", + "avatar_url": "https://avatars.githubusercontent.com/u/583231?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/octocat", + "html_url": "https://github.com/octocat", + "followers_url": "https://api.github.com/users/octocat/followers", + "following_url": "https://api.github.com/users/octocat/following{/other_user}", + "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}", + "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/octocat/subscriptions", + "organizations_url": "https://api.github.com/users/octocat/orgs", + "repos_url": "https://api.github.com/users/octocat/repos", + "events_url": "https://api.github.com/users/octocat/events{/privacy}", + "received_events_url": "https://api.github.com/users/octocat/received_events", + "type": "User", + "site_admin": false + }, + "parents": [ + { + "sha": "553c2077f0edc3d5dc5d17262f6aa498e69d6f8e", + "url": "https://api.github.com/repos/octocat/Hello-World/commits/553c2077f0edc3d5dc5d17262f6aa498e69d6f8e", + "html_url": "https://github.com/octocat/Hello-World/commit/553c2077f0edc3d5dc5d17262f6aa498e69d6f8e" + }, + { + "sha": "762941318ee16e59dabbacb1b4049eec22f0d303", + "url": "https://api.github.com/repos/octocat/Hello-World/commits/762941318ee16e59dabbacb1b4049eec22f0d303", + "html_url": "https://github.com/octocat/Hello-World/commit/762941318ee16e59dabbacb1b4049eec22f0d303" + } + ] + }, + "_links": { + "self": "https://api.github.com/repos/octocat/Hello-World/branches/main", + "html": "https://github.com/octocat/Hello-World/tree/main" + }, + "protected": false, + "protection": { + "enabled": false, + "required_status_checks": { + "enforcement_level": "off", + "contexts": [ + + ], + "checks": [ + + ] + } + }, + "protection_url": "https://api.github.com/repos/octocat/Hello-World/branches/main/protection" + } + }, "branch-protection": { "value": { "url": "https://api.github.com/repos/octocat/Hello-World/branches/master/protection", @@ -84209,6 +84427,83 @@ } } }, + "branch-protection-update": { + "value": { + "url": "https://api.github.com/repos/octocat/hello-world/branches/main/protection", + "required_status_checks": { + "url": "https://api.github.com/repos/octocat/hello-world/branches/main/protection/required_status_checks", + "strict": true, + "contexts": [ + "continuous-integration/travis-ci" + ], + "contexts_url": "https://api.github.com/repos/octocat/hello-world/branches/main/protection/required_status_checks/contexts", + "checks": [ + { + "context": "continuous-integration/travis-ci", + "app_id": null + } + ] + }, + "restrictions": { + "url": "https://api.github.com/repos/octocat/hello-world/branches/main/protection/restrictions", + "users_url": "https://api.github.com/repos/octocat/hello-world/branches/main/protection/restrictions/users", + "teams_url": "https://api.github.com/repos/octocat/hello-world/branches/main/protection/restrictions/teams", + "apps_url": "https://api.github.com/repos/octocat/hello-world/branches/main/protection/restrictions/apps", + "users": [ + + ], + "teams": [ + + ], + "apps": [ + + ] + }, + "required_pull_request_reviews": { + "url": "https://api.github.com/repos/octocat/hello-world/branches/main/protection/required_pull_request_reviews", + "dismiss_stale_reviews": true, + "require_code_owner_reviews": true, + "required_approving_review_count": 2, + "dismissal_restrictions": { + "url": "https://api.github.com/repos/octocat/hello-world/branches/main/protection/dismissal_restrictions", + "users_url": "https://api.github.com/repos/octocat/hello-world/branches/main/protection/dismissal_restrictions/users", + "teams_url": "https://api.github.com/repos/octocat/hello-world/branches/main/protection/dismissal_restrictions/teams", + "users": [ + + ], + "teams": [ + + ], + "apps": [ + + ] + } + }, + "required_signatures": { + "url": "https://api.github.com/repos/octocat/hello-world/branches/main/protection/required_signatures", + "enabled": false + }, + "enforce_admins": { + "url": "https://api.github.com/repos/octocat/hello-world/branches/main/protection/enforce_admins", + "enabled": true + }, + "required_linear_history": { + "enabled": true + }, + "allow_force_pushes": { + "enabled": true + }, + "allow_deletions": { + "enabled": true + }, + "block_creations": { + "enabled": true + }, + "required_conversation_resolution": { + "enabled": true + } + } + }, "protected-branch-admin-enforced-2": { "value": { "url": "https://api.github.com/repos/octocat/Hello-World/branches/master/protection/enforce_admins", @@ -88983,7 +89278,8 @@ "type": "User", "site_admin": false }, - "author_association": "COLLABORATOR" + "author_association": "COLLABORATOR", + "state_reason": "completed" } ] }, @@ -89143,7 +89439,8 @@ "type": "User", "site_admin": false }, - "author_association": "COLLABORATOR" + "author_association": "COLLABORATOR", + "state_reason": "completed" } }, "issue-comment-items": { @@ -89379,7 +89676,8 @@ "closed_at": null, "created_at": "2011-04-22T13:33:48Z", "updated_at": "2011-04-22T13:33:48Z", - "author_association": "COLLABORATOR" + "author_association": "COLLABORATOR", + "state_reason": "completed" } } ] @@ -89588,7 +89886,8 @@ "closed_at": null, "created_at": "2011-04-22T13:33:48Z", "updated_at": "2011-04-22T13:33:48Z", - "author_association": "COLLABORATOR" + "author_association": "COLLABORATOR", + "state_reason": "completed" } } }, @@ -93814,7 +94113,8 @@ "body": "...", "score": 1, "locked": true, - "author_association": "COLLABORATOR" + "author_association": "COLLABORATOR", + "state_reason": "completed" } ] } diff --git a/descriptions-next/ghes-3.3/ghes-3.3.yaml b/descriptions-next/ghes-3.3/ghes-3.3.yaml index e764c7992d..6b0f7ec5d3 100644 --- a/descriptions-next/ghes-3.3/ghes-3.3.yaml +++ b/descriptions-next/ghes-3.3/ghes-3.3.yaml @@ -14419,6 +14419,9 @@ paths: application/json: schema: "$ref": "#/components/schemas/branch-with-protection" + examples: + default: + "$ref": "#/components/examples/branch-get" '301': "$ref": "#/components/responses/moved_permanently" '404': @@ -14699,6 +14702,9 @@ paths: application/json: schema: "$ref": "#/components/schemas/protected-branch" + examples: + default: + "$ref": "#/components/examples/branch-protection-update" '403': "$ref": "#/components/responses/forbidden" '422': @@ -15262,7 +15268,7 @@ paths: properties: contexts: type: array - description: contexts parameter + description: The name of the status checks items: type: string required: @@ -15271,9 +15277,16 @@ paths: contexts: - contexts - type: array - description: contexts parameter + description: The name of the status checks items: type: string + examples: + default: + summary: Example adding status checks to a branch protection rule + value: + contexts: + - continuous-integration/travis-ci + - continuous-integration/jenkins responses: '200': description: Response @@ -15327,7 +15340,7 @@ paths: properties: contexts: type: array - description: contexts parameter + description: The name of the status checks items: type: string required: @@ -15336,9 +15349,15 @@ paths: contexts: - contexts - type: array - description: contexts parameter + description: The name of the status checks items: type: string + examples: + default: + summary: Example updating status checks for a branch protection rule + value: + contexts: + - continuous-integration/travis-ci responses: '200': description: Response @@ -15388,7 +15407,7 @@ paths: properties: contexts: type: array - description: contexts parameter + description: The name of the status checks items: type: string required: @@ -15397,9 +15416,15 @@ paths: contexts: - contexts - type: array - description: contexts parameter + description: The name of the status checks items: type: string + examples: + default: + summary: Example removing status checks from a branch protection rule + value: + contexts: + - continuous-integration/travis-ci responses: '200': description: Response @@ -15767,7 +15792,7 @@ paths: properties: teams: type: array - description: teams parameter + description: The slug values for teams items: type: string required: @@ -15776,9 +15801,15 @@ paths: teams: - my-team - type: array - description: teams parameter + description: The slug values for teams items: type: string + examples: + default: + summary: Example adding a team in a branch protection rule + value: + teams: + - justice-league responses: '200': description: Response @@ -15829,18 +15860,24 @@ paths: properties: teams: type: array - description: teams parameter + description: The slug values for teams items: type: string required: - teams example: teams: - - my-team + - justice-league - type: array - description: teams parameter + description: The slug values for teams items: type: string + examples: + default: + summary: Example replacing a team in a branch protection rule + value: + teams: + - justice-league responses: '200': description: Response @@ -15890,7 +15927,7 @@ paths: properties: teams: type: array - description: teams parameter + description: The slug values for teams items: type: string required: @@ -15899,9 +15936,15 @@ paths: teams: - my-team - type: array - description: teams parameter + description: The slug values for teams items: type: string + examples: + default: + summary: Example removing a team in a branch protection rule + value: + teams: + - justice-league responses: '200': description: Response @@ -15988,7 +16031,7 @@ paths: properties: users: type: array - description: users parameter + description: The username for users items: type: string required: @@ -15999,6 +16042,12 @@ paths: - type: array items: type: string + examples: + default: + summary: Example adding a user in a branch protection rule + value: + users: + - octocat responses: '200': description: Response @@ -16049,7 +16098,7 @@ paths: properties: users: type: array - description: users parameter + description: The username for users items: type: string required: @@ -16060,6 +16109,12 @@ paths: - type: array items: type: string + examples: + default: + summary: Example replacing a user in a branch protection rule + value: + users: + - octocat responses: '200': description: Response @@ -16109,7 +16164,7 @@ paths: properties: users: type: array - description: users parameter + description: The username for users items: type: string required: @@ -16120,6 +16175,12 @@ paths: - type: array items: type: string + examples: + default: + summary: Example removing a user in a branch protection rule + value: + users: + - octocat responses: '200': description: Response @@ -19004,29 +19065,31 @@ paths: support [a custom media type](https://docs.github.com/enterprise-server@3.3/rest/reference/repos#custom-media-types) for\nretrieving the raw content or rendered HTML (when supported). All content types support [a custom media\ntype](https://docs.github.com/enterprise-server@3.3/rest/reference/repos#custom-media-types) - to ensure the content is returned in a consistent\nobject format.\n\n**Note**:\n* + to ensure the content is returned in a consistent\nobject format.\n\n**Notes**:\n* \ To get a repository's contents recursively, you can [recursively get the tree](https://docs.github.com/enterprise-server@3.3/rest/reference/git#trees).\n* \ This API has an upper limit of 1,000 files for a directory. If you need - to retrieve more files, use the [Git Trees\nAPI](https://docs.github.com/enterprise-server@3.3/rest/reference/git#get-a-tree).\n* - \ This API supports files up to 1 megabyte in size.\n\n#### If the content - is a directory\nThe response will be an array of objects, one object for each - item in the directory.\nWhen listing the contents of a directory, submodules - have their \"type\" specified as \"file\". Logically, the value\n_should_ - be \"submodule\". This behavior exists in API v3 [for backwards compatibility - purposes](https://git.io/v1YCW).\nIn the next major version of the API, the - type will be returned as \"submodule\".\n\n#### If the content is a symlink - \nIf the requested `:path` points to a symlink, and the symlink's target is - a normal file in the repository, then the\nAPI responds with the content of - the file (in the format shown in the example. Otherwise, the API responds - with an object \ndescribing the symlink itself.\n\n#### If the content is - a submodule\nThe `submodule_git_url` identifies the location of the submodule - repository, and the `sha` identifies a specific\ncommit within the submodule - repository. Git uses the given URL when cloning the submodule repository, - and checks out\nthe submodule at that specific commit.\n\nIf the submodule - repository is not hosted on github.com, the Git URLs (`git_url` and `_links[\"git\"]`) - and the\ngithub.com URLs (`html_url` and `_links[\"html\"]`) will have null - values." + to retrieve more files, use the [Git Trees\nAPI](https://docs.github.com/enterprise-server@3.3/rest/reference/git#get-a-tree).\n + * Download URLs expire and are meant to be used just once. To ensure the + download URL does not expire, please use the contents API to obtain a fresh + download URL for each download. \n* This API supports files up to 1 megabyte + in size.\n\n#### If the content is a directory\nThe response will be an array + of objects, one object for each item in the directory.\nWhen listing the contents + of a directory, submodules have their \"type\" specified as \"file\". Logically, + the value\n_should_ be \"submodule\". This behavior exists in API v3 [for + backwards compatibility purposes](https://git.io/v1YCW).\nIn the next major + version of the API, the type will be returned as \"submodule\".\n\n#### If + the content is a symlink \nIf the requested `:path` points to a symlink, and + the symlink's target is a normal file in the repository, then the\nAPI responds + with the content of the file (in the format shown in the example. Otherwise, + the API responds with an object \ndescribing the symlink itself.\n\n#### If + the content is a submodule\nThe `submodule_git_url` identifies the location + of the submodule repository, and the `sha` identifies a specific\ncommit within + the submodule repository. Git uses the given URL when cloning the submodule + repository, and checks out\nthe submodule at that specific commit.\n\nIf the + submodule repository is not hosted on github.com, the Git URLs (`git_url` + and `_links[\"git\"]`) and the\ngithub.com URLs (`html_url` and `_links[\"html\"]`) + will have null values." tags: - repos operationId: repos/get-content @@ -21981,6 +22044,11 @@ paths: - maintain - triage - admin + examples: + default: + summary: Example request body + value: + permissions: write responses: '200': description: Response @@ -22705,6 +22773,13 @@ paths: enum: - open - closed + state_reason: + type: + - string + - 'null' + description: The reason for the current state + examples: + - not_planned milestone: oneOf: - type: string @@ -35340,13 +35415,6 @@ components: enum: - read - write - organization_custom_roles: - type: string - description: The level of permission to grant the access token for custom - roles management. - enum: - - read - - write deployments: type: string description: The level of permission to grant the access token for deployments @@ -61591,6 +61659,94 @@ components: - ci-test - linter protection_url: https://api.github.com/repos/octocat/hello-world/branches/master/protection + branch-get: + value: + name: main + commit: + sha: 7fd1a60b01f91b314f59955a4e4d4e80d8edf11d + node_id: MDY6Q29tbWl0MTI5NjI2OTo3ZmQxYTYwYjAxZjkxYjMxNGY1OTk1NWE0ZTRkNGU4MGQ4ZWRmMTFk + commit: + author: + name: The Octocat + email: octocat@nowhere.com + date: '2012-03-06T23:06:50Z' + committer: + name: The Octocat + email: octocat@nowhere.com + date: '2012-03-06T23:06:50Z' + message: |- + Merge pull request #6 from Spaceghost/patch-1 + + New line at end of file. + tree: + sha: b4eecafa9be2f2006ce1b709d6857b07069b4608 + url: https://api.github.com/repos/octocat/Hello-World/git/trees/b4eecafa9be2f2006ce1b709d6857b07069b4608 + url: https://api.github.com/repos/octocat/Hello-World/git/commits/7fd1a60b01f91b314f59955a4e4d4e80d8edf11d + comment_count: 77 + verification: + verified: false + reason: unsigned + signature: + payload: + url: https://api.github.com/repos/octocat/Hello-World/commits/7fd1a60b01f91b314f59955a4e4d4e80d8edf11d + html_url: https://github.com/octocat/Hello-World/commit/7fd1a60b01f91b314f59955a4e4d4e80d8edf11d + comments_url: https://api.github.com/repos/octocat/Hello-World/commits/7fd1a60b01f91b314f59955a4e4d4e80d8edf11d/comments + author: + login: octocat + id: 583231 + node_id: MDQ6VXNlcjU4MzIzMQ== + avatar_url: https://avatars.githubusercontent.com/u/583231?v=4 + gravatar_id: '' + url: https://api.github.com/users/octocat + html_url: https://github.com/octocat + followers_url: https://api.github.com/users/octocat/followers + following_url: https://api.github.com/users/octocat/following{/other_user} + gists_url: https://api.github.com/users/octocat/gists{/gist_id} + starred_url: https://api.github.com/users/octocat/starred{/owner}{/repo} + subscriptions_url: https://api.github.com/users/octocat/subscriptions + organizations_url: https://api.github.com/users/octocat/orgs + repos_url: https://api.github.com/users/octocat/repos + events_url: https://api.github.com/users/octocat/events{/privacy} + received_events_url: https://api.github.com/users/octocat/received_events + type: User + site_admin: false + committer: + login: octocat + id: 583231 + node_id: MDQ6VXNlcjU4MzIzMQ== + avatar_url: https://avatars.githubusercontent.com/u/583231?v=4 + gravatar_id: '' + url: https://api.github.com/users/octocat + html_url: https://github.com/octocat + followers_url: https://api.github.com/users/octocat/followers + following_url: https://api.github.com/users/octocat/following{/other_user} + gists_url: https://api.github.com/users/octocat/gists{/gist_id} + starred_url: https://api.github.com/users/octocat/starred{/owner}{/repo} + subscriptions_url: https://api.github.com/users/octocat/subscriptions + organizations_url: https://api.github.com/users/octocat/orgs + repos_url: https://api.github.com/users/octocat/repos + events_url: https://api.github.com/users/octocat/events{/privacy} + received_events_url: https://api.github.com/users/octocat/received_events + type: User + site_admin: false + parents: + - sha: 553c2077f0edc3d5dc5d17262f6aa498e69d6f8e + url: https://api.github.com/repos/octocat/Hello-World/commits/553c2077f0edc3d5dc5d17262f6aa498e69d6f8e + html_url: https://github.com/octocat/Hello-World/commit/553c2077f0edc3d5dc5d17262f6aa498e69d6f8e + - sha: 762941318ee16e59dabbacb1b4049eec22f0d303 + url: https://api.github.com/repos/octocat/Hello-World/commits/762941318ee16e59dabbacb1b4049eec22f0d303 + html_url: https://github.com/octocat/Hello-World/commit/762941318ee16e59dabbacb1b4049eec22f0d303 + _links: + self: https://api.github.com/repos/octocat/Hello-World/branches/main + html: https://github.com/octocat/Hello-World/tree/main + protected: false + protection: + enabled: false + required_status_checks: + enforcement_level: 'off' + contexts: [] + checks: [] + protection_url: https://api.github.com/repos/octocat/Hello-World/branches/main/protection branch-protection: value: url: https://api.github.com/repos/octocat/Hello-World/branches/master/protection @@ -61751,6 +61907,54 @@ components: enabled: true required_conversation_resolution: enabled: true + branch-protection-update: + value: + url: https://api.github.com/repos/octocat/hello-world/branches/main/protection + required_status_checks: + url: https://api.github.com/repos/octocat/hello-world/branches/main/protection/required_status_checks + strict: true + contexts: + - continuous-integration/travis-ci + contexts_url: https://api.github.com/repos/octocat/hello-world/branches/main/protection/required_status_checks/contexts + checks: + - context: continuous-integration/travis-ci + app_id: + restrictions: + url: https://api.github.com/repos/octocat/hello-world/branches/main/protection/restrictions + users_url: https://api.github.com/repos/octocat/hello-world/branches/main/protection/restrictions/users + teams_url: https://api.github.com/repos/octocat/hello-world/branches/main/protection/restrictions/teams + apps_url: https://api.github.com/repos/octocat/hello-world/branches/main/protection/restrictions/apps + users: [] + teams: [] + apps: [] + required_pull_request_reviews: + url: https://api.github.com/repos/octocat/hello-world/branches/main/protection/required_pull_request_reviews + dismiss_stale_reviews: true + require_code_owner_reviews: true + required_approving_review_count: 2 + dismissal_restrictions: + url: https://api.github.com/repos/octocat/hello-world/branches/main/protection/dismissal_restrictions + users_url: https://api.github.com/repos/octocat/hello-world/branches/main/protection/dismissal_restrictions/users + teams_url: https://api.github.com/repos/octocat/hello-world/branches/main/protection/dismissal_restrictions/teams + users: [] + teams: [] + apps: [] + required_signatures: + url: https://api.github.com/repos/octocat/hello-world/branches/main/protection/required_signatures + enabled: false + enforce_admins: + url: https://api.github.com/repos/octocat/hello-world/branches/main/protection/enforce_admins + enabled: true + required_linear_history: + enabled: true + allow_force_pushes: + enabled: true + allow_deletions: + enabled: true + block_creations: + enabled: true + required_conversation_resolution: + enabled: true protected-branch-admin-enforced-2: value: url: https://api.github.com/repos/octocat/Hello-World/branches/master/protection/enforce_admins @@ -65882,6 +66086,7 @@ components: type: User site_admin: false author_association: COLLABORATOR + state_reason: completed issue: value: id: 1 @@ -66027,6 +66232,7 @@ components: type: User site_admin: false author_association: COLLABORATOR + state_reason: completed issue-comment-items: value: - id: 1 @@ -66240,6 +66446,7 @@ components: created_at: '2011-04-22T13:33:48Z' updated_at: '2011-04-22T13:33:48Z' author_association: COLLABORATOR + state_reason: completed issue-event: value: id: 1 @@ -66429,6 +66636,7 @@ components: created_at: '2011-04-22T13:33:48Z' updated_at: '2011-04-22T13:33:48Z' author_association: COLLABORATOR + state_reason: completed issue-event-for-issue-items: value: - id: 1 @@ -70210,6 +70418,7 @@ components: score: 1 locked: true author_association: COLLABORATOR + state_reason: completed label-search-result-item-paginated: value: total_count: 2 diff --git a/descriptions-next/ghes-3.4/dereferenced/ghes-3.4.deref.json b/descriptions-next/ghes-3.4/dereferenced/ghes-3.4.deref.json index 630b559ef0..d729e6eeb6 100644 --- a/descriptions-next/ghes-3.4/dereferenced/ghes-3.4.deref.json +++ b/descriptions-next/ghes-3.4/dereferenced/ghes-3.4.deref.json @@ -4292,14 +4292,6 @@ "write" ] }, - "organization_custom_roles": { - "type": "string", - "description": "The level of permission to grant the access token for custom roles management.", - "enum": [ - "read", - "write" - ] - }, "deployments": { "type": "string", "description": "The level of permission to grant the access token for deployments and deployment statuses.", @@ -5537,14 +5529,6 @@ "write" ] }, - "organization_custom_roles": { - "type": "string", - "description": "The level of permission to grant the access token for custom roles management.", - "enum": [ - "read", - "write" - ] - }, "deployments": { "type": "string", "description": "The level of permission to grant the access token for deployments and deployment statuses.", @@ -6327,14 +6311,6 @@ "write" ] }, - "organization_custom_roles": { - "type": "string", - "description": "The level of permission to grant the access token for custom roles management.", - "enum": [ - "read", - "write" - ] - }, "deployments": { "type": "string", "description": "The level of permission to grant the access token for deployments and deployment statuses.", @@ -9323,14 +9299,6 @@ "write" ] }, - "organization_custom_roles": { - "type": "string", - "description": "The level of permission to grant the access token for custom roles management.", - "enum": [ - "read", - "write" - ] - }, "deployments": { "type": "string", "description": "The level of permission to grant the access token for deployments and deployment statuses.", @@ -10260,14 +10228,6 @@ "write" ] }, - "organization_custom_roles": { - "type": "string", - "description": "The level of permission to grant the access token for custom roles management.", - "enum": [ - "read", - "write" - ] - }, "deployments": { "type": "string", "description": "The level of permission to grant the access token for deployments and deployment statuses.", @@ -10983,14 +10943,6 @@ "write" ] }, - "organization_custom_roles": { - "type": "string", - "description": "The level of permission to grant the access token for custom roles management.", - "enum": [ - "read", - "write" - ] - }, "deployments": { "type": "string", "description": "The level of permission to grant the access token for deployments and deployment statuses.", @@ -11276,14 +11228,6 @@ "write" ] }, - "organization_custom_roles": { - "type": "string", - "description": "The level of permission to grant the access token for custom roles management.", - "enum": [ - "read", - "write" - ] - }, "deployments": { "type": "string", "description": "The level of permission to grant the access token for deployments and deployment statuses.", @@ -14705,14 +14649,6 @@ "write" ] }, - "organization_custom_roles": { - "type": "string", - "description": "The level of permission to grant the access token for custom roles management.", - "enum": [ - "read", - "write" - ] - }, "deployments": { "type": "string", "description": "The level of permission to grant the access token for deployments and deployment statuses.", @@ -15679,14 +15615,6 @@ "write" ] }, - "organization_custom_roles": { - "type": "string", - "description": "The level of permission to grant the access token for custom roles management.", - "enum": [ - "read", - "write" - ] - }, "deployments": { "type": "string", "description": "The level of permission to grant the access token for deployments and deployment statuses.", @@ -16525,14 +16453,6 @@ "write" ] }, - "organization_custom_roles": { - "type": "string", - "description": "The level of permission to grant the access token for custom roles management.", - "enum": [ - "read", - "write" - ] - }, "deployments": { "type": "string", "description": "The level of permission to grant the access token for deployments and deployment statuses.", @@ -17073,14 +16993,6 @@ "write" ] }, - "organization_custom_roles": { - "type": "string", - "description": "The level of permission to grant the access token for custom roles management.", - "enum": [ - "read", - "write" - ] - }, "deployments": { "type": "string", "description": "The level of permission to grant the access token for deployments and deployment statuses.", @@ -18584,14 +18496,6 @@ "write" ] }, - "organization_custom_roles": { - "type": "string", - "description": "The level of permission to grant the access token for custom roles management.", - "enum": [ - "read", - "write" - ] - }, "deployments": { "type": "string", "description": "The level of permission to grant the access token for deployments and deployment statuses.", @@ -19568,14 +19472,6 @@ "write" ] }, - "organization_custom_roles": { - "type": "string", - "description": "The level of permission to grant the access token for custom roles management.", - "enum": [ - "read", - "write" - ] - }, "deployments": { "type": "string", "description": "The level of permission to grant the access token for deployments and deployment statuses.", @@ -20625,14 +20521,6 @@ "write" ] }, - "organization_custom_roles": { - "type": "string", - "description": "The level of permission to grant the access token for custom roles management.", - "enum": [ - "read", - "write" - ] - }, "deployments": { "type": "string", "description": "The level of permission to grant the access token for deployments and deployment statuses.", @@ -21423,14 +21311,6 @@ "write" ] }, - "organization_custom_roles": { - "type": "string", - "description": "The level of permission to grant the access token for custom roles management.", - "enum": [ - "read", - "write" - ] - }, "deployments": { "type": "string", "description": "The level of permission to grant the access token for deployments and deployment statuses.", @@ -22458,14 +22338,6 @@ "write" ] }, - "organization_custom_roles": { - "type": "string", - "description": "The level of permission to grant the access token for custom roles management.", - "enum": [ - "read", - "write" - ] - }, "deployments": { "type": "string", "description": "The level of permission to grant the access token for deployments and deployment statuses.", @@ -23256,14 +23128,6 @@ "write" ] }, - "organization_custom_roles": { - "type": "string", - "description": "The level of permission to grant the access token for custom roles management.", - "enum": [ - "read", - "write" - ] - }, "deployments": { "type": "string", "description": "The level of permission to grant the access token for deployments and deployment statuses.", @@ -24165,14 +24029,6 @@ "write" ] }, - "organization_custom_roles": { - "type": "string", - "description": "The level of permission to grant the access token for custom roles management.", - "enum": [ - "read", - "write" - ] - }, "deployments": { "type": "string", "description": "The level of permission to grant the access token for deployments and deployment statuses.", @@ -25099,14 +24955,6 @@ "write" ] }, - "organization_custom_roles": { - "type": "string", - "description": "The level of permission to grant the access token for custom roles management.", - "enum": [ - "read", - "write" - ] - }, "deployments": { "type": "string", "description": "The level of permission to grant the access token for deployments and deployment statuses.", @@ -68989,7 +68837,7 @@ "/organizations/{organization_id}/custom_roles": { "get": { "summary": "List custom repository roles in an organization", - "description": "List the custom repository roles available in this organization. In order to see custom\nrepository roles in an organization, the authenticated user must be an organization owner.\n\nFor more information on custom repository roles, see \"[Managing custom repository roles for an organization](https://docs.github.com/enterprise-server@3.4/organizations/managing-peoples-access-to-your-organization-with-roles/managing-custom-repository-roles-for-an-organization)\".", + "description": "List the custom repository roles available in this organization. In order to see custom\nrepository roles in an organization, the authenticated user must be an organization owner.\n\nTo use this endpoint the authenticated user must be an administrator for the organization or of an repository of the organizaiton and must use an access token with `admin:org repo` scope.\nGitHub Apps must have the `organization_custom_roles:read` organization permission to use this endpoint.\n\nFor more information on custom repository roles, see \"[Managing custom repository roles for an organization](https://docs.github.com/enterprise-server@3.4/organizations/managing-peoples-access-to-your-organization-with-roles/managing-custom-repository-roles-for-an-organization)\".", "tags": [ "orgs" ], @@ -93533,14 +93381,6 @@ "write" ] }, - "organization_custom_roles": { - "type": "string", - "description": "The level of permission to grant the access token for custom roles management.", - "enum": [ - "read", - "write" - ] - }, "deployments": { "type": "string", "description": "The level of permission to grant the access token for deployments and deployment statuses.", @@ -94484,14 +94324,6 @@ "write" ] }, - "organization_custom_roles": { - "type": "string", - "description": "The level of permission to grant the access token for custom roles management.", - "enum": [ - "read", - "write" - ] - }, "deployments": { "type": "string", "description": "The level of permission to grant the access token for deployments and deployment statuses.", @@ -177816,6 +177648,115 @@ "protected", "protection_url" ] + }, + "examples": { + "default": { + "value": { + "name": "main", + "commit": { + "sha": "7fd1a60b01f91b314f59955a4e4d4e80d8edf11d", + "node_id": "MDY6Q29tbWl0MTI5NjI2OTo3ZmQxYTYwYjAxZjkxYjMxNGY1OTk1NWE0ZTRkNGU4MGQ4ZWRmMTFk", + "commit": { + "author": { + "name": "The Octocat", + "email": "octocat@nowhere.com", + "date": "2012-03-06T23:06:50Z" + }, + "committer": { + "name": "The Octocat", + "email": "octocat@nowhere.com", + "date": "2012-03-06T23:06:50Z" + }, + "message": "Merge pull request #6 from Spaceghost/patch-1\n\nNew line at end of file.", + "tree": { + "sha": "b4eecafa9be2f2006ce1b709d6857b07069b4608", + "url": "https://api.github.com/repos/octocat/Hello-World/git/trees/b4eecafa9be2f2006ce1b709d6857b07069b4608" + }, + "url": "https://api.github.com/repos/octocat/Hello-World/git/commits/7fd1a60b01f91b314f59955a4e4d4e80d8edf11d", + "comment_count": 77, + "verification": { + "verified": false, + "reason": "unsigned", + "signature": null, + "payload": null + } + }, + "url": "https://api.github.com/repos/octocat/Hello-World/commits/7fd1a60b01f91b314f59955a4e4d4e80d8edf11d", + "html_url": "https://github.com/octocat/Hello-World/commit/7fd1a60b01f91b314f59955a4e4d4e80d8edf11d", + "comments_url": "https://api.github.com/repos/octocat/Hello-World/commits/7fd1a60b01f91b314f59955a4e4d4e80d8edf11d/comments", + "author": { + "login": "octocat", + "id": 583231, + "node_id": "MDQ6VXNlcjU4MzIzMQ==", + "avatar_url": "https://avatars.githubusercontent.com/u/583231?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/octocat", + "html_url": "https://github.com/octocat", + "followers_url": "https://api.github.com/users/octocat/followers", + "following_url": "https://api.github.com/users/octocat/following{/other_user}", + "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}", + "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/octocat/subscriptions", + "organizations_url": "https://api.github.com/users/octocat/orgs", + "repos_url": "https://api.github.com/users/octocat/repos", + "events_url": "https://api.github.com/users/octocat/events{/privacy}", + "received_events_url": "https://api.github.com/users/octocat/received_events", + "type": "User", + "site_admin": false + }, + "committer": { + "login": "octocat", + "id": 583231, + "node_id": "MDQ6VXNlcjU4MzIzMQ==", + "avatar_url": "https://avatars.githubusercontent.com/u/583231?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/octocat", + "html_url": "https://github.com/octocat", + "followers_url": "https://api.github.com/users/octocat/followers", + "following_url": "https://api.github.com/users/octocat/following{/other_user}", + "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}", + "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/octocat/subscriptions", + "organizations_url": "https://api.github.com/users/octocat/orgs", + "repos_url": "https://api.github.com/users/octocat/repos", + "events_url": "https://api.github.com/users/octocat/events{/privacy}", + "received_events_url": "https://api.github.com/users/octocat/received_events", + "type": "User", + "site_admin": false + }, + "parents": [ + { + "sha": "553c2077f0edc3d5dc5d17262f6aa498e69d6f8e", + "url": "https://api.github.com/repos/octocat/Hello-World/commits/553c2077f0edc3d5dc5d17262f6aa498e69d6f8e", + "html_url": "https://github.com/octocat/Hello-World/commit/553c2077f0edc3d5dc5d17262f6aa498e69d6f8e" + }, + { + "sha": "762941318ee16e59dabbacb1b4049eec22f0d303", + "url": "https://api.github.com/repos/octocat/Hello-World/commits/762941318ee16e59dabbacb1b4049eec22f0d303", + "html_url": "https://github.com/octocat/Hello-World/commit/762941318ee16e59dabbacb1b4049eec22f0d303" + } + ] + }, + "_links": { + "self": "https://api.github.com/repos/octocat/Hello-World/branches/main", + "html": "https://github.com/octocat/Hello-World/tree/main" + }, + "protected": false, + "protection": { + "enabled": false, + "required_status_checks": { + "enforcement_level": "off", + "contexts": [ + + ], + "checks": [ + + ] + } + }, + "protection_url": "https://api.github.com/repos/octocat/Hello-World/branches/main/protection" + } + } } } } @@ -182323,6 +182264,85 @@ "required": [ "url" ] + }, + "examples": { + "default": { + "value": { + "url": "https://api.github.com/repos/octocat/hello-world/branches/main/protection", + "required_status_checks": { + "url": "https://api.github.com/repos/octocat/hello-world/branches/main/protection/required_status_checks", + "strict": true, + "contexts": [ + "continuous-integration/travis-ci" + ], + "contexts_url": "https://api.github.com/repos/octocat/hello-world/branches/main/protection/required_status_checks/contexts", + "checks": [ + { + "context": "continuous-integration/travis-ci", + "app_id": null + } + ] + }, + "restrictions": { + "url": "https://api.github.com/repos/octocat/hello-world/branches/main/protection/restrictions", + "users_url": "https://api.github.com/repos/octocat/hello-world/branches/main/protection/restrictions/users", + "teams_url": "https://api.github.com/repos/octocat/hello-world/branches/main/protection/restrictions/teams", + "apps_url": "https://api.github.com/repos/octocat/hello-world/branches/main/protection/restrictions/apps", + "users": [ + + ], + "teams": [ + + ], + "apps": [ + + ] + }, + "required_pull_request_reviews": { + "url": "https://api.github.com/repos/octocat/hello-world/branches/main/protection/required_pull_request_reviews", + "dismiss_stale_reviews": true, + "require_code_owner_reviews": true, + "required_approving_review_count": 2, + "dismissal_restrictions": { + "url": "https://api.github.com/repos/octocat/hello-world/branches/main/protection/dismissal_restrictions", + "users_url": "https://api.github.com/repos/octocat/hello-world/branches/main/protection/dismissal_restrictions/users", + "teams_url": "https://api.github.com/repos/octocat/hello-world/branches/main/protection/dismissal_restrictions/teams", + "users": [ + + ], + "teams": [ + + ], + "apps": [ + + ] + } + }, + "required_signatures": { + "url": "https://api.github.com/repos/octocat/hello-world/branches/main/protection/required_signatures", + "enabled": false + }, + "enforce_admins": { + "url": "https://api.github.com/repos/octocat/hello-world/branches/main/protection/enforce_admins", + "enabled": true + }, + "required_linear_history": { + "enabled": true + }, + "allow_force_pushes": { + "enabled": true + }, + "allow_deletions": { + "enabled": true + }, + "block_creations": { + "enabled": true + }, + "required_conversation_resolution": { + "enabled": true + } + } + } } } } @@ -187209,7 +187229,7 @@ "properties": { "contexts": { "type": "array", - "description": "contexts parameter", + "description": "The name of the status checks", "items": { "type": "string" } @@ -187226,12 +187246,23 @@ }, { "type": "array", - "description": "contexts parameter", + "description": "The name of the status checks", "items": { "type": "string" } } ] + }, + "examples": { + "default": { + "summary": "Example adding status checks to a branch protection rule", + "value": { + "contexts": [ + "continuous-integration/travis-ci", + "continuous-integration/jenkins" + ] + } + } } } } @@ -187446,7 +187477,7 @@ "properties": { "contexts": { "type": "array", - "description": "contexts parameter", + "description": "The name of the status checks", "items": { "type": "string" } @@ -187463,12 +187494,22 @@ }, { "type": "array", - "description": "contexts parameter", + "description": "The name of the status checks", "items": { "type": "string" } } ] + }, + "examples": { + "default": { + "summary": "Example updating status checks for a branch protection rule", + "value": { + "contexts": [ + "continuous-integration/travis-ci" + ] + } + } } } } @@ -187655,7 +187696,7 @@ "properties": { "contexts": { "type": "array", - "description": "contexts parameter", + "description": "The name of the status checks", "items": { "type": "string" } @@ -187672,12 +187713,22 @@ }, { "type": "array", - "description": "contexts parameter", + "description": "The name of the status checks", "items": { "type": "string" } } ] + }, + "examples": { + "default": { + "summary": "Example removing status checks from a branch protection rule", + "value": { + "contexts": [ + "continuous-integration/travis-ci" + ] + } + } } } } @@ -190799,7 +190850,7 @@ "properties": { "teams": { "type": "array", - "description": "teams parameter", + "description": "The slug values for teams", "items": { "type": "string" } @@ -190816,12 +190867,22 @@ }, { "type": "array", - "description": "teams parameter", + "description": "The slug values for teams", "items": { "type": "string" } } ] + }, + "examples": { + "default": { + "summary": "Example adding a team in a branch protection rule", + "value": { + "teams": [ + "justice-league" + ] + } + } } } } @@ -191193,7 +191254,7 @@ "properties": { "teams": { "type": "array", - "description": "teams parameter", + "description": "The slug values for teams", "items": { "type": "string" } @@ -191204,18 +191265,28 @@ ], "example": { "teams": [ - "my-team" + "justice-league" ] } }, { "type": "array", - "description": "teams parameter", + "description": "The slug values for teams", "items": { "type": "string" } } ] + }, + "examples": { + "default": { + "summary": "Example replacing a team in a branch protection rule", + "value": { + "teams": [ + "justice-league" + ] + } + } } } } @@ -191586,7 +191657,7 @@ "properties": { "teams": { "type": "array", - "description": "teams parameter", + "description": "The slug values for teams", "items": { "type": "string" } @@ -191603,12 +191674,22 @@ }, { "type": "array", - "description": "teams parameter", + "description": "The slug values for teams", "items": { "type": "string" } } ] + }, + "examples": { + "default": { + "summary": "Example removing a team in a branch protection rule", + "value": { + "teams": [ + "justice-league" + ] + } + } } } } @@ -192255,7 +192336,7 @@ "properties": { "users": { "type": "array", - "description": "users parameter", + "description": "The username for users", "items": { "type": "string" } @@ -192277,6 +192358,16 @@ } } ] + }, + "examples": { + "default": { + "summary": "Example adding a user in a branch protection rule", + "value": { + "users": [ + "octocat" + ] + } + } } } } @@ -192615,7 +192706,7 @@ "properties": { "users": { "type": "array", - "description": "users parameter", + "description": "The username for users", "items": { "type": "string" } @@ -192637,6 +192728,16 @@ } } ] + }, + "examples": { + "default": { + "summary": "Example replacing a user in a branch protection rule", + "value": { + "users": [ + "octocat" + ] + } + } } } } @@ -192974,7 +193075,7 @@ "properties": { "users": { "type": "array", - "description": "users parameter", + "description": "The username for users", "items": { "type": "string" } @@ -192996,6 +193097,16 @@ } } ] + }, + "examples": { + "default": { + "summary": "Example removing a user in a branch protection rule", + "value": { + "users": [ + "octocat" + ] + } + } } } } @@ -216263,6 +216374,7 @@ "ref": "refs/heads/main", "analysis_key": ".github/workflows/codeql-analysis.yml:CodeQL-Build", "environment": "", + "category": ".github/workflows/codeql-analysis.yml:CodeQL-Build", "state": "open", "fixed_at": null, "commit_sha": "39406e42cb832f683daa691dd652a8dc36ee8930", @@ -217070,7 +217182,7 @@ }, "delete": { "summary": "Delete a code scanning analysis from a repository", - "description": "Deletes a specified code scanning analysis from a repository. For\nprivate repositories, you must use an access token with the `repo` scope. For public repositories,\nyou must use an access token with `public_repo` scope.\nGitHub Apps must have the `security_events` write permission to use this endpoint.\n\nYou can delete one analysis at a time.\nTo delete a series of analyses, start with the most recent analysis and work backwards.\nConceptually, the process is similar to the undo function in a text editor.\n\nWhen you list the analyses for a repository,\none or more will be identified as deletable in the response:\n\n```\n\"deletable\": true\n```\n\nAn analysis is deletable when it's the most recent in a set of analyses.\nTypically, a repository will have multiple sets of analyses\nfor each enabled code scanning tool,\nwhere a set is determined by a unique combination of analysis values:\n\n* `ref`\n* `tool`\n* `analysis_key`\n* `environment`\n\nIf you attempt to delete an analysis that is not the most recent in a set,\nyou'll get a 400 response with the message:\n\n```\nAnalysis specified is not deletable.\n```\n\nThe response from a successful `DELETE` operation provides you with\ntwo alternative URLs for deleting the next analysis in the set:\n`next_analysis_url` and `confirm_delete_url`.\nUse the `next_analysis_url` URL if you want to avoid accidentally deleting the final analysis\nin a set. This is a useful option if you want to preserve at least one analysis\nfor the specified tool in your repository.\nUse the `confirm_delete_url` URL if you are content to remove all analyses for a tool.\nWhen you delete the last analysis in a set, the value of `next_analysis_url` and `confirm_delete_url`\nin the 200 response is `null`.\n\nAs an example of the deletion process,\nlet's imagine that you added a workflow that configured a particular code scanning tool\nto analyze the code in a repository. This tool has added 15 analyses:\n10 on the default branch, and another 5 on a topic branch.\nYou therefore have two separate sets of analyses for this tool.\nYou've now decided that you want to remove all of the analyses for the tool.\nTo do this you must make 15 separate deletion requests.\nTo start, you must find an analysis that's identified as deletable.\nEach set of analyses always has one that's identified as deletable.\nHaving found the deletable analysis for one of the two sets,\ndelete this analysis and then continue deleting the next analysis in the set until they're all deleted.\nThen repeat the process for the second set.\nThe procedure therefore consists of a nested loop:\n\n**Outer loop**:\n* List the analyses for the repository, filtered by tool.\n* Parse this list to find a deletable analysis. If found:\n\n **Inner loop**:\n * Delete the identified analysis.\n * Parse the response for the value of `confirm_delete_url` and, if found, use this in the next iteration.\n\nThe above process assumes that you want to remove all trace of the tool's analyses from the GitHub user interface, for the specified repository, and it therefore uses the `confirm_delete_url` value. Alternatively, you could use the `next_analysis_url` value, which would leave the last analysis in each set undeleted to avoid removing a tool's analysis entirely.", + "description": "Deletes a specified code scanning analysis from a repository. For\nprivate repositories, you must use an access token with the `repo` scope. For public repositories,\nyou must use an access token with `public_repo` scope.\nGitHub Apps must have the `security_events` write permission to use this endpoint.\n\nYou can delete one analysis at a time.\nTo delete a series of analyses, start with the most recent analysis and work backwards.\nConceptually, the process is similar to the undo function in a text editor.\n\nWhen you list the analyses for a repository,\none or more will be identified as deletable in the response:\n\n```\n\"deletable\": true\n```\n\nAn analysis is deletable when it's the most recent in a set of analyses.\nTypically, a repository will have multiple sets of analyses\nfor each enabled code scanning tool,\nwhere a set is determined by a unique combination of analysis values:\n\n* `ref`\n* `tool`\n* `category`\n\nIf you attempt to delete an analysis that is not the most recent in a set,\nyou'll get a 400 response with the message:\n\n```\nAnalysis specified is not deletable.\n```\n\nThe response from a successful `DELETE` operation provides you with\ntwo alternative URLs for deleting the next analysis in the set:\n`next_analysis_url` and `confirm_delete_url`.\nUse the `next_analysis_url` URL if you want to avoid accidentally deleting the final analysis\nin a set. This is a useful option if you want to preserve at least one analysis\nfor the specified tool in your repository.\nUse the `confirm_delete_url` URL if you are content to remove all analyses for a tool.\nWhen you delete the last analysis in a set, the value of `next_analysis_url` and `confirm_delete_url`\nin the 200 response is `null`.\n\nAs an example of the deletion process,\nlet's imagine that you added a workflow that configured a particular code scanning tool\nto analyze the code in a repository. This tool has added 15 analyses:\n10 on the default branch, and another 5 on a topic branch.\nYou therefore have two separate sets of analyses for this tool.\nYou've now decided that you want to remove all of the analyses for the tool.\nTo do this you must make 15 separate deletion requests.\nTo start, you must find an analysis that's identified as deletable.\nEach set of analyses always has one that's identified as deletable.\nHaving found the deletable analysis for one of the two sets,\ndelete this analysis and then continue deleting the next analysis in the set until they're all deleted.\nThen repeat the process for the second set.\nThe procedure therefore consists of a nested loop:\n\n**Outer loop**:\n* List the analyses for the repository, filtered by tool.\n* Parse this list to find a deletable analysis. If found:\n\n **Inner loop**:\n * Delete the identified analysis.\n * Parse the response for the value of `confirm_delete_url` and, if found, use this in the next iteration.\n\nThe above process assumes that you want to remove all trace of the tool's analyses from the GitHub user interface, for the specified repository, and it therefore uses the `confirm_delete_url` value. Alternatively, you could use the `next_analysis_url` value, which would leave the last analysis in each set undeleted to avoid removing a tool's analysis entirely.", "operationId": "code-scanning/delete-analysis", "tags": [ "code-scanning" @@ -242200,7 +242312,7 @@ "/repos/{owner}/{repo}/contents/{path}": { "get": { "summary": "Get repository content", - "description": "Gets the contents of a file or directory in a repository. Specify the file path or directory in `:path`. If you omit\n`:path`, you will receive the contents of the repository's root directory. See the description below regarding what the API response includes for directories. \n\nFiles and symlinks support [a custom media type](https://docs.github.com/enterprise-server@3.4/rest/reference/repos#custom-media-types) for\nretrieving the raw content or rendered HTML (when supported). All content types support [a custom media\ntype](https://docs.github.com/enterprise-server@3.4/rest/reference/repos#custom-media-types) to ensure the content is returned in a consistent\nobject format.\n\n**Note**:\n* To get a repository's contents recursively, you can [recursively get the tree](https://docs.github.com/enterprise-server@3.4/rest/reference/git#trees).\n* This API has an upper limit of 1,000 files for a directory. If you need to retrieve more files, use the [Git Trees\nAPI](https://docs.github.com/enterprise-server@3.4/rest/reference/git#get-a-tree).\n* This API supports files up to 1 megabyte in size.\n\n#### If the content is a directory\nThe response will be an array of objects, one object for each item in the directory.\nWhen listing the contents of a directory, submodules have their \"type\" specified as \"file\". Logically, the value\n_should_ be \"submodule\". This behavior exists in API v3 [for backwards compatibility purposes](https://git.io/v1YCW).\nIn the next major version of the API, the type will be returned as \"submodule\".\n\n#### If the content is a symlink \nIf the requested `:path` points to a symlink, and the symlink's target is a normal file in the repository, then the\nAPI responds with the content of the file (in the format shown in the example. Otherwise, the API responds with an object \ndescribing the symlink itself.\n\n#### If the content is a submodule\nThe `submodule_git_url` identifies the location of the submodule repository, and the `sha` identifies a specific\ncommit within the submodule repository. Git uses the given URL when cloning the submodule repository, and checks out\nthe submodule at that specific commit.\n\nIf the submodule repository is not hosted on github.com, the Git URLs (`git_url` and `_links[\"git\"]`) and the\ngithub.com URLs (`html_url` and `_links[\"html\"]`) will have null values.", + "description": "Gets the contents of a file or directory in a repository. Specify the file path or directory in `:path`. If you omit\n`:path`, you will receive the contents of the repository's root directory. See the description below regarding what the API response includes for directories. \n\nFiles and symlinks support [a custom media type](https://docs.github.com/enterprise-server@3.4/rest/reference/repos#custom-media-types) for\nretrieving the raw content or rendered HTML (when supported). All content types support [a custom media\ntype](https://docs.github.com/enterprise-server@3.4/rest/reference/repos#custom-media-types) to ensure the content is returned in a consistent\nobject format.\n\n**Notes**:\n* To get a repository's contents recursively, you can [recursively get the tree](https://docs.github.com/enterprise-server@3.4/rest/reference/git#trees).\n* This API has an upper limit of 1,000 files for a directory. If you need to retrieve more files, use the [Git Trees\nAPI](https://docs.github.com/enterprise-server@3.4/rest/reference/git#get-a-tree).\n * Download URLs expire and are meant to be used just once. To ensure the download URL does not expire, please use the contents API to obtain a fresh download URL for each download. \n* This API supports files up to 1 megabyte in size.\n\n#### If the content is a directory\nThe response will be an array of objects, one object for each item in the directory.\nWhen listing the contents of a directory, submodules have their \"type\" specified as \"file\". Logically, the value\n_should_ be \"submodule\". This behavior exists in API v3 [for backwards compatibility purposes](https://git.io/v1YCW).\nIn the next major version of the API, the type will be returned as \"submodule\".\n\n#### If the content is a symlink \nIf the requested `:path` points to a symlink, and the symlink's target is a normal file in the repository, then the\nAPI responds with the content of the file (in the format shown in the example. Otherwise, the API responds with an object \ndescribing the symlink itself.\n\n#### If the content is a submodule\nThe `submodule_git_url` identifies the location of the submodule repository, and the `sha` identifies a specific\ncommit within the submodule repository. Git uses the given URL when cloning the submodule repository, and checks out\nthe submodule at that specific commit.\n\nIf the submodule repository is not hosted on github.com, the Git URLs (`git_url` and `_links[\"git\"]`) and the\ngithub.com URLs (`html_url` and `_links[\"html\"]`) will have null values.", "tags": [ "repos" ], @@ -272376,14 +272488,6 @@ "write" ] }, - "organization_custom_roles": { - "type": "string", - "description": "The level of permission to grant the access token for custom roles management.", - "enum": [ - "read", - "write" - ] - }, "deployments": { "type": "string", "description": "The level of permission to grant the access token for deployments and deployment statuses.", @@ -275742,6 +275846,14 @@ ] } } + }, + "examples": { + "default": { + "summary": "Example request body", + "value": { + "permissions": "write" + } + } } } } @@ -281762,7 +281874,8 @@ "type": "User", "site_admin": false }, - "author_association": "COLLABORATOR" + "author_association": "COLLABORATOR", + "state_reason": "completed" } ] } @@ -285212,7 +285325,8 @@ "type": "User", "site_admin": false }, - "author_association": "COLLABORATOR" + "author_association": "COLLABORATOR", + "state_reason": "completed" } } } @@ -293863,7 +293977,8 @@ "closed_at": null, "created_at": "2011-04-22T13:33:48Z", "updated_at": "2011-04-22T13:33:48Z", - "author_association": "COLLABORATOR" + "author_association": "COLLABORATOR", + "state_reason": "completed" } } ] @@ -298797,7 +298912,8 @@ "closed_at": null, "created_at": "2011-04-22T13:33:48Z", "updated_at": "2011-04-22T13:33:48Z", - "author_association": "COLLABORATOR" + "author_association": "COLLABORATOR", + "state_reason": "completed" } } } @@ -302092,7 +302208,8 @@ "type": "User", "site_admin": false }, - "author_association": "COLLABORATOR" + "author_association": "COLLABORATOR", + "state_reason": "completed" } } } @@ -302273,6 +302390,16 @@ "closed" ] }, + "state_reason": { + "type": [ + "string", + "null" + ], + "description": "The reason for the current state", + "examples": [ + "not_planned" + ] + }, "milestone": { "oneOf": [ { @@ -305510,7 +305637,8 @@ "type": "User", "site_admin": false }, - "author_association": "COLLABORATOR" + "author_association": "COLLABORATOR", + "state_reason": "completed" } } } @@ -308955,7 +309083,8 @@ "type": "User", "site_admin": false }, - "author_association": "COLLABORATOR" + "author_association": "COLLABORATOR", + "state_reason": "completed" } } } @@ -312197,7 +312326,8 @@ "type": "User", "site_admin": false }, - "author_association": "COLLABORATOR" + "author_association": "COLLABORATOR", + "state_reason": "completed" } } } @@ -421794,7 +421924,8 @@ "body": "...", "score": 1, "locked": true, - "author_association": "COLLABORATOR" + "author_association": "COLLABORATOR", + "state_reason": "completed" } ] } @@ -445466,14 +445597,6 @@ "write" ] }, - "organization_custom_roles": { - "type": "string", - "description": "The level of permission to grant the access token for custom roles management.", - "enum": [ - "read", - "write" - ] - }, "deployments": { "type": "string", "description": "The level of permission to grant the access token for deployments and deployment statuses.", @@ -489409,14 +489532,6 @@ "write" ] }, - "organization_custom_roles": { - "type": "string", - "description": "The level of permission to grant the access token for custom roles management.", - "enum": [ - "read", - "write" - ] - }, "deployments": { "type": "string", "description": "The level of permission to grant the access token for deployments and deployment statuses.", diff --git a/descriptions-next/ghes-3.4/dereferenced/ghes-3.4.deref.yaml b/descriptions-next/ghes-3.4/dereferenced/ghes-3.4.deref.yaml index 38f0bdc27c..884aff4b80 100644 --- a/descriptions-next/ghes-3.4/dereferenced/ghes-3.4.deref.yaml +++ b/descriptions-next/ghes-3.4/dereferenced/ghes-3.4.deref.yaml @@ -2529,13 +2529,6 @@ paths: enum: - read - write - organization_custom_roles: - type: string - description: The level of permission to grant the - access token for custom roles management. - enum: - - read - - write deployments: type: string description: The level of permission to grant the @@ -16362,6 +16355,9 @@ paths: List the custom repository roles available in this organization. In order to see custom repository roles in an organization, the authenticated user must be an organization owner. + To use this endpoint the authenticated user must be an administrator for the organization or of an repository of the organizaiton and must use an access token with `admin:org repo` scope. + GitHub Apps must have the `organization_custom_roles:read` organization permission to use this endpoint. + For more information on custom repository roles, see "[Managing custom repository roles for an organization](https://docs.github.com/enterprise-server@3.4/organizations/managing-peoples-access-to-your-organization-with-roles/managing-custom-repository-roles-for-an-organization)". tags: - orgs @@ -33908,6 +33904,95 @@ paths: - protection - protected - protection_url + examples: + default: + value: + name: main + commit: + sha: 7fd1a60b01f91b314f59955a4e4d4e80d8edf11d + node_id: MDY6Q29tbWl0MTI5NjI2OTo3ZmQxYTYwYjAxZjkxYjMxNGY1OTk1NWE0ZTRkNGU4MGQ4ZWRmMTFk + commit: + author: + name: The Octocat + email: octocat@nowhere.com + date: '2012-03-06T23:06:50Z' + committer: + name: The Octocat + email: octocat@nowhere.com + date: '2012-03-06T23:06:50Z' + message: |- + Merge pull request #6 from Spaceghost/patch-1 + + New line at end of file. + tree: + sha: b4eecafa9be2f2006ce1b709d6857b07069b4608 + url: https://api.github.com/repos/octocat/Hello-World/git/trees/b4eecafa9be2f2006ce1b709d6857b07069b4608 + url: https://api.github.com/repos/octocat/Hello-World/git/commits/7fd1a60b01f91b314f59955a4e4d4e80d8edf11d + comment_count: 77 + verification: + verified: false + reason: unsigned + signature: + payload: + url: https://api.github.com/repos/octocat/Hello-World/commits/7fd1a60b01f91b314f59955a4e4d4e80d8edf11d + html_url: https://github.com/octocat/Hello-World/commit/7fd1a60b01f91b314f59955a4e4d4e80d8edf11d + comments_url: https://api.github.com/repos/octocat/Hello-World/commits/7fd1a60b01f91b314f59955a4e4d4e80d8edf11d/comments + author: + login: octocat + id: 583231 + node_id: MDQ6VXNlcjU4MzIzMQ== + avatar_url: https://avatars.githubusercontent.com/u/583231?v=4 + gravatar_id: '' + url: https://api.github.com/users/octocat + html_url: https://github.com/octocat + followers_url: https://api.github.com/users/octocat/followers + following_url: https://api.github.com/users/octocat/following{/other_user} + gists_url: https://api.github.com/users/octocat/gists{/gist_id} + starred_url: https://api.github.com/users/octocat/starred{/owner}{/repo} + subscriptions_url: https://api.github.com/users/octocat/subscriptions + organizations_url: https://api.github.com/users/octocat/orgs + repos_url: https://api.github.com/users/octocat/repos + events_url: https://api.github.com/users/octocat/events{/privacy} + received_events_url: https://api.github.com/users/octocat/received_events + type: User + site_admin: false + committer: + login: octocat + id: 583231 + node_id: MDQ6VXNlcjU4MzIzMQ== + avatar_url: https://avatars.githubusercontent.com/u/583231?v=4 + gravatar_id: '' + url: https://api.github.com/users/octocat + html_url: https://github.com/octocat + followers_url: https://api.github.com/users/octocat/followers + following_url: https://api.github.com/users/octocat/following{/other_user} + gists_url: https://api.github.com/users/octocat/gists{/gist_id} + starred_url: https://api.github.com/users/octocat/starred{/owner}{/repo} + subscriptions_url: https://api.github.com/users/octocat/subscriptions + organizations_url: https://api.github.com/users/octocat/orgs + repos_url: https://api.github.com/users/octocat/repos + events_url: https://api.github.com/users/octocat/events{/privacy} + received_events_url: https://api.github.com/users/octocat/received_events + type: User + site_admin: false + parents: + - sha: 553c2077f0edc3d5dc5d17262f6aa498e69d6f8e + url: https://api.github.com/repos/octocat/Hello-World/commits/553c2077f0edc3d5dc5d17262f6aa498e69d6f8e + html_url: https://github.com/octocat/Hello-World/commit/553c2077f0edc3d5dc5d17262f6aa498e69d6f8e + - sha: 762941318ee16e59dabbacb1b4049eec22f0d303 + url: https://api.github.com/repos/octocat/Hello-World/commits/762941318ee16e59dabbacb1b4049eec22f0d303 + html_url: https://github.com/octocat/Hello-World/commit/762941318ee16e59dabbacb1b4049eec22f0d303 + _links: + self: https://api.github.com/repos/octocat/Hello-World/branches/main + html: https://github.com/octocat/Hello-World/tree/main + protected: false + protection: + enabled: false + required_status_checks: + enforcement_level: 'off' + contexts: [] + checks: [] + protection_url: https://api.github.com/repos/octocat/Hello-World/branches/main/protection '301': *186 '404': *33 x-github: @@ -34537,6 +34622,55 @@ paths: - enabled required: - url + examples: + default: + value: + url: https://api.github.com/repos/octocat/hello-world/branches/main/protection + required_status_checks: + url: https://api.github.com/repos/octocat/hello-world/branches/main/protection/required_status_checks + strict: true + contexts: + - continuous-integration/travis-ci + contexts_url: https://api.github.com/repos/octocat/hello-world/branches/main/protection/required_status_checks/contexts + checks: + - context: continuous-integration/travis-ci + app_id: + restrictions: + url: https://api.github.com/repos/octocat/hello-world/branches/main/protection/restrictions + users_url: https://api.github.com/repos/octocat/hello-world/branches/main/protection/restrictions/users + teams_url: https://api.github.com/repos/octocat/hello-world/branches/main/protection/restrictions/teams + apps_url: https://api.github.com/repos/octocat/hello-world/branches/main/protection/restrictions/apps + users: [] + teams: [] + apps: [] + required_pull_request_reviews: + url: https://api.github.com/repos/octocat/hello-world/branches/main/protection/required_pull_request_reviews + dismiss_stale_reviews: true + require_code_owner_reviews: true + required_approving_review_count: 2 + dismissal_restrictions: + url: https://api.github.com/repos/octocat/hello-world/branches/main/protection/dismissal_restrictions + users_url: https://api.github.com/repos/octocat/hello-world/branches/main/protection/dismissal_restrictions/users + teams_url: https://api.github.com/repos/octocat/hello-world/branches/main/protection/dismissal_restrictions/teams + users: [] + teams: [] + apps: [] + required_signatures: + url: https://api.github.com/repos/octocat/hello-world/branches/main/protection/required_signatures + enabled: false + enforce_admins: + url: https://api.github.com/repos/octocat/hello-world/branches/main/protection/enforce_admins + enabled: true + required_linear_history: + enabled: true + allow_force_pushes: + enabled: true + allow_deletions: + enabled: true + block_creations: + enabled: true + required_conversation_resolution: + enabled: true '403': *35 '422': *78 '404': *33 @@ -35200,7 +35334,7 @@ paths: properties: contexts: type: array - description: contexts parameter + description: The name of the status checks items: type: string required: @@ -35209,9 +35343,16 @@ paths: contexts: - contexts - type: array - description: contexts parameter + description: The name of the status checks items: type: string + examples: + default: + summary: Example adding status checks to a branch protection rule + value: + contexts: + - continuous-integration/travis-ci + - continuous-integration/jenkins responses: '200': description: Response @@ -35262,7 +35403,7 @@ paths: properties: contexts: type: array - description: contexts parameter + description: The name of the status checks items: type: string required: @@ -35271,9 +35412,15 @@ paths: contexts: - contexts - type: array - description: contexts parameter + description: The name of the status checks items: type: string + examples: + default: + summary: Example updating status checks for a branch protection rule + value: + contexts: + - continuous-integration/travis-ci responses: '200': description: Response @@ -35321,7 +35468,7 @@ paths: properties: contexts: type: array - description: contexts parameter + description: The name of the status checks items: type: string required: @@ -35330,9 +35477,15 @@ paths: contexts: - contexts - type: array - description: contexts parameter + description: The name of the status checks items: type: string + examples: + default: + summary: Example removing status checks from a branch protection rule + value: + contexts: + - continuous-integration/travis-ci responses: '200': description: Response @@ -35785,7 +35938,7 @@ paths: properties: teams: type: array - description: teams parameter + description: The slug values for teams items: type: string required: @@ -35794,9 +35947,15 @@ paths: teams: - my-team - type: array - description: teams parameter + description: The slug values for teams items: type: string + examples: + default: + summary: Example adding a team in a branch protection rule + value: + teams: + - justice-league responses: '200': description: Response @@ -35844,18 +36003,24 @@ paths: properties: teams: type: array - description: teams parameter + description: The slug values for teams items: type: string required: - teams example: teams: - - my-team + - justice-league - type: array - description: teams parameter + description: The slug values for teams items: type: string + examples: + default: + summary: Example replacing a team in a branch protection rule + value: + teams: + - justice-league responses: '200': description: Response @@ -35902,7 +36067,7 @@ paths: properties: teams: type: array - description: teams parameter + description: The slug values for teams items: type: string required: @@ -35911,9 +36076,15 @@ paths: teams: - my-team - type: array - description: teams parameter + description: The slug values for teams items: type: string + examples: + default: + summary: Example removing a team in a branch protection rule + value: + teams: + - justice-league responses: '200': description: Response @@ -35994,7 +36165,7 @@ paths: properties: users: type: array - description: users parameter + description: The username for users items: type: string required: @@ -36005,6 +36176,12 @@ paths: - type: array items: type: string + examples: + default: + summary: Example adding a user in a branch protection rule + value: + users: + - octocat responses: '200': description: Response @@ -36052,7 +36229,7 @@ paths: properties: users: type: array - description: users parameter + description: The username for users items: type: string required: @@ -36063,6 +36240,12 @@ paths: - type: array items: type: string + examples: + default: + summary: Example replacing a user in a branch protection rule + value: + users: + - octocat responses: '200': description: Response @@ -36109,7 +36292,7 @@ paths: properties: users: type: array - description: users parameter + description: The username for users items: type: string required: @@ -36120,6 +36303,12 @@ paths: - type: array items: type: string + examples: + default: + summary: Example removing a user in a branch protection rule + value: + users: + - octocat responses: '200': description: Response @@ -39209,6 +39398,7 @@ paths: - ref: refs/heads/main analysis_key: ".github/workflows/codeql-analysis.yml:CodeQL-Build" environment: '' + category: ".github/workflows/codeql-analysis.yml:CodeQL-Build" state: open fixed_at: commit_sha: 39406e42cb832f683daa691dd652a8dc36ee8930 @@ -39547,8 +39737,7 @@ paths: * `ref` * `tool` - * `analysis_key` - * `environment` + * `category` If you attempt to delete an analysis that is not the most recent in a set, you'll get a 400 response with the message: @@ -43129,29 +43318,31 @@ paths: support [a custom media type](https://docs.github.com/enterprise-server@3.4/rest/reference/repos#custom-media-types) for\nretrieving the raw content or rendered HTML (when supported). All content types support [a custom media\ntype](https://docs.github.com/enterprise-server@3.4/rest/reference/repos#custom-media-types) - to ensure the content is returned in a consistent\nobject format.\n\n**Note**:\n* + to ensure the content is returned in a consistent\nobject format.\n\n**Notes**:\n* \ To get a repository's contents recursively, you can [recursively get the tree](https://docs.github.com/enterprise-server@3.4/rest/reference/git#trees).\n* \ This API has an upper limit of 1,000 files for a directory. If you need - to retrieve more files, use the [Git Trees\nAPI](https://docs.github.com/enterprise-server@3.4/rest/reference/git#get-a-tree).\n* - \ This API supports files up to 1 megabyte in size.\n\n#### If the content - is a directory\nThe response will be an array of objects, one object for each - item in the directory.\nWhen listing the contents of a directory, submodules - have their \"type\" specified as \"file\". Logically, the value\n_should_ - be \"submodule\". This behavior exists in API v3 [for backwards compatibility - purposes](https://git.io/v1YCW).\nIn the next major version of the API, the - type will be returned as \"submodule\".\n\n#### If the content is a symlink - \nIf the requested `:path` points to a symlink, and the symlink's target is - a normal file in the repository, then the\nAPI responds with the content of - the file (in the format shown in the example. Otherwise, the API responds - with an object \ndescribing the symlink itself.\n\n#### If the content is - a submodule\nThe `submodule_git_url` identifies the location of the submodule - repository, and the `sha` identifies a specific\ncommit within the submodule - repository. Git uses the given URL when cloning the submodule repository, - and checks out\nthe submodule at that specific commit.\n\nIf the submodule - repository is not hosted on github.com, the Git URLs (`git_url` and `_links[\"git\"]`) - and the\ngithub.com URLs (`html_url` and `_links[\"html\"]`) will have null - values." + to retrieve more files, use the [Git Trees\nAPI](https://docs.github.com/enterprise-server@3.4/rest/reference/git#get-a-tree).\n + * Download URLs expire and are meant to be used just once. To ensure the + download URL does not expire, please use the contents API to obtain a fresh + download URL for each download. \n* This API supports files up to 1 megabyte + in size.\n\n#### If the content is a directory\nThe response will be an array + of objects, one object for each item in the directory.\nWhen listing the contents + of a directory, submodules have their \"type\" specified as \"file\". Logically, + the value\n_should_ be \"submodule\". This behavior exists in API v3 [for + backwards compatibility purposes](https://git.io/v1YCW).\nIn the next major + version of the API, the type will be returned as \"submodule\".\n\n#### If + the content is a symlink \nIf the requested `:path` points to a symlink, and + the symlink's target is a normal file in the repository, then the\nAPI responds + with the content of the file (in the format shown in the example. Otherwise, + the API responds with an object \ndescribing the symlink itself.\n\n#### If + the content is a submodule\nThe `submodule_git_url` identifies the location + of the submodule repository, and the `sha` identifies a specific\ncommit within + the submodule repository. Git uses the given URL when cloning the submodule + repository, and checks out\nthe submodule at that specific commit.\n\nIf the + submodule repository is not hosted on github.com, the Git URLs (`git_url` + and `_links[\"git\"]`) and the\ngithub.com URLs (`html_url` and `_links[\"html\"]`) + will have null values." tags: - repos operationId: repos/get-content @@ -48517,6 +48708,11 @@ paths: - maintain - triage - admin + examples: + default: + summary: Example request body + value: + permissions: write responses: '200': description: Response @@ -48894,6 +49090,7 @@ paths: type: User site_admin: false author_association: COLLABORATOR + state_reason: completed headers: Link: *6 '301': *186 @@ -49146,6 +49343,7 @@ paths: type: User site_admin: false author_association: COLLABORATOR + state_reason: completed headers: Location: example: https://api.github.com/repos/octocat/Hello-World/issues/1347 @@ -49847,6 +50045,7 @@ paths: created_at: '2011-04-22T13:33:48Z' updated_at: '2011-04-22T13:33:48Z' author_association: COLLABORATOR + state_reason: completed headers: Link: *6 '422': *29 @@ -50069,6 +50268,7 @@ paths: created_at: '2011-04-22T13:33:48Z' updated_at: '2011-04-22T13:33:48Z' author_association: COLLABORATOR + state_reason: completed '404': *33 '410': *148 '403': *35 @@ -50171,6 +50371,13 @@ paths: enum: - open - closed + state_reason: + type: + - string + - 'null' + description: The reason for the current state + examples: + - not_planned milestone: oneOf: - type: string @@ -64325,6 +64532,7 @@ paths: score: 1 locked: true author_association: COLLABORATOR + state_reason: completed '503': *82 '422': *29 '304': *38 diff --git a/descriptions-next/ghes-3.4/ghes-3.4.json b/descriptions-next/ghes-3.4/ghes-3.4.json index ac65dd229e..6bee5a4076 100644 --- a/descriptions-next/ghes-3.4/ghes-3.4.json +++ b/descriptions-next/ghes-3.4/ghes-3.4.json @@ -9276,7 +9276,7 @@ "/organizations/{organization_id}/custom_roles": { "get": { "summary": "List custom repository roles in an organization", - "description": "List the custom repository roles available in this organization. In order to see custom\nrepository roles in an organization, the authenticated user must be an organization owner.\n\nFor more information on custom repository roles, see \"[Managing custom repository roles for an organization](https://docs.github.com/enterprise-server@3.4/organizations/managing-peoples-access-to-your-organization-with-roles/managing-custom-repository-roles-for-an-organization)\".", + "description": "List the custom repository roles available in this organization. In order to see custom\nrepository roles in an organization, the authenticated user must be an organization owner.\n\nTo use this endpoint the authenticated user must be an administrator for the organization or of an repository of the organizaiton and must use an access token with `admin:org repo` scope.\nGitHub Apps must have the `organization_custom_roles:read` organization permission to use this endpoint.\n\nFor more information on custom repository roles, see \"[Managing custom repository roles for an organization](https://docs.github.com/enterprise-server@3.4/organizations/managing-peoples-access-to-your-organization-with-roles/managing-custom-repository-roles-for-an-organization)\".", "tags": [ "orgs" ], @@ -22108,6 +22108,11 @@ "application/json": { "schema": { "$ref": "#/components/schemas/branch-with-protection" + }, + "examples": { + "default": { + "$ref": "#/components/examples/branch-get" + } } } } @@ -22458,6 +22463,11 @@ "application/json": { "schema": { "$ref": "#/components/schemas/protected-branch" + }, + "examples": { + "default": { + "$ref": "#/components/examples/branch-protection-update" + } } } } @@ -23307,7 +23317,7 @@ "properties": { "contexts": { "type": "array", - "description": "contexts parameter", + "description": "The name of the status checks", "items": { "type": "string" } @@ -23324,12 +23334,23 @@ }, { "type": "array", - "description": "contexts parameter", + "description": "The name of the status checks", "items": { "type": "string" } } ] + }, + "examples": { + "default": { + "summary": "Example adding status checks to a branch protection rule", + "value": { + "contexts": [ + "continuous-integration/travis-ci", + "continuous-integration/jenkins" + ] + } + } } } } @@ -23407,7 +23428,7 @@ "properties": { "contexts": { "type": "array", - "description": "contexts parameter", + "description": "The name of the status checks", "items": { "type": "string" } @@ -23424,12 +23445,22 @@ }, { "type": "array", - "description": "contexts parameter", + "description": "The name of the status checks", "items": { "type": "string" } } ] + }, + "examples": { + "default": { + "summary": "Example updating status checks for a branch protection rule", + "value": { + "contexts": [ + "continuous-integration/travis-ci" + ] + } + } } } } @@ -23502,7 +23533,7 @@ "properties": { "contexts": { "type": "array", - "description": "contexts parameter", + "description": "The name of the status checks", "items": { "type": "string" } @@ -23519,12 +23550,22 @@ }, { "type": "array", - "description": "contexts parameter", + "description": "The name of the status checks", "items": { "type": "string" } } ] + }, + "examples": { + "default": { + "summary": "Example removing status checks from a branch protection rule", + "value": { + "contexts": [ + "continuous-integration/travis-ci" + ] + } + } } } } @@ -24060,7 +24101,7 @@ "properties": { "teams": { "type": "array", - "description": "teams parameter", + "description": "The slug values for teams", "items": { "type": "string" } @@ -24077,12 +24118,22 @@ }, { "type": "array", - "description": "teams parameter", + "description": "The slug values for teams", "items": { "type": "string" } } ] + }, + "examples": { + "default": { + "summary": "Example adding a team in a branch protection rule", + "value": { + "teams": [ + "justice-league" + ] + } + } } } } @@ -24151,7 +24202,7 @@ "properties": { "teams": { "type": "array", - "description": "teams parameter", + "description": "The slug values for teams", "items": { "type": "string" } @@ -24162,18 +24213,28 @@ ], "example": { "teams": [ - "my-team" + "justice-league" ] } }, { "type": "array", - "description": "teams parameter", + "description": "The slug values for teams", "items": { "type": "string" } } ] + }, + "examples": { + "default": { + "summary": "Example replacing a team in a branch protection rule", + "value": { + "teams": [ + "justice-league" + ] + } + } } } } @@ -24241,7 +24302,7 @@ "properties": { "teams": { "type": "array", - "description": "teams parameter", + "description": "The slug values for teams", "items": { "type": "string" } @@ -24258,12 +24319,22 @@ }, { "type": "array", - "description": "teams parameter", + "description": "The slug values for teams", "items": { "type": "string" } } ] + }, + "examples": { + "default": { + "summary": "Example removing a team in a branch protection rule", + "value": { + "teams": [ + "justice-league" + ] + } + } } } } @@ -24386,7 +24457,7 @@ "properties": { "users": { "type": "array", - "description": "users parameter", + "description": "The username for users", "items": { "type": "string" } @@ -24408,6 +24479,16 @@ } } ] + }, + "examples": { + "default": { + "summary": "Example adding a user in a branch protection rule", + "value": { + "users": [ + "octocat" + ] + } + } } } } @@ -24476,7 +24557,7 @@ "properties": { "users": { "type": "array", - "description": "users parameter", + "description": "The username for users", "items": { "type": "string" } @@ -24498,6 +24579,16 @@ } } ] + }, + "examples": { + "default": { + "summary": "Example replacing a user in a branch protection rule", + "value": { + "users": [ + "octocat" + ] + } + } } } } @@ -24565,7 +24656,7 @@ "properties": { "users": { "type": "array", - "description": "users parameter", + "description": "The username for users", "items": { "type": "string" } @@ -24587,6 +24678,16 @@ } } ] + }, + "examples": { + "default": { + "summary": "Example removing a user in a branch protection rule", + "value": { + "users": [ + "octocat" + ] + } + } } } } @@ -26375,7 +26476,7 @@ }, "delete": { "summary": "Delete a code scanning analysis from a repository", - "description": "Deletes a specified code scanning analysis from a repository. For\nprivate repositories, you must use an access token with the `repo` scope. For public repositories,\nyou must use an access token with `public_repo` scope.\nGitHub Apps must have the `security_events` write permission to use this endpoint.\n\nYou can delete one analysis at a time.\nTo delete a series of analyses, start with the most recent analysis and work backwards.\nConceptually, the process is similar to the undo function in a text editor.\n\nWhen you list the analyses for a repository,\none or more will be identified as deletable in the response:\n\n```\n\"deletable\": true\n```\n\nAn analysis is deletable when it's the most recent in a set of analyses.\nTypically, a repository will have multiple sets of analyses\nfor each enabled code scanning tool,\nwhere a set is determined by a unique combination of analysis values:\n\n* `ref`\n* `tool`\n* `analysis_key`\n* `environment`\n\nIf you attempt to delete an analysis that is not the most recent in a set,\nyou'll get a 400 response with the message:\n\n```\nAnalysis specified is not deletable.\n```\n\nThe response from a successful `DELETE` operation provides you with\ntwo alternative URLs for deleting the next analysis in the set:\n`next_analysis_url` and `confirm_delete_url`.\nUse the `next_analysis_url` URL if you want to avoid accidentally deleting the final analysis\nin a set. This is a useful option if you want to preserve at least one analysis\nfor the specified tool in your repository.\nUse the `confirm_delete_url` URL if you are content to remove all analyses for a tool.\nWhen you delete the last analysis in a set, the value of `next_analysis_url` and `confirm_delete_url`\nin the 200 response is `null`.\n\nAs an example of the deletion process,\nlet's imagine that you added a workflow that configured a particular code scanning tool\nto analyze the code in a repository. This tool has added 15 analyses:\n10 on the default branch, and another 5 on a topic branch.\nYou therefore have two separate sets of analyses for this tool.\nYou've now decided that you want to remove all of the analyses for the tool.\nTo do this you must make 15 separate deletion requests.\nTo start, you must find an analysis that's identified as deletable.\nEach set of analyses always has one that's identified as deletable.\nHaving found the deletable analysis for one of the two sets,\ndelete this analysis and then continue deleting the next analysis in the set until they're all deleted.\nThen repeat the process for the second set.\nThe procedure therefore consists of a nested loop:\n\n**Outer loop**:\n* List the analyses for the repository, filtered by tool.\n* Parse this list to find a deletable analysis. If found:\n\n **Inner loop**:\n * Delete the identified analysis.\n * Parse the response for the value of `confirm_delete_url` and, if found, use this in the next iteration.\n\nThe above process assumes that you want to remove all trace of the tool's analyses from the GitHub user interface, for the specified repository, and it therefore uses the `confirm_delete_url` value. Alternatively, you could use the `next_analysis_url` value, which would leave the last analysis in each set undeleted to avoid removing a tool's analysis entirely.", + "description": "Deletes a specified code scanning analysis from a repository. For\nprivate repositories, you must use an access token with the `repo` scope. For public repositories,\nyou must use an access token with `public_repo` scope.\nGitHub Apps must have the `security_events` write permission to use this endpoint.\n\nYou can delete one analysis at a time.\nTo delete a series of analyses, start with the most recent analysis and work backwards.\nConceptually, the process is similar to the undo function in a text editor.\n\nWhen you list the analyses for a repository,\none or more will be identified as deletable in the response:\n\n```\n\"deletable\": true\n```\n\nAn analysis is deletable when it's the most recent in a set of analyses.\nTypically, a repository will have multiple sets of analyses\nfor each enabled code scanning tool,\nwhere a set is determined by a unique combination of analysis values:\n\n* `ref`\n* `tool`\n* `category`\n\nIf you attempt to delete an analysis that is not the most recent in a set,\nyou'll get a 400 response with the message:\n\n```\nAnalysis specified is not deletable.\n```\n\nThe response from a successful `DELETE` operation provides you with\ntwo alternative URLs for deleting the next analysis in the set:\n`next_analysis_url` and `confirm_delete_url`.\nUse the `next_analysis_url` URL if you want to avoid accidentally deleting the final analysis\nin a set. This is a useful option if you want to preserve at least one analysis\nfor the specified tool in your repository.\nUse the `confirm_delete_url` URL if you are content to remove all analyses for a tool.\nWhen you delete the last analysis in a set, the value of `next_analysis_url` and `confirm_delete_url`\nin the 200 response is `null`.\n\nAs an example of the deletion process,\nlet's imagine that you added a workflow that configured a particular code scanning tool\nto analyze the code in a repository. This tool has added 15 analyses:\n10 on the default branch, and another 5 on a topic branch.\nYou therefore have two separate sets of analyses for this tool.\nYou've now decided that you want to remove all of the analyses for the tool.\nTo do this you must make 15 separate deletion requests.\nTo start, you must find an analysis that's identified as deletable.\nEach set of analyses always has one that's identified as deletable.\nHaving found the deletable analysis for one of the two sets,\ndelete this analysis and then continue deleting the next analysis in the set until they're all deleted.\nThen repeat the process for the second set.\nThe procedure therefore consists of a nested loop:\n\n**Outer loop**:\n* List the analyses for the repository, filtered by tool.\n* Parse this list to find a deletable analysis. If found:\n\n **Inner loop**:\n * Delete the identified analysis.\n * Parse the response for the value of `confirm_delete_url` and, if found, use this in the next iteration.\n\nThe above process assumes that you want to remove all trace of the tool's analyses from the GitHub user interface, for the specified repository, and it therefore uses the `confirm_delete_url` value. Alternatively, you could use the `next_analysis_url` value, which would leave the last analysis in each set undeleted to avoid removing a tool's analysis entirely.", "operationId": "code-scanning/delete-analysis", "tags": [ "code-scanning" @@ -28208,7 +28309,7 @@ "/repos/{owner}/{repo}/contents/{path}": { "get": { "summary": "Get repository content", - "description": "Gets the contents of a file or directory in a repository. Specify the file path or directory in `:path`. If you omit\n`:path`, you will receive the contents of the repository's root directory. See the description below regarding what the API response includes for directories. \n\nFiles and symlinks support [a custom media type](https://docs.github.com/enterprise-server@3.4/rest/reference/repos#custom-media-types) for\nretrieving the raw content or rendered HTML (when supported). All content types support [a custom media\ntype](https://docs.github.com/enterprise-server@3.4/rest/reference/repos#custom-media-types) to ensure the content is returned in a consistent\nobject format.\n\n**Note**:\n* To get a repository's contents recursively, you can [recursively get the tree](https://docs.github.com/enterprise-server@3.4/rest/reference/git#trees).\n* This API has an upper limit of 1,000 files for a directory. If you need to retrieve more files, use the [Git Trees\nAPI](https://docs.github.com/enterprise-server@3.4/rest/reference/git#get-a-tree).\n* This API supports files up to 1 megabyte in size.\n\n#### If the content is a directory\nThe response will be an array of objects, one object for each item in the directory.\nWhen listing the contents of a directory, submodules have their \"type\" specified as \"file\". Logically, the value\n_should_ be \"submodule\". This behavior exists in API v3 [for backwards compatibility purposes](https://git.io/v1YCW).\nIn the next major version of the API, the type will be returned as \"submodule\".\n\n#### If the content is a symlink \nIf the requested `:path` points to a symlink, and the symlink's target is a normal file in the repository, then the\nAPI responds with the content of the file (in the format shown in the example. Otherwise, the API responds with an object \ndescribing the symlink itself.\n\n#### If the content is a submodule\nThe `submodule_git_url` identifies the location of the submodule repository, and the `sha` identifies a specific\ncommit within the submodule repository. Git uses the given URL when cloning the submodule repository, and checks out\nthe submodule at that specific commit.\n\nIf the submodule repository is not hosted on github.com, the Git URLs (`git_url` and `_links[\"git\"]`) and the\ngithub.com URLs (`html_url` and `_links[\"html\"]`) will have null values.", + "description": "Gets the contents of a file or directory in a repository. Specify the file path or directory in `:path`. If you omit\n`:path`, you will receive the contents of the repository's root directory. See the description below regarding what the API response includes for directories. \n\nFiles and symlinks support [a custom media type](https://docs.github.com/enterprise-server@3.4/rest/reference/repos#custom-media-types) for\nretrieving the raw content or rendered HTML (when supported). All content types support [a custom media\ntype](https://docs.github.com/enterprise-server@3.4/rest/reference/repos#custom-media-types) to ensure the content is returned in a consistent\nobject format.\n\n**Notes**:\n* To get a repository's contents recursively, you can [recursively get the tree](https://docs.github.com/enterprise-server@3.4/rest/reference/git#trees).\n* This API has an upper limit of 1,000 files for a directory. If you need to retrieve more files, use the [Git Trees\nAPI](https://docs.github.com/enterprise-server@3.4/rest/reference/git#get-a-tree).\n * Download URLs expire and are meant to be used just once. To ensure the download URL does not expire, please use the contents API to obtain a fresh download URL for each download. \n* This API supports files up to 1 megabyte in size.\n\n#### If the content is a directory\nThe response will be an array of objects, one object for each item in the directory.\nWhen listing the contents of a directory, submodules have their \"type\" specified as \"file\". Logically, the value\n_should_ be \"submodule\". This behavior exists in API v3 [for backwards compatibility purposes](https://git.io/v1YCW).\nIn the next major version of the API, the type will be returned as \"submodule\".\n\n#### If the content is a symlink \nIf the requested `:path` points to a symlink, and the symlink's target is a normal file in the repository, then the\nAPI responds with the content of the file (in the format shown in the example. Otherwise, the API responds with an object \ndescribing the symlink itself.\n\n#### If the content is a submodule\nThe `submodule_git_url` identifies the location of the submodule repository, and the `sha` identifies a specific\ncommit within the submodule repository. Git uses the given URL when cloning the submodule repository, and checks out\nthe submodule at that specific commit.\n\nIf the submodule repository is not hosted on github.com, the Git URLs (`git_url` and `_links[\"git\"]`) and the\ngithub.com URLs (`html_url` and `_links[\"html\"]`) will have null values.", "tags": [ "repos" ], @@ -32500,6 +32601,14 @@ ] } } + }, + "examples": { + "default": { + "summary": "Example request body", + "value": { + "permissions": "write" + } + } } } } @@ -33599,6 +33708,16 @@ "closed" ] }, + "state_reason": { + "type": [ + "string", + "null" + ], + "description": "The reason for the current state", + "examples": [ + "not_planned" + ] + }, "milestone": { "oneOf": [ { @@ -52125,14 +52244,6 @@ "write" ] }, - "organization_custom_roles": { - "type": "string", - "description": "The level of permission to grant the access token for custom roles management.", - "enum": [ - "read", - "write" - ] - }, "deployments": { "type": "string", "description": "The level of permission to grant the access token for deployments and deployment statuses.", @@ -87363,6 +87474,113 @@ } ] }, + "branch-get": { + "value": { + "name": "main", + "commit": { + "sha": "7fd1a60b01f91b314f59955a4e4d4e80d8edf11d", + "node_id": "MDY6Q29tbWl0MTI5NjI2OTo3ZmQxYTYwYjAxZjkxYjMxNGY1OTk1NWE0ZTRkNGU4MGQ4ZWRmMTFk", + "commit": { + "author": { + "name": "The Octocat", + "email": "octocat@nowhere.com", + "date": "2012-03-06T23:06:50Z" + }, + "committer": { + "name": "The Octocat", + "email": "octocat@nowhere.com", + "date": "2012-03-06T23:06:50Z" + }, + "message": "Merge pull request #6 from Spaceghost/patch-1\n\nNew line at end of file.", + "tree": { + "sha": "b4eecafa9be2f2006ce1b709d6857b07069b4608", + "url": "https://api.github.com/repos/octocat/Hello-World/git/trees/b4eecafa9be2f2006ce1b709d6857b07069b4608" + }, + "url": "https://api.github.com/repos/octocat/Hello-World/git/commits/7fd1a60b01f91b314f59955a4e4d4e80d8edf11d", + "comment_count": 77, + "verification": { + "verified": false, + "reason": "unsigned", + "signature": null, + "payload": null + } + }, + "url": "https://api.github.com/repos/octocat/Hello-World/commits/7fd1a60b01f91b314f59955a4e4d4e80d8edf11d", + "html_url": "https://github.com/octocat/Hello-World/commit/7fd1a60b01f91b314f59955a4e4d4e80d8edf11d", + "comments_url": "https://api.github.com/repos/octocat/Hello-World/commits/7fd1a60b01f91b314f59955a4e4d4e80d8edf11d/comments", + "author": { + "login": "octocat", + "id": 583231, + "node_id": "MDQ6VXNlcjU4MzIzMQ==", + "avatar_url": "https://avatars.githubusercontent.com/u/583231?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/octocat", + "html_url": "https://github.com/octocat", + "followers_url": "https://api.github.com/users/octocat/followers", + "following_url": "https://api.github.com/users/octocat/following{/other_user}", + "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}", + "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/octocat/subscriptions", + "organizations_url": "https://api.github.com/users/octocat/orgs", + "repos_url": "https://api.github.com/users/octocat/repos", + "events_url": "https://api.github.com/users/octocat/events{/privacy}", + "received_events_url": "https://api.github.com/users/octocat/received_events", + "type": "User", + "site_admin": false + }, + "committer": { + "login": "octocat", + "id": 583231, + "node_id": "MDQ6VXNlcjU4MzIzMQ==", + "avatar_url": "https://avatars.githubusercontent.com/u/583231?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/octocat", + "html_url": "https://github.com/octocat", + "followers_url": "https://api.github.com/users/octocat/followers", + "following_url": "https://api.github.com/users/octocat/following{/other_user}", + "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}", + "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/octocat/subscriptions", + "organizations_url": "https://api.github.com/users/octocat/orgs", + "repos_url": "https://api.github.com/users/octocat/repos", + "events_url": "https://api.github.com/users/octocat/events{/privacy}", + "received_events_url": "https://api.github.com/users/octocat/received_events", + "type": "User", + "site_admin": false + }, + "parents": [ + { + "sha": "553c2077f0edc3d5dc5d17262f6aa498e69d6f8e", + "url": "https://api.github.com/repos/octocat/Hello-World/commits/553c2077f0edc3d5dc5d17262f6aa498e69d6f8e", + "html_url": "https://github.com/octocat/Hello-World/commit/553c2077f0edc3d5dc5d17262f6aa498e69d6f8e" + }, + { + "sha": "762941318ee16e59dabbacb1b4049eec22f0d303", + "url": "https://api.github.com/repos/octocat/Hello-World/commits/762941318ee16e59dabbacb1b4049eec22f0d303", + "html_url": "https://github.com/octocat/Hello-World/commit/762941318ee16e59dabbacb1b4049eec22f0d303" + } + ] + }, + "_links": { + "self": "https://api.github.com/repos/octocat/Hello-World/branches/main", + "html": "https://github.com/octocat/Hello-World/tree/main" + }, + "protected": false, + "protection": { + "enabled": false, + "required_status_checks": { + "enforcement_level": "off", + "contexts": [ + + ], + "checks": [ + + ] + } + }, + "protection_url": "https://api.github.com/repos/octocat/Hello-World/branches/main/protection" + } + }, "branch-protection": { "value": { "url": "https://api.github.com/repos/octocat/Hello-World/branches/master/protection", @@ -87559,6 +87777,83 @@ } } }, + "branch-protection-update": { + "value": { + "url": "https://api.github.com/repos/octocat/hello-world/branches/main/protection", + "required_status_checks": { + "url": "https://api.github.com/repos/octocat/hello-world/branches/main/protection/required_status_checks", + "strict": true, + "contexts": [ + "continuous-integration/travis-ci" + ], + "contexts_url": "https://api.github.com/repos/octocat/hello-world/branches/main/protection/required_status_checks/contexts", + "checks": [ + { + "context": "continuous-integration/travis-ci", + "app_id": null + } + ] + }, + "restrictions": { + "url": "https://api.github.com/repos/octocat/hello-world/branches/main/protection/restrictions", + "users_url": "https://api.github.com/repos/octocat/hello-world/branches/main/protection/restrictions/users", + "teams_url": "https://api.github.com/repos/octocat/hello-world/branches/main/protection/restrictions/teams", + "apps_url": "https://api.github.com/repos/octocat/hello-world/branches/main/protection/restrictions/apps", + "users": [ + + ], + "teams": [ + + ], + "apps": [ + + ] + }, + "required_pull_request_reviews": { + "url": "https://api.github.com/repos/octocat/hello-world/branches/main/protection/required_pull_request_reviews", + "dismiss_stale_reviews": true, + "require_code_owner_reviews": true, + "required_approving_review_count": 2, + "dismissal_restrictions": { + "url": "https://api.github.com/repos/octocat/hello-world/branches/main/protection/dismissal_restrictions", + "users_url": "https://api.github.com/repos/octocat/hello-world/branches/main/protection/dismissal_restrictions/users", + "teams_url": "https://api.github.com/repos/octocat/hello-world/branches/main/protection/dismissal_restrictions/teams", + "users": [ + + ], + "teams": [ + + ], + "apps": [ + + ] + } + }, + "required_signatures": { + "url": "https://api.github.com/repos/octocat/hello-world/branches/main/protection/required_signatures", + "enabled": false + }, + "enforce_admins": { + "url": "https://api.github.com/repos/octocat/hello-world/branches/main/protection/enforce_admins", + "enabled": true + }, + "required_linear_history": { + "enabled": true + }, + "allow_force_pushes": { + "enabled": true + }, + "allow_deletions": { + "enabled": true + }, + "block_creations": { + "enabled": true + }, + "required_conversation_resolution": { + "enabled": true + } + } + }, "protected-branch-admin-enforced-2": { "value": { "url": "https://api.github.com/repos/octocat/Hello-World/branches/master/protection/enforce_admins", @@ -89098,6 +89393,7 @@ "ref": "refs/heads/main", "analysis_key": ".github/workflows/codeql-analysis.yml:CodeQL-Build", "environment": "", + "category": ".github/workflows/codeql-analysis.yml:CodeQL-Build", "state": "open", "fixed_at": null, "commit_sha": "39406e42cb832f683daa691dd652a8dc36ee8930", @@ -92362,7 +92658,8 @@ "type": "User", "site_admin": false }, - "author_association": "COLLABORATOR" + "author_association": "COLLABORATOR", + "state_reason": "completed" } ] }, @@ -92522,7 +92819,8 @@ "type": "User", "site_admin": false }, - "author_association": "COLLABORATOR" + "author_association": "COLLABORATOR", + "state_reason": "completed" } }, "issue-comment-items": { @@ -92758,7 +93056,8 @@ "closed_at": null, "created_at": "2011-04-22T13:33:48Z", "updated_at": "2011-04-22T13:33:48Z", - "author_association": "COLLABORATOR" + "author_association": "COLLABORATOR", + "state_reason": "completed" } } ] @@ -92967,7 +93266,8 @@ "closed_at": null, "created_at": "2011-04-22T13:33:48Z", "updated_at": "2011-04-22T13:33:48Z", - "author_association": "COLLABORATOR" + "author_association": "COLLABORATOR", + "state_reason": "completed" } } }, @@ -97193,7 +97493,8 @@ "body": "...", "score": 1, "locked": true, - "author_association": "COLLABORATOR" + "author_association": "COLLABORATOR", + "state_reason": "completed" } ] } diff --git a/descriptions-next/ghes-3.4/ghes-3.4.yaml b/descriptions-next/ghes-3.4/ghes-3.4.yaml index bfecb5aa2d..ed0f8fc3e9 100644 --- a/descriptions-next/ghes-3.4/ghes-3.4.yaml +++ b/descriptions-next/ghes-3.4/ghes-3.4.yaml @@ -6427,6 +6427,9 @@ paths: List the custom repository roles available in this organization. In order to see custom repository roles in an organization, the authenticated user must be an organization owner. + To use this endpoint the authenticated user must be an administrator for the organization or of an repository of the organizaiton and must use an access token with `admin:org repo` scope. + GitHub Apps must have the `organization_custom_roles:read` organization permission to use this endpoint. + For more information on custom repository roles, see "[Managing custom repository roles for an organization](https://docs.github.com/enterprise-server@3.4/organizations/managing-peoples-access-to-your-organization-with-roles/managing-custom-repository-roles-for-an-organization)". tags: - orgs @@ -15679,6 +15682,9 @@ paths: application/json: schema: "$ref": "#/components/schemas/branch-with-protection" + examples: + default: + "$ref": "#/components/examples/branch-get" '301': "$ref": "#/components/responses/moved_permanently" '404': @@ -15977,6 +15983,9 @@ paths: application/json: schema: "$ref": "#/components/schemas/protected-branch" + examples: + default: + "$ref": "#/components/examples/branch-protection-update" '403': "$ref": "#/components/responses/forbidden" '422': @@ -16586,7 +16595,7 @@ paths: properties: contexts: type: array - description: contexts parameter + description: The name of the status checks items: type: string required: @@ -16595,9 +16604,16 @@ paths: contexts: - contexts - type: array - description: contexts parameter + description: The name of the status checks items: type: string + examples: + default: + summary: Example adding status checks to a branch protection rule + value: + contexts: + - continuous-integration/travis-ci + - continuous-integration/jenkins responses: '200': description: Response @@ -16651,7 +16667,7 @@ paths: properties: contexts: type: array - description: contexts parameter + description: The name of the status checks items: type: string required: @@ -16660,9 +16676,15 @@ paths: contexts: - contexts - type: array - description: contexts parameter + description: The name of the status checks items: type: string + examples: + default: + summary: Example updating status checks for a branch protection rule + value: + contexts: + - continuous-integration/travis-ci responses: '200': description: Response @@ -16712,7 +16734,7 @@ paths: properties: contexts: type: array - description: contexts parameter + description: The name of the status checks items: type: string required: @@ -16721,9 +16743,15 @@ paths: contexts: - contexts - type: array - description: contexts parameter + description: The name of the status checks items: type: string + examples: + default: + summary: Example removing status checks from a branch protection rule + value: + contexts: + - continuous-integration/travis-ci responses: '200': description: Response @@ -17091,7 +17119,7 @@ paths: properties: teams: type: array - description: teams parameter + description: The slug values for teams items: type: string required: @@ -17100,9 +17128,15 @@ paths: teams: - my-team - type: array - description: teams parameter + description: The slug values for teams items: type: string + examples: + default: + summary: Example adding a team in a branch protection rule + value: + teams: + - justice-league responses: '200': description: Response @@ -17153,18 +17187,24 @@ paths: properties: teams: type: array - description: teams parameter + description: The slug values for teams items: type: string required: - teams example: teams: - - my-team + - justice-league - type: array - description: teams parameter + description: The slug values for teams items: type: string + examples: + default: + summary: Example replacing a team in a branch protection rule + value: + teams: + - justice-league responses: '200': description: Response @@ -17214,7 +17254,7 @@ paths: properties: teams: type: array - description: teams parameter + description: The slug values for teams items: type: string required: @@ -17223,9 +17263,15 @@ paths: teams: - my-team - type: array - description: teams parameter + description: The slug values for teams items: type: string + examples: + default: + summary: Example removing a team in a branch protection rule + value: + teams: + - justice-league responses: '200': description: Response @@ -17312,7 +17358,7 @@ paths: properties: users: type: array - description: users parameter + description: The username for users items: type: string required: @@ -17323,6 +17369,12 @@ paths: - type: array items: type: string + examples: + default: + summary: Example adding a user in a branch protection rule + value: + users: + - octocat responses: '200': description: Response @@ -17373,7 +17425,7 @@ paths: properties: users: type: array - description: users parameter + description: The username for users items: type: string required: @@ -17384,6 +17436,12 @@ paths: - type: array items: type: string + examples: + default: + summary: Example replacing a user in a branch protection rule + value: + users: + - octocat responses: '200': description: Response @@ -17433,7 +17491,7 @@ paths: properties: users: type: array - description: users parameter + description: The username for users items: type: string required: @@ -17444,6 +17502,12 @@ paths: - type: array items: type: string + examples: + default: + summary: Example removing a user in a branch protection rule + value: + users: + - octocat responses: '200': description: Response @@ -18837,8 +18901,7 @@ paths: * `ref` * `tool` - * `analysis_key` - * `environment` + * `category` If you attempt to delete an analysis that is not the most recent in a set, you'll get a 400 response with the message: @@ -20245,29 +20308,31 @@ paths: support [a custom media type](https://docs.github.com/enterprise-server@3.4/rest/reference/repos#custom-media-types) for\nretrieving the raw content or rendered HTML (when supported). All content types support [a custom media\ntype](https://docs.github.com/enterprise-server@3.4/rest/reference/repos#custom-media-types) - to ensure the content is returned in a consistent\nobject format.\n\n**Note**:\n* + to ensure the content is returned in a consistent\nobject format.\n\n**Notes**:\n* \ To get a repository's contents recursively, you can [recursively get the tree](https://docs.github.com/enterprise-server@3.4/rest/reference/git#trees).\n* \ This API has an upper limit of 1,000 files for a directory. If you need - to retrieve more files, use the [Git Trees\nAPI](https://docs.github.com/enterprise-server@3.4/rest/reference/git#get-a-tree).\n* - \ This API supports files up to 1 megabyte in size.\n\n#### If the content - is a directory\nThe response will be an array of objects, one object for each - item in the directory.\nWhen listing the contents of a directory, submodules - have their \"type\" specified as \"file\". Logically, the value\n_should_ - be \"submodule\". This behavior exists in API v3 [for backwards compatibility - purposes](https://git.io/v1YCW).\nIn the next major version of the API, the - type will be returned as \"submodule\".\n\n#### If the content is a symlink - \nIf the requested `:path` points to a symlink, and the symlink's target is - a normal file in the repository, then the\nAPI responds with the content of - the file (in the format shown in the example. Otherwise, the API responds - with an object \ndescribing the symlink itself.\n\n#### If the content is - a submodule\nThe `submodule_git_url` identifies the location of the submodule - repository, and the `sha` identifies a specific\ncommit within the submodule - repository. Git uses the given URL when cloning the submodule repository, - and checks out\nthe submodule at that specific commit.\n\nIf the submodule - repository is not hosted on github.com, the Git URLs (`git_url` and `_links[\"git\"]`) - and the\ngithub.com URLs (`html_url` and `_links[\"html\"]`) will have null - values." + to retrieve more files, use the [Git Trees\nAPI](https://docs.github.com/enterprise-server@3.4/rest/reference/git#get-a-tree).\n + * Download URLs expire and are meant to be used just once. To ensure the + download URL does not expire, please use the contents API to obtain a fresh + download URL for each download. \n* This API supports files up to 1 megabyte + in size.\n\n#### If the content is a directory\nThe response will be an array + of objects, one object for each item in the directory.\nWhen listing the contents + of a directory, submodules have their \"type\" specified as \"file\". Logically, + the value\n_should_ be \"submodule\". This behavior exists in API v3 [for + backwards compatibility purposes](https://git.io/v1YCW).\nIn the next major + version of the API, the type will be returned as \"submodule\".\n\n#### If + the content is a symlink \nIf the requested `:path` points to a symlink, and + the symlink's target is a normal file in the repository, then the\nAPI responds + with the content of the file (in the format shown in the example. Otherwise, + the API responds with an object \ndescribing the symlink itself.\n\n#### If + the content is a submodule\nThe `submodule_git_url` identifies the location + of the submodule repository, and the `sha` identifies a specific\ncommit within + the submodule repository. Git uses the given URL when cloning the submodule + repository, and checks out\nthe submodule at that specific commit.\n\nIf the + submodule repository is not hosted on github.com, the Git URLs (`git_url` + and `_links[\"git\"]`) and the\ngithub.com URLs (`html_url` and `_links[\"html\"]`) + will have null values." tags: - repos operationId: repos/get-content @@ -23483,6 +23548,11 @@ paths: - maintain - triage - admin + examples: + default: + summary: Example request body + value: + permissions: write responses: '200': description: Response @@ -24207,6 +24277,13 @@ paths: enum: - open - closed + state_reason: + type: + - string + - 'null' + description: The reason for the current state + examples: + - not_planned milestone: oneOf: - type: string @@ -37157,13 +37234,6 @@ components: enum: - read - write - organization_custom_roles: - type: string - description: The level of permission to grant the access token for custom - roles management. - enum: - - read - - write deployments: type: string description: The level of permission to grant the access token for deployments @@ -64232,6 +64302,94 @@ components: - ci-test - linter protection_url: https://api.github.com/repos/octocat/hello-world/branches/master/protection + branch-get: + value: + name: main + commit: + sha: 7fd1a60b01f91b314f59955a4e4d4e80d8edf11d + node_id: MDY6Q29tbWl0MTI5NjI2OTo3ZmQxYTYwYjAxZjkxYjMxNGY1OTk1NWE0ZTRkNGU4MGQ4ZWRmMTFk + commit: + author: + name: The Octocat + email: octocat@nowhere.com + date: '2012-03-06T23:06:50Z' + committer: + name: The Octocat + email: octocat@nowhere.com + date: '2012-03-06T23:06:50Z' + message: |- + Merge pull request #6 from Spaceghost/patch-1 + + New line at end of file. + tree: + sha: b4eecafa9be2f2006ce1b709d6857b07069b4608 + url: https://api.github.com/repos/octocat/Hello-World/git/trees/b4eecafa9be2f2006ce1b709d6857b07069b4608 + url: https://api.github.com/repos/octocat/Hello-World/git/commits/7fd1a60b01f91b314f59955a4e4d4e80d8edf11d + comment_count: 77 + verification: + verified: false + reason: unsigned + signature: + payload: + url: https://api.github.com/repos/octocat/Hello-World/commits/7fd1a60b01f91b314f59955a4e4d4e80d8edf11d + html_url: https://github.com/octocat/Hello-World/commit/7fd1a60b01f91b314f59955a4e4d4e80d8edf11d + comments_url: https://api.github.com/repos/octocat/Hello-World/commits/7fd1a60b01f91b314f59955a4e4d4e80d8edf11d/comments + author: + login: octocat + id: 583231 + node_id: MDQ6VXNlcjU4MzIzMQ== + avatar_url: https://avatars.githubusercontent.com/u/583231?v=4 + gravatar_id: '' + url: https://api.github.com/users/octocat + html_url: https://github.com/octocat + followers_url: https://api.github.com/users/octocat/followers + following_url: https://api.github.com/users/octocat/following{/other_user} + gists_url: https://api.github.com/users/octocat/gists{/gist_id} + starred_url: https://api.github.com/users/octocat/starred{/owner}{/repo} + subscriptions_url: https://api.github.com/users/octocat/subscriptions + organizations_url: https://api.github.com/users/octocat/orgs + repos_url: https://api.github.com/users/octocat/repos + events_url: https://api.github.com/users/octocat/events{/privacy} + received_events_url: https://api.github.com/users/octocat/received_events + type: User + site_admin: false + committer: + login: octocat + id: 583231 + node_id: MDQ6VXNlcjU4MzIzMQ== + avatar_url: https://avatars.githubusercontent.com/u/583231?v=4 + gravatar_id: '' + url: https://api.github.com/users/octocat + html_url: https://github.com/octocat + followers_url: https://api.github.com/users/octocat/followers + following_url: https://api.github.com/users/octocat/following{/other_user} + gists_url: https://api.github.com/users/octocat/gists{/gist_id} + starred_url: https://api.github.com/users/octocat/starred{/owner}{/repo} + subscriptions_url: https://api.github.com/users/octocat/subscriptions + organizations_url: https://api.github.com/users/octocat/orgs + repos_url: https://api.github.com/users/octocat/repos + events_url: https://api.github.com/users/octocat/events{/privacy} + received_events_url: https://api.github.com/users/octocat/received_events + type: User + site_admin: false + parents: + - sha: 553c2077f0edc3d5dc5d17262f6aa498e69d6f8e + url: https://api.github.com/repos/octocat/Hello-World/commits/553c2077f0edc3d5dc5d17262f6aa498e69d6f8e + html_url: https://github.com/octocat/Hello-World/commit/553c2077f0edc3d5dc5d17262f6aa498e69d6f8e + - sha: 762941318ee16e59dabbacb1b4049eec22f0d303 + url: https://api.github.com/repos/octocat/Hello-World/commits/762941318ee16e59dabbacb1b4049eec22f0d303 + html_url: https://github.com/octocat/Hello-World/commit/762941318ee16e59dabbacb1b4049eec22f0d303 + _links: + self: https://api.github.com/repos/octocat/Hello-World/branches/main + html: https://github.com/octocat/Hello-World/tree/main + protected: false + protection: + enabled: false + required_status_checks: + enforcement_level: 'off' + contexts: [] + checks: [] + protection_url: https://api.github.com/repos/octocat/Hello-World/branches/main/protection branch-protection: value: url: https://api.github.com/repos/octocat/Hello-World/branches/master/protection @@ -64392,6 +64550,54 @@ components: enabled: true required_conversation_resolution: enabled: true + branch-protection-update: + value: + url: https://api.github.com/repos/octocat/hello-world/branches/main/protection + required_status_checks: + url: https://api.github.com/repos/octocat/hello-world/branches/main/protection/required_status_checks + strict: true + contexts: + - continuous-integration/travis-ci + contexts_url: https://api.github.com/repos/octocat/hello-world/branches/main/protection/required_status_checks/contexts + checks: + - context: continuous-integration/travis-ci + app_id: + restrictions: + url: https://api.github.com/repos/octocat/hello-world/branches/main/protection/restrictions + users_url: https://api.github.com/repos/octocat/hello-world/branches/main/protection/restrictions/users + teams_url: https://api.github.com/repos/octocat/hello-world/branches/main/protection/restrictions/teams + apps_url: https://api.github.com/repos/octocat/hello-world/branches/main/protection/restrictions/apps + users: [] + teams: [] + apps: [] + required_pull_request_reviews: + url: https://api.github.com/repos/octocat/hello-world/branches/main/protection/required_pull_request_reviews + dismiss_stale_reviews: true + require_code_owner_reviews: true + required_approving_review_count: 2 + dismissal_restrictions: + url: https://api.github.com/repos/octocat/hello-world/branches/main/protection/dismissal_restrictions + users_url: https://api.github.com/repos/octocat/hello-world/branches/main/protection/dismissal_restrictions/users + teams_url: https://api.github.com/repos/octocat/hello-world/branches/main/protection/dismissal_restrictions/teams + users: [] + teams: [] + apps: [] + required_signatures: + url: https://api.github.com/repos/octocat/hello-world/branches/main/protection/required_signatures + enabled: false + enforce_admins: + url: https://api.github.com/repos/octocat/hello-world/branches/main/protection/enforce_admins + enabled: true + required_linear_history: + enabled: true + allow_force_pushes: + enabled: true + allow_deletions: + enabled: true + block_creations: + enabled: true + required_conversation_resolution: + enabled: true protected-branch-admin-enforced-2: value: url: https://api.github.com/repos/octocat/Hello-World/branches/master/protection/enforce_admins @@ -65742,6 +65948,7 @@ components: - ref: refs/heads/main analysis_key: ".github/workflows/codeql-analysis.yml:CodeQL-Build" environment: '' + category: ".github/workflows/codeql-analysis.yml:CodeQL-Build" state: open fixed_at: commit_sha: 39406e42cb832f683daa691dd652a8dc36ee8930 @@ -68535,6 +68742,7 @@ components: type: User site_admin: false author_association: COLLABORATOR + state_reason: completed issue: value: id: 1 @@ -68680,6 +68888,7 @@ components: type: User site_admin: false author_association: COLLABORATOR + state_reason: completed issue-comment-items: value: - id: 1 @@ -68893,6 +69102,7 @@ components: created_at: '2011-04-22T13:33:48Z' updated_at: '2011-04-22T13:33:48Z' author_association: COLLABORATOR + state_reason: completed issue-event: value: id: 1 @@ -69082,6 +69292,7 @@ components: created_at: '2011-04-22T13:33:48Z' updated_at: '2011-04-22T13:33:48Z' author_association: COLLABORATOR + state_reason: completed issue-event-for-issue-items: value: - id: 1 @@ -72863,6 +73074,7 @@ components: score: 1 locked: true author_association: COLLABORATOR + state_reason: completed label-search-result-item-paginated: value: total_count: 2 diff --git a/descriptions-next/ghes-3.5/dereferenced/ghes-3.5.deref.json b/descriptions-next/ghes-3.5/dereferenced/ghes-3.5.deref.json index 3a950f885e..e1f9fa5b10 100644 --- a/descriptions-next/ghes-3.5/dereferenced/ghes-3.5.deref.json +++ b/descriptions-next/ghes-3.5/dereferenced/ghes-3.5.deref.json @@ -4292,14 +4292,6 @@ "write" ] }, - "organization_custom_roles": { - "type": "string", - "description": "The level of permission to grant the access token for custom roles management.", - "enum": [ - "read", - "write" - ] - }, "deployments": { "type": "string", "description": "The level of permission to grant the access token for deployments and deployment statuses.", @@ -5537,14 +5529,6 @@ "write" ] }, - "organization_custom_roles": { - "type": "string", - "description": "The level of permission to grant the access token for custom roles management.", - "enum": [ - "read", - "write" - ] - }, "deployments": { "type": "string", "description": "The level of permission to grant the access token for deployments and deployment statuses.", @@ -6327,14 +6311,6 @@ "write" ] }, - "organization_custom_roles": { - "type": "string", - "description": "The level of permission to grant the access token for custom roles management.", - "enum": [ - "read", - "write" - ] - }, "deployments": { "type": "string", "description": "The level of permission to grant the access token for deployments and deployment statuses.", @@ -9323,14 +9299,6 @@ "write" ] }, - "organization_custom_roles": { - "type": "string", - "description": "The level of permission to grant the access token for custom roles management.", - "enum": [ - "read", - "write" - ] - }, "deployments": { "type": "string", "description": "The level of permission to grant the access token for deployments and deployment statuses.", @@ -10260,14 +10228,6 @@ "write" ] }, - "organization_custom_roles": { - "type": "string", - "description": "The level of permission to grant the access token for custom roles management.", - "enum": [ - "read", - "write" - ] - }, "deployments": { "type": "string", "description": "The level of permission to grant the access token for deployments and deployment statuses.", @@ -10983,14 +10943,6 @@ "write" ] }, - "organization_custom_roles": { - "type": "string", - "description": "The level of permission to grant the access token for custom roles management.", - "enum": [ - "read", - "write" - ] - }, "deployments": { "type": "string", "description": "The level of permission to grant the access token for deployments and deployment statuses.", @@ -11276,14 +11228,6 @@ "write" ] }, - "organization_custom_roles": { - "type": "string", - "description": "The level of permission to grant the access token for custom roles management.", - "enum": [ - "read", - "write" - ] - }, "deployments": { "type": "string", "description": "The level of permission to grant the access token for deployments and deployment statuses.", @@ -14705,14 +14649,6 @@ "write" ] }, - "organization_custom_roles": { - "type": "string", - "description": "The level of permission to grant the access token for custom roles management.", - "enum": [ - "read", - "write" - ] - }, "deployments": { "type": "string", "description": "The level of permission to grant the access token for deployments and deployment statuses.", @@ -15679,14 +15615,6 @@ "write" ] }, - "organization_custom_roles": { - "type": "string", - "description": "The level of permission to grant the access token for custom roles management.", - "enum": [ - "read", - "write" - ] - }, "deployments": { "type": "string", "description": "The level of permission to grant the access token for deployments and deployment statuses.", @@ -16525,14 +16453,6 @@ "write" ] }, - "organization_custom_roles": { - "type": "string", - "description": "The level of permission to grant the access token for custom roles management.", - "enum": [ - "read", - "write" - ] - }, "deployments": { "type": "string", "description": "The level of permission to grant the access token for deployments and deployment statuses.", @@ -17073,14 +16993,6 @@ "write" ] }, - "organization_custom_roles": { - "type": "string", - "description": "The level of permission to grant the access token for custom roles management.", - "enum": [ - "read", - "write" - ] - }, "deployments": { "type": "string", "description": "The level of permission to grant the access token for deployments and deployment statuses.", @@ -18584,14 +18496,6 @@ "write" ] }, - "organization_custom_roles": { - "type": "string", - "description": "The level of permission to grant the access token for custom roles management.", - "enum": [ - "read", - "write" - ] - }, "deployments": { "type": "string", "description": "The level of permission to grant the access token for deployments and deployment statuses.", @@ -19568,14 +19472,6 @@ "write" ] }, - "organization_custom_roles": { - "type": "string", - "description": "The level of permission to grant the access token for custom roles management.", - "enum": [ - "read", - "write" - ] - }, "deployments": { "type": "string", "description": "The level of permission to grant the access token for deployments and deployment statuses.", @@ -20625,14 +20521,6 @@ "write" ] }, - "organization_custom_roles": { - "type": "string", - "description": "The level of permission to grant the access token for custom roles management.", - "enum": [ - "read", - "write" - ] - }, "deployments": { "type": "string", "description": "The level of permission to grant the access token for deployments and deployment statuses.", @@ -21423,14 +21311,6 @@ "write" ] }, - "organization_custom_roles": { - "type": "string", - "description": "The level of permission to grant the access token for custom roles management.", - "enum": [ - "read", - "write" - ] - }, "deployments": { "type": "string", "description": "The level of permission to grant the access token for deployments and deployment statuses.", @@ -22458,14 +22338,6 @@ "write" ] }, - "organization_custom_roles": { - "type": "string", - "description": "The level of permission to grant the access token for custom roles management.", - "enum": [ - "read", - "write" - ] - }, "deployments": { "type": "string", "description": "The level of permission to grant the access token for deployments and deployment statuses.", @@ -23256,14 +23128,6 @@ "write" ] }, - "organization_custom_roles": { - "type": "string", - "description": "The level of permission to grant the access token for custom roles management.", - "enum": [ - "read", - "write" - ] - }, "deployments": { "type": "string", "description": "The level of permission to grant the access token for deployments and deployment statuses.", @@ -24165,14 +24029,6 @@ "write" ] }, - "organization_custom_roles": { - "type": "string", - "description": "The level of permission to grant the access token for custom roles management.", - "enum": [ - "read", - "write" - ] - }, "deployments": { "type": "string", "description": "The level of permission to grant the access token for deployments and deployment statuses.", @@ -25099,14 +24955,6 @@ "write" ] }, - "organization_custom_roles": { - "type": "string", - "description": "The level of permission to grant the access token for custom roles management.", - "enum": [ - "read", - "write" - ] - }, "deployments": { "type": "string", "description": "The level of permission to grant the access token for deployments and deployment statuses.", @@ -69371,7 +69219,7 @@ "/organizations/{organization_id}/custom_roles": { "get": { "summary": "List custom repository roles in an organization", - "description": "List the custom repository roles available in this organization. In order to see custom\nrepository roles in an organization, the authenticated user must be an organization owner.\n\nFor more information on custom repository roles, see \"[Managing custom repository roles for an organization](https://docs.github.com/enterprise-server@3.5/organizations/managing-peoples-access-to-your-organization-with-roles/managing-custom-repository-roles-for-an-organization)\".", + "description": "List the custom repository roles available in this organization. In order to see custom\nrepository roles in an organization, the authenticated user must be an organization owner.\n\nTo use this endpoint the authenticated user must be an administrator for the organization or of an repository of the organizaiton and must use an access token with `admin:org repo` scope.\nGitHub Apps must have the `organization_custom_roles:read` organization permission to use this endpoint.\n\nFor more information on custom repository roles, see \"[Managing custom repository roles for an organization](https://docs.github.com/enterprise-server@3.5/organizations/managing-peoples-access-to-your-organization-with-roles/managing-custom-repository-roles-for-an-organization)\".", "tags": [ "orgs" ], @@ -95886,14 +95734,6 @@ "write" ] }, - "organization_custom_roles": { - "type": "string", - "description": "The level of permission to grant the access token for custom roles management.", - "enum": [ - "read", - "write" - ] - }, "deployments": { "type": "string", "description": "The level of permission to grant the access token for deployments and deployment statuses.", @@ -96837,14 +96677,6 @@ "write" ] }, - "organization_custom_roles": { - "type": "string", - "description": "The level of permission to grant the access token for custom roles management.", - "enum": [ - "read", - "write" - ] - }, "deployments": { "type": "string", "description": "The level of permission to grant the access token for deployments and deployment statuses.", @@ -187709,6 +187541,115 @@ "protected", "protection_url" ] + }, + "examples": { + "default": { + "value": { + "name": "main", + "commit": { + "sha": "7fd1a60b01f91b314f59955a4e4d4e80d8edf11d", + "node_id": "MDY6Q29tbWl0MTI5NjI2OTo3ZmQxYTYwYjAxZjkxYjMxNGY1OTk1NWE0ZTRkNGU4MGQ4ZWRmMTFk", + "commit": { + "author": { + "name": "The Octocat", + "email": "octocat@nowhere.com", + "date": "2012-03-06T23:06:50Z" + }, + "committer": { + "name": "The Octocat", + "email": "octocat@nowhere.com", + "date": "2012-03-06T23:06:50Z" + }, + "message": "Merge pull request #6 from Spaceghost/patch-1\n\nNew line at end of file.", + "tree": { + "sha": "b4eecafa9be2f2006ce1b709d6857b07069b4608", + "url": "https://api.github.com/repos/octocat/Hello-World/git/trees/b4eecafa9be2f2006ce1b709d6857b07069b4608" + }, + "url": "https://api.github.com/repos/octocat/Hello-World/git/commits/7fd1a60b01f91b314f59955a4e4d4e80d8edf11d", + "comment_count": 77, + "verification": { + "verified": false, + "reason": "unsigned", + "signature": null, + "payload": null + } + }, + "url": "https://api.github.com/repos/octocat/Hello-World/commits/7fd1a60b01f91b314f59955a4e4d4e80d8edf11d", + "html_url": "https://github.com/octocat/Hello-World/commit/7fd1a60b01f91b314f59955a4e4d4e80d8edf11d", + "comments_url": "https://api.github.com/repos/octocat/Hello-World/commits/7fd1a60b01f91b314f59955a4e4d4e80d8edf11d/comments", + "author": { + "login": "octocat", + "id": 583231, + "node_id": "MDQ6VXNlcjU4MzIzMQ==", + "avatar_url": "https://avatars.githubusercontent.com/u/583231?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/octocat", + "html_url": "https://github.com/octocat", + "followers_url": "https://api.github.com/users/octocat/followers", + "following_url": "https://api.github.com/users/octocat/following{/other_user}", + "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}", + "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/octocat/subscriptions", + "organizations_url": "https://api.github.com/users/octocat/orgs", + "repos_url": "https://api.github.com/users/octocat/repos", + "events_url": "https://api.github.com/users/octocat/events{/privacy}", + "received_events_url": "https://api.github.com/users/octocat/received_events", + "type": "User", + "site_admin": false + }, + "committer": { + "login": "octocat", + "id": 583231, + "node_id": "MDQ6VXNlcjU4MzIzMQ==", + "avatar_url": "https://avatars.githubusercontent.com/u/583231?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/octocat", + "html_url": "https://github.com/octocat", + "followers_url": "https://api.github.com/users/octocat/followers", + "following_url": "https://api.github.com/users/octocat/following{/other_user}", + "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}", + "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/octocat/subscriptions", + "organizations_url": "https://api.github.com/users/octocat/orgs", + "repos_url": "https://api.github.com/users/octocat/repos", + "events_url": "https://api.github.com/users/octocat/events{/privacy}", + "received_events_url": "https://api.github.com/users/octocat/received_events", + "type": "User", + "site_admin": false + }, + "parents": [ + { + "sha": "553c2077f0edc3d5dc5d17262f6aa498e69d6f8e", + "url": "https://api.github.com/repos/octocat/Hello-World/commits/553c2077f0edc3d5dc5d17262f6aa498e69d6f8e", + "html_url": "https://github.com/octocat/Hello-World/commit/553c2077f0edc3d5dc5d17262f6aa498e69d6f8e" + }, + { + "sha": "762941318ee16e59dabbacb1b4049eec22f0d303", + "url": "https://api.github.com/repos/octocat/Hello-World/commits/762941318ee16e59dabbacb1b4049eec22f0d303", + "html_url": "https://github.com/octocat/Hello-World/commit/762941318ee16e59dabbacb1b4049eec22f0d303" + } + ] + }, + "_links": { + "self": "https://api.github.com/repos/octocat/Hello-World/branches/main", + "html": "https://github.com/octocat/Hello-World/tree/main" + }, + "protected": false, + "protection": { + "enabled": false, + "required_status_checks": { + "enforcement_level": "off", + "contexts": [ + + ], + "checks": [ + + ] + } + }, + "protection_url": "https://api.github.com/repos/octocat/Hello-World/branches/main/protection" + } + } } } } @@ -192216,6 +192157,85 @@ "required": [ "url" ] + }, + "examples": { + "default": { + "value": { + "url": "https://api.github.com/repos/octocat/hello-world/branches/main/protection", + "required_status_checks": { + "url": "https://api.github.com/repos/octocat/hello-world/branches/main/protection/required_status_checks", + "strict": true, + "contexts": [ + "continuous-integration/travis-ci" + ], + "contexts_url": "https://api.github.com/repos/octocat/hello-world/branches/main/protection/required_status_checks/contexts", + "checks": [ + { + "context": "continuous-integration/travis-ci", + "app_id": null + } + ] + }, + "restrictions": { + "url": "https://api.github.com/repos/octocat/hello-world/branches/main/protection/restrictions", + "users_url": "https://api.github.com/repos/octocat/hello-world/branches/main/protection/restrictions/users", + "teams_url": "https://api.github.com/repos/octocat/hello-world/branches/main/protection/restrictions/teams", + "apps_url": "https://api.github.com/repos/octocat/hello-world/branches/main/protection/restrictions/apps", + "users": [ + + ], + "teams": [ + + ], + "apps": [ + + ] + }, + "required_pull_request_reviews": { + "url": "https://api.github.com/repos/octocat/hello-world/branches/main/protection/required_pull_request_reviews", + "dismiss_stale_reviews": true, + "require_code_owner_reviews": true, + "required_approving_review_count": 2, + "dismissal_restrictions": { + "url": "https://api.github.com/repos/octocat/hello-world/branches/main/protection/dismissal_restrictions", + "users_url": "https://api.github.com/repos/octocat/hello-world/branches/main/protection/dismissal_restrictions/users", + "teams_url": "https://api.github.com/repos/octocat/hello-world/branches/main/protection/dismissal_restrictions/teams", + "users": [ + + ], + "teams": [ + + ], + "apps": [ + + ] + } + }, + "required_signatures": { + "url": "https://api.github.com/repos/octocat/hello-world/branches/main/protection/required_signatures", + "enabled": false + }, + "enforce_admins": { + "url": "https://api.github.com/repos/octocat/hello-world/branches/main/protection/enforce_admins", + "enabled": true + }, + "required_linear_history": { + "enabled": true + }, + "allow_force_pushes": { + "enabled": true + }, + "allow_deletions": { + "enabled": true + }, + "block_creations": { + "enabled": true + }, + "required_conversation_resolution": { + "enabled": true + } + } + } } } } @@ -197102,7 +197122,7 @@ "properties": { "contexts": { "type": "array", - "description": "contexts parameter", + "description": "The name of the status checks", "items": { "type": "string" } @@ -197119,12 +197139,23 @@ }, { "type": "array", - "description": "contexts parameter", + "description": "The name of the status checks", "items": { "type": "string" } } ] + }, + "examples": { + "default": { + "summary": "Example adding status checks to a branch protection rule", + "value": { + "contexts": [ + "continuous-integration/travis-ci", + "continuous-integration/jenkins" + ] + } + } } } } @@ -197339,7 +197370,7 @@ "properties": { "contexts": { "type": "array", - "description": "contexts parameter", + "description": "The name of the status checks", "items": { "type": "string" } @@ -197356,12 +197387,22 @@ }, { "type": "array", - "description": "contexts parameter", + "description": "The name of the status checks", "items": { "type": "string" } } ] + }, + "examples": { + "default": { + "summary": "Example updating status checks for a branch protection rule", + "value": { + "contexts": [ + "continuous-integration/travis-ci" + ] + } + } } } } @@ -197548,7 +197589,7 @@ "properties": { "contexts": { "type": "array", - "description": "contexts parameter", + "description": "The name of the status checks", "items": { "type": "string" } @@ -197565,12 +197606,22 @@ }, { "type": "array", - "description": "contexts parameter", + "description": "The name of the status checks", "items": { "type": "string" } } ] + }, + "examples": { + "default": { + "summary": "Example removing status checks from a branch protection rule", + "value": { + "contexts": [ + "continuous-integration/travis-ci" + ] + } + } } } } @@ -200692,7 +200743,7 @@ "properties": { "teams": { "type": "array", - "description": "teams parameter", + "description": "The slug values for teams", "items": { "type": "string" } @@ -200709,12 +200760,22 @@ }, { "type": "array", - "description": "teams parameter", + "description": "The slug values for teams", "items": { "type": "string" } } ] + }, + "examples": { + "default": { + "summary": "Example adding a team in a branch protection rule", + "value": { + "teams": [ + "justice-league" + ] + } + } } } } @@ -201086,7 +201147,7 @@ "properties": { "teams": { "type": "array", - "description": "teams parameter", + "description": "The slug values for teams", "items": { "type": "string" } @@ -201097,18 +201158,28 @@ ], "example": { "teams": [ - "my-team" + "justice-league" ] } }, { "type": "array", - "description": "teams parameter", + "description": "The slug values for teams", "items": { "type": "string" } } ] + }, + "examples": { + "default": { + "summary": "Example replacing a team in a branch protection rule", + "value": { + "teams": [ + "justice-league" + ] + } + } } } } @@ -201479,7 +201550,7 @@ "properties": { "teams": { "type": "array", - "description": "teams parameter", + "description": "The slug values for teams", "items": { "type": "string" } @@ -201496,12 +201567,22 @@ }, { "type": "array", - "description": "teams parameter", + "description": "The slug values for teams", "items": { "type": "string" } } ] + }, + "examples": { + "default": { + "summary": "Example removing a team in a branch protection rule", + "value": { + "teams": [ + "justice-league" + ] + } + } } } } @@ -202148,7 +202229,7 @@ "properties": { "users": { "type": "array", - "description": "users parameter", + "description": "The username for users", "items": { "type": "string" } @@ -202170,6 +202251,16 @@ } } ] + }, + "examples": { + "default": { + "summary": "Example adding a user in a branch protection rule", + "value": { + "users": [ + "octocat" + ] + } + } } } } @@ -202508,7 +202599,7 @@ "properties": { "users": { "type": "array", - "description": "users parameter", + "description": "The username for users", "items": { "type": "string" } @@ -202530,6 +202621,16 @@ } } ] + }, + "examples": { + "default": { + "summary": "Example replacing a user in a branch protection rule", + "value": { + "users": [ + "octocat" + ] + } + } } } } @@ -202867,7 +202968,7 @@ "properties": { "users": { "type": "array", - "description": "users parameter", + "description": "The username for users", "items": { "type": "string" } @@ -202889,6 +202990,16 @@ } } ] + }, + "examples": { + "default": { + "summary": "Example removing a user in a branch protection rule", + "value": { + "users": [ + "octocat" + ] + } + } } } } @@ -226180,6 +226291,7 @@ "ref": "refs/heads/main", "analysis_key": ".github/workflows/codeql-analysis.yml:CodeQL-Build", "environment": "", + "category": ".github/workflows/codeql-analysis.yml:CodeQL-Build", "state": "open", "fixed_at": null, "commit_sha": "39406e42cb832f683daa691dd652a8dc36ee8930", @@ -226987,7 +227099,7 @@ }, "delete": { "summary": "Delete a code scanning analysis from a repository", - "description": "Deletes a specified code scanning analysis from a repository. For\nprivate repositories, you must use an access token with the `repo` scope. For public repositories,\nyou must use an access token with `public_repo` scope.\nGitHub Apps must have the `security_events` write permission to use this endpoint.\n\nYou can delete one analysis at a time.\nTo delete a series of analyses, start with the most recent analysis and work backwards.\nConceptually, the process is similar to the undo function in a text editor.\n\nWhen you list the analyses for a repository,\none or more will be identified as deletable in the response:\n\n```\n\"deletable\": true\n```\n\nAn analysis is deletable when it's the most recent in a set of analyses.\nTypically, a repository will have multiple sets of analyses\nfor each enabled code scanning tool,\nwhere a set is determined by a unique combination of analysis values:\n\n* `ref`\n* `tool`\n* `analysis_key`\n* `environment`\n\nIf you attempt to delete an analysis that is not the most recent in a set,\nyou'll get a 400 response with the message:\n\n```\nAnalysis specified is not deletable.\n```\n\nThe response from a successful `DELETE` operation provides you with\ntwo alternative URLs for deleting the next analysis in the set:\n`next_analysis_url` and `confirm_delete_url`.\nUse the `next_analysis_url` URL if you want to avoid accidentally deleting the final analysis\nin a set. This is a useful option if you want to preserve at least one analysis\nfor the specified tool in your repository.\nUse the `confirm_delete_url` URL if you are content to remove all analyses for a tool.\nWhen you delete the last analysis in a set, the value of `next_analysis_url` and `confirm_delete_url`\nin the 200 response is `null`.\n\nAs an example of the deletion process,\nlet's imagine that you added a workflow that configured a particular code scanning tool\nto analyze the code in a repository. This tool has added 15 analyses:\n10 on the default branch, and another 5 on a topic branch.\nYou therefore have two separate sets of analyses for this tool.\nYou've now decided that you want to remove all of the analyses for the tool.\nTo do this you must make 15 separate deletion requests.\nTo start, you must find an analysis that's identified as deletable.\nEach set of analyses always has one that's identified as deletable.\nHaving found the deletable analysis for one of the two sets,\ndelete this analysis and then continue deleting the next analysis in the set until they're all deleted.\nThen repeat the process for the second set.\nThe procedure therefore consists of a nested loop:\n\n**Outer loop**:\n* List the analyses for the repository, filtered by tool.\n* Parse this list to find a deletable analysis. If found:\n\n **Inner loop**:\n * Delete the identified analysis.\n * Parse the response for the value of `confirm_delete_url` and, if found, use this in the next iteration.\n\nThe above process assumes that you want to remove all trace of the tool's analyses from the GitHub user interface, for the specified repository, and it therefore uses the `confirm_delete_url` value. Alternatively, you could use the `next_analysis_url` value, which would leave the last analysis in each set undeleted to avoid removing a tool's analysis entirely.", + "description": "Deletes a specified code scanning analysis from a repository. For\nprivate repositories, you must use an access token with the `repo` scope. For public repositories,\nyou must use an access token with `public_repo` scope.\nGitHub Apps must have the `security_events` write permission to use this endpoint.\n\nYou can delete one analysis at a time.\nTo delete a series of analyses, start with the most recent analysis and work backwards.\nConceptually, the process is similar to the undo function in a text editor.\n\nWhen you list the analyses for a repository,\none or more will be identified as deletable in the response:\n\n```\n\"deletable\": true\n```\n\nAn analysis is deletable when it's the most recent in a set of analyses.\nTypically, a repository will have multiple sets of analyses\nfor each enabled code scanning tool,\nwhere a set is determined by a unique combination of analysis values:\n\n* `ref`\n* `tool`\n* `category`\n\nIf you attempt to delete an analysis that is not the most recent in a set,\nyou'll get a 400 response with the message:\n\n```\nAnalysis specified is not deletable.\n```\n\nThe response from a successful `DELETE` operation provides you with\ntwo alternative URLs for deleting the next analysis in the set:\n`next_analysis_url` and `confirm_delete_url`.\nUse the `next_analysis_url` URL if you want to avoid accidentally deleting the final analysis\nin a set. This is a useful option if you want to preserve at least one analysis\nfor the specified tool in your repository.\nUse the `confirm_delete_url` URL if you are content to remove all analyses for a tool.\nWhen you delete the last analysis in a set, the value of `next_analysis_url` and `confirm_delete_url`\nin the 200 response is `null`.\n\nAs an example of the deletion process,\nlet's imagine that you added a workflow that configured a particular code scanning tool\nto analyze the code in a repository. This tool has added 15 analyses:\n10 on the default branch, and another 5 on a topic branch.\nYou therefore have two separate sets of analyses for this tool.\nYou've now decided that you want to remove all of the analyses for the tool.\nTo do this you must make 15 separate deletion requests.\nTo start, you must find an analysis that's identified as deletable.\nEach set of analyses always has one that's identified as deletable.\nHaving found the deletable analysis for one of the two sets,\ndelete this analysis and then continue deleting the next analysis in the set until they're all deleted.\nThen repeat the process for the second set.\nThe procedure therefore consists of a nested loop:\n\n**Outer loop**:\n* List the analyses for the repository, filtered by tool.\n* Parse this list to find a deletable analysis. If found:\n\n **Inner loop**:\n * Delete the identified analysis.\n * Parse the response for the value of `confirm_delete_url` and, if found, use this in the next iteration.\n\nThe above process assumes that you want to remove all trace of the tool's analyses from the GitHub user interface, for the specified repository, and it therefore uses the `confirm_delete_url` value. Alternatively, you could use the `next_analysis_url` value, which would leave the last analysis in each set undeleted to avoid removing a tool's analysis entirely.", "operationId": "code-scanning/delete-analysis", "tags": [ "code-scanning" @@ -252325,7 +252437,7 @@ "/repos/{owner}/{repo}/contents/{path}": { "get": { "summary": "Get repository content", - "description": "Gets the contents of a file or directory in a repository. Specify the file path or directory in `:path`. If you omit\n`:path`, you will receive the contents of the repository's root directory. See the description below regarding what the API response includes for directories. \n\nFiles and symlinks support [a custom media type](https://docs.github.com/enterprise-server@3.5/rest/reference/repos#custom-media-types) for\nretrieving the raw content or rendered HTML (when supported). All content types support [a custom media\ntype](https://docs.github.com/enterprise-server@3.5/rest/reference/repos#custom-media-types) to ensure the content is returned in a consistent\nobject format.\n\n**Note**:\n* To get a repository's contents recursively, you can [recursively get the tree](https://docs.github.com/enterprise-server@3.5/rest/reference/git#trees).\n* This API has an upper limit of 1,000 files for a directory. If you need to retrieve more files, use the [Git Trees\nAPI](https://docs.github.com/enterprise-server@3.5/rest/reference/git#get-a-tree).\n* This API supports files up to 1 megabyte in size.\n\n#### If the content is a directory\nThe response will be an array of objects, one object for each item in the directory.\nWhen listing the contents of a directory, submodules have their \"type\" specified as \"file\". Logically, the value\n_should_ be \"submodule\". This behavior exists in API v3 [for backwards compatibility purposes](https://git.io/v1YCW).\nIn the next major version of the API, the type will be returned as \"submodule\".\n\n#### If the content is a symlink \nIf the requested `:path` points to a symlink, and the symlink's target is a normal file in the repository, then the\nAPI responds with the content of the file (in the format shown in the example. Otherwise, the API responds with an object \ndescribing the symlink itself.\n\n#### If the content is a submodule\nThe `submodule_git_url` identifies the location of the submodule repository, and the `sha` identifies a specific\ncommit within the submodule repository. Git uses the given URL when cloning the submodule repository, and checks out\nthe submodule at that specific commit.\n\nIf the submodule repository is not hosted on github.com, the Git URLs (`git_url` and `_links[\"git\"]`) and the\ngithub.com URLs (`html_url` and `_links[\"html\"]`) will have null values.", + "description": "Gets the contents of a file or directory in a repository. Specify the file path or directory in `:path`. If you omit\n`:path`, you will receive the contents of the repository's root directory. See the description below regarding what the API response includes for directories. \n\nFiles and symlinks support [a custom media type](https://docs.github.com/enterprise-server@3.5/rest/reference/repos#custom-media-types) for\nretrieving the raw content or rendered HTML (when supported). All content types support [a custom media\ntype](https://docs.github.com/enterprise-server@3.5/rest/reference/repos#custom-media-types) to ensure the content is returned in a consistent\nobject format.\n\n**Notes**:\n* To get a repository's contents recursively, you can [recursively get the tree](https://docs.github.com/enterprise-server@3.5/rest/reference/git#trees).\n* This API has an upper limit of 1,000 files for a directory. If you need to retrieve more files, use the [Git Trees\nAPI](https://docs.github.com/enterprise-server@3.5/rest/reference/git#get-a-tree).\n * Download URLs expire and are meant to be used just once. To ensure the download URL does not expire, please use the contents API to obtain a fresh download URL for each download. \n* This API supports files up to 1 megabyte in size.\n\n#### If the content is a directory\nThe response will be an array of objects, one object for each item in the directory.\nWhen listing the contents of a directory, submodules have their \"type\" specified as \"file\". Logically, the value\n_should_ be \"submodule\". This behavior exists in API v3 [for backwards compatibility purposes](https://git.io/v1YCW).\nIn the next major version of the API, the type will be returned as \"submodule\".\n\n#### If the content is a symlink \nIf the requested `:path` points to a symlink, and the symlink's target is a normal file in the repository, then the\nAPI responds with the content of the file (in the format shown in the example. Otherwise, the API responds with an object \ndescribing the symlink itself.\n\n#### If the content is a submodule\nThe `submodule_git_url` identifies the location of the submodule repository, and the `sha` identifies a specific\ncommit within the submodule repository. Git uses the given URL when cloning the submodule repository, and checks out\nthe submodule at that specific commit.\n\nIf the submodule repository is not hosted on github.com, the Git URLs (`git_url` and `_links[\"git\"]`) and the\ngithub.com URLs (`html_url` and `_links[\"html\"]`) will have null values.", "tags": [ "repos" ], @@ -282507,14 +282619,6 @@ "write" ] }, - "organization_custom_roles": { - "type": "string", - "description": "The level of permission to grant the access token for custom roles management.", - "enum": [ - "read", - "write" - ] - }, "deployments": { "type": "string", "description": "The level of permission to grant the access token for deployments and deployment statuses.", @@ -285879,6 +285983,14 @@ ] } } + }, + "examples": { + "default": { + "summary": "Example request body", + "value": { + "permissions": "write" + } + } } } } @@ -291905,7 +292017,8 @@ "type": "User", "site_admin": false }, - "author_association": "COLLABORATOR" + "author_association": "COLLABORATOR", + "state_reason": "completed" } ] } @@ -295355,7 +295468,8 @@ "type": "User", "site_admin": false }, - "author_association": "COLLABORATOR" + "author_association": "COLLABORATOR", + "state_reason": "completed" } } } @@ -304006,7 +304120,8 @@ "closed_at": null, "created_at": "2011-04-22T13:33:48Z", "updated_at": "2011-04-22T13:33:48Z", - "author_association": "COLLABORATOR" + "author_association": "COLLABORATOR", + "state_reason": "completed" } } ] @@ -308940,7 +309055,8 @@ "closed_at": null, "created_at": "2011-04-22T13:33:48Z", "updated_at": "2011-04-22T13:33:48Z", - "author_association": "COLLABORATOR" + "author_association": "COLLABORATOR", + "state_reason": "completed" } } } @@ -312235,7 +312351,8 @@ "type": "User", "site_admin": false }, - "author_association": "COLLABORATOR" + "author_association": "COLLABORATOR", + "state_reason": "completed" } } } @@ -312416,6 +312533,16 @@ "closed" ] }, + "state_reason": { + "type": [ + "string", + "null" + ], + "description": "The reason for the current state", + "examples": [ + "not_planned" + ] + }, "milestone": { "oneOf": [ { @@ -315653,7 +315780,8 @@ "type": "User", "site_admin": false }, - "author_association": "COLLABORATOR" + "author_association": "COLLABORATOR", + "state_reason": "completed" } } } @@ -319098,7 +319226,8 @@ "type": "User", "site_admin": false }, - "author_association": "COLLABORATOR" + "author_association": "COLLABORATOR", + "state_reason": "completed" } } } @@ -322340,7 +322469,8 @@ "type": "User", "site_admin": false }, - "author_association": "COLLABORATOR" + "author_association": "COLLABORATOR", + "state_reason": "completed" } } } @@ -432413,7 +432543,8 @@ "body": "...", "score": 1, "locked": true, - "author_association": "COLLABORATOR" + "author_association": "COLLABORATOR", + "state_reason": "completed" } ] } @@ -456099,14 +456230,6 @@ "write" ] }, - "organization_custom_roles": { - "type": "string", - "description": "The level of permission to grant the access token for custom roles management.", - "enum": [ - "read", - "write" - ] - }, "deployments": { "type": "string", "description": "The level of permission to grant the access token for deployments and deployment statuses.", @@ -500060,14 +500183,6 @@ "write" ] }, - "organization_custom_roles": { - "type": "string", - "description": "The level of permission to grant the access token for custom roles management.", - "enum": [ - "read", - "write" - ] - }, "deployments": { "type": "string", "description": "The level of permission to grant the access token for deployments and deployment statuses.", diff --git a/descriptions-next/ghes-3.5/dereferenced/ghes-3.5.deref.yaml b/descriptions-next/ghes-3.5/dereferenced/ghes-3.5.deref.yaml index ecc6827b19..6ecfd877bf 100644 --- a/descriptions-next/ghes-3.5/dereferenced/ghes-3.5.deref.yaml +++ b/descriptions-next/ghes-3.5/dereferenced/ghes-3.5.deref.yaml @@ -2529,13 +2529,6 @@ paths: enum: - read - write - organization_custom_roles: - type: string - description: The level of permission to grant the - access token for custom roles management. - enum: - - read - - write deployments: type: string description: The level of permission to grant the @@ -16572,6 +16565,9 @@ paths: List the custom repository roles available in this organization. In order to see custom repository roles in an organization, the authenticated user must be an organization owner. + To use this endpoint the authenticated user must be an administrator for the organization or of an repository of the organizaiton and must use an access token with `admin:org repo` scope. + GitHub Apps must have the `organization_custom_roles:read` organization permission to use this endpoint. + For more information on custom repository roles, see "[Managing custom repository roles for an organization](https://docs.github.com/enterprise-server@3.5/organizations/managing-peoples-access-to-your-organization-with-roles/managing-custom-repository-roles-for-an-organization)". tags: - orgs @@ -35361,6 +35357,95 @@ paths: - protection - protected - protection_url + examples: + default: + value: + name: main + commit: + sha: 7fd1a60b01f91b314f59955a4e4d4e80d8edf11d + node_id: MDY6Q29tbWl0MTI5NjI2OTo3ZmQxYTYwYjAxZjkxYjMxNGY1OTk1NWE0ZTRkNGU4MGQ4ZWRmMTFk + commit: + author: + name: The Octocat + email: octocat@nowhere.com + date: '2012-03-06T23:06:50Z' + committer: + name: The Octocat + email: octocat@nowhere.com + date: '2012-03-06T23:06:50Z' + message: |- + Merge pull request #6 from Spaceghost/patch-1 + + New line at end of file. + tree: + sha: b4eecafa9be2f2006ce1b709d6857b07069b4608 + url: https://api.github.com/repos/octocat/Hello-World/git/trees/b4eecafa9be2f2006ce1b709d6857b07069b4608 + url: https://api.github.com/repos/octocat/Hello-World/git/commits/7fd1a60b01f91b314f59955a4e4d4e80d8edf11d + comment_count: 77 + verification: + verified: false + reason: unsigned + signature: + payload: + url: https://api.github.com/repos/octocat/Hello-World/commits/7fd1a60b01f91b314f59955a4e4d4e80d8edf11d + html_url: https://github.com/octocat/Hello-World/commit/7fd1a60b01f91b314f59955a4e4d4e80d8edf11d + comments_url: https://api.github.com/repos/octocat/Hello-World/commits/7fd1a60b01f91b314f59955a4e4d4e80d8edf11d/comments + author: + login: octocat + id: 583231 + node_id: MDQ6VXNlcjU4MzIzMQ== + avatar_url: https://avatars.githubusercontent.com/u/583231?v=4 + gravatar_id: '' + url: https://api.github.com/users/octocat + html_url: https://github.com/octocat + followers_url: https://api.github.com/users/octocat/followers + following_url: https://api.github.com/users/octocat/following{/other_user} + gists_url: https://api.github.com/users/octocat/gists{/gist_id} + starred_url: https://api.github.com/users/octocat/starred{/owner}{/repo} + subscriptions_url: https://api.github.com/users/octocat/subscriptions + organizations_url: https://api.github.com/users/octocat/orgs + repos_url: https://api.github.com/users/octocat/repos + events_url: https://api.github.com/users/octocat/events{/privacy} + received_events_url: https://api.github.com/users/octocat/received_events + type: User + site_admin: false + committer: + login: octocat + id: 583231 + node_id: MDQ6VXNlcjU4MzIzMQ== + avatar_url: https://avatars.githubusercontent.com/u/583231?v=4 + gravatar_id: '' + url: https://api.github.com/users/octocat + html_url: https://github.com/octocat + followers_url: https://api.github.com/users/octocat/followers + following_url: https://api.github.com/users/octocat/following{/other_user} + gists_url: https://api.github.com/users/octocat/gists{/gist_id} + starred_url: https://api.github.com/users/octocat/starred{/owner}{/repo} + subscriptions_url: https://api.github.com/users/octocat/subscriptions + organizations_url: https://api.github.com/users/octocat/orgs + repos_url: https://api.github.com/users/octocat/repos + events_url: https://api.github.com/users/octocat/events{/privacy} + received_events_url: https://api.github.com/users/octocat/received_events + type: User + site_admin: false + parents: + - sha: 553c2077f0edc3d5dc5d17262f6aa498e69d6f8e + url: https://api.github.com/repos/octocat/Hello-World/commits/553c2077f0edc3d5dc5d17262f6aa498e69d6f8e + html_url: https://github.com/octocat/Hello-World/commit/553c2077f0edc3d5dc5d17262f6aa498e69d6f8e + - sha: 762941318ee16e59dabbacb1b4049eec22f0d303 + url: https://api.github.com/repos/octocat/Hello-World/commits/762941318ee16e59dabbacb1b4049eec22f0d303 + html_url: https://github.com/octocat/Hello-World/commit/762941318ee16e59dabbacb1b4049eec22f0d303 + _links: + self: https://api.github.com/repos/octocat/Hello-World/branches/main + html: https://github.com/octocat/Hello-World/tree/main + protected: false + protection: + enabled: false + required_status_checks: + enforcement_level: 'off' + contexts: [] + checks: [] + protection_url: https://api.github.com/repos/octocat/Hello-World/branches/main/protection '301': *204 '404': *33 x-github: @@ -35990,6 +36075,55 @@ paths: - enabled required: - url + examples: + default: + value: + url: https://api.github.com/repos/octocat/hello-world/branches/main/protection + required_status_checks: + url: https://api.github.com/repos/octocat/hello-world/branches/main/protection/required_status_checks + strict: true + contexts: + - continuous-integration/travis-ci + contexts_url: https://api.github.com/repos/octocat/hello-world/branches/main/protection/required_status_checks/contexts + checks: + - context: continuous-integration/travis-ci + app_id: + restrictions: + url: https://api.github.com/repos/octocat/hello-world/branches/main/protection/restrictions + users_url: https://api.github.com/repos/octocat/hello-world/branches/main/protection/restrictions/users + teams_url: https://api.github.com/repos/octocat/hello-world/branches/main/protection/restrictions/teams + apps_url: https://api.github.com/repos/octocat/hello-world/branches/main/protection/restrictions/apps + users: [] + teams: [] + apps: [] + required_pull_request_reviews: + url: https://api.github.com/repos/octocat/hello-world/branches/main/protection/required_pull_request_reviews + dismiss_stale_reviews: true + require_code_owner_reviews: true + required_approving_review_count: 2 + dismissal_restrictions: + url: https://api.github.com/repos/octocat/hello-world/branches/main/protection/dismissal_restrictions + users_url: https://api.github.com/repos/octocat/hello-world/branches/main/protection/dismissal_restrictions/users + teams_url: https://api.github.com/repos/octocat/hello-world/branches/main/protection/dismissal_restrictions/teams + users: [] + teams: [] + apps: [] + required_signatures: + url: https://api.github.com/repos/octocat/hello-world/branches/main/protection/required_signatures + enabled: false + enforce_admins: + url: https://api.github.com/repos/octocat/hello-world/branches/main/protection/enforce_admins + enabled: true + required_linear_history: + enabled: true + allow_force_pushes: + enabled: true + allow_deletions: + enabled: true + block_creations: + enabled: true + required_conversation_resolution: + enabled: true '403': *35 '422': *80 '404': *33 @@ -36653,7 +36787,7 @@ paths: properties: contexts: type: array - description: contexts parameter + description: The name of the status checks items: type: string required: @@ -36662,9 +36796,16 @@ paths: contexts: - contexts - type: array - description: contexts parameter + description: The name of the status checks items: type: string + examples: + default: + summary: Example adding status checks to a branch protection rule + value: + contexts: + - continuous-integration/travis-ci + - continuous-integration/jenkins responses: '200': description: Response @@ -36715,7 +36856,7 @@ paths: properties: contexts: type: array - description: contexts parameter + description: The name of the status checks items: type: string required: @@ -36724,9 +36865,15 @@ paths: contexts: - contexts - type: array - description: contexts parameter + description: The name of the status checks items: type: string + examples: + default: + summary: Example updating status checks for a branch protection rule + value: + contexts: + - continuous-integration/travis-ci responses: '200': description: Response @@ -36774,7 +36921,7 @@ paths: properties: contexts: type: array - description: contexts parameter + description: The name of the status checks items: type: string required: @@ -36783,9 +36930,15 @@ paths: contexts: - contexts - type: array - description: contexts parameter + description: The name of the status checks items: type: string + examples: + default: + summary: Example removing status checks from a branch protection rule + value: + contexts: + - continuous-integration/travis-ci responses: '200': description: Response @@ -37238,7 +37391,7 @@ paths: properties: teams: type: array - description: teams parameter + description: The slug values for teams items: type: string required: @@ -37247,9 +37400,15 @@ paths: teams: - my-team - type: array - description: teams parameter + description: The slug values for teams items: type: string + examples: + default: + summary: Example adding a team in a branch protection rule + value: + teams: + - justice-league responses: '200': description: Response @@ -37297,18 +37456,24 @@ paths: properties: teams: type: array - description: teams parameter + description: The slug values for teams items: type: string required: - teams example: teams: - - my-team + - justice-league - type: array - description: teams parameter + description: The slug values for teams items: type: string + examples: + default: + summary: Example replacing a team in a branch protection rule + value: + teams: + - justice-league responses: '200': description: Response @@ -37355,7 +37520,7 @@ paths: properties: teams: type: array - description: teams parameter + description: The slug values for teams items: type: string required: @@ -37364,9 +37529,15 @@ paths: teams: - my-team - type: array - description: teams parameter + description: The slug values for teams items: type: string + examples: + default: + summary: Example removing a team in a branch protection rule + value: + teams: + - justice-league responses: '200': description: Response @@ -37447,7 +37618,7 @@ paths: properties: users: type: array - description: users parameter + description: The username for users items: type: string required: @@ -37458,6 +37629,12 @@ paths: - type: array items: type: string + examples: + default: + summary: Example adding a user in a branch protection rule + value: + users: + - octocat responses: '200': description: Response @@ -37505,7 +37682,7 @@ paths: properties: users: type: array - description: users parameter + description: The username for users items: type: string required: @@ -37516,6 +37693,12 @@ paths: - type: array items: type: string + examples: + default: + summary: Example replacing a user in a branch protection rule + value: + users: + - octocat responses: '200': description: Response @@ -37562,7 +37745,7 @@ paths: properties: users: type: array - description: users parameter + description: The username for users items: type: string required: @@ -37573,6 +37756,12 @@ paths: - type: array items: type: string + examples: + default: + summary: Example removing a user in a branch protection rule + value: + users: + - octocat responses: '200': description: Response @@ -40476,6 +40665,7 @@ paths: - ref: refs/heads/main analysis_key: ".github/workflows/codeql-analysis.yml:CodeQL-Build" environment: '' + category: ".github/workflows/codeql-analysis.yml:CodeQL-Build" state: open fixed_at: commit_sha: 39406e42cb832f683daa691dd652a8dc36ee8930 @@ -40814,8 +41004,7 @@ paths: * `ref` * `tool` - * `analysis_key` - * `environment` + * `category` If you attempt to delete an analysis that is not the most recent in a set, you'll get a 400 response with the message: @@ -44538,29 +44727,31 @@ paths: support [a custom media type](https://docs.github.com/enterprise-server@3.5/rest/reference/repos#custom-media-types) for\nretrieving the raw content or rendered HTML (when supported). All content types support [a custom media\ntype](https://docs.github.com/enterprise-server@3.5/rest/reference/repos#custom-media-types) - to ensure the content is returned in a consistent\nobject format.\n\n**Note**:\n* + to ensure the content is returned in a consistent\nobject format.\n\n**Notes**:\n* \ To get a repository's contents recursively, you can [recursively get the tree](https://docs.github.com/enterprise-server@3.5/rest/reference/git#trees).\n* \ This API has an upper limit of 1,000 files for a directory. If you need - to retrieve more files, use the [Git Trees\nAPI](https://docs.github.com/enterprise-server@3.5/rest/reference/git#get-a-tree).\n* - \ This API supports files up to 1 megabyte in size.\n\n#### If the content - is a directory\nThe response will be an array of objects, one object for each - item in the directory.\nWhen listing the contents of a directory, submodules - have their \"type\" specified as \"file\". Logically, the value\n_should_ - be \"submodule\". This behavior exists in API v3 [for backwards compatibility - purposes](https://git.io/v1YCW).\nIn the next major version of the API, the - type will be returned as \"submodule\".\n\n#### If the content is a symlink - \nIf the requested `:path` points to a symlink, and the symlink's target is - a normal file in the repository, then the\nAPI responds with the content of - the file (in the format shown in the example. Otherwise, the API responds - with an object \ndescribing the symlink itself.\n\n#### If the content is - a submodule\nThe `submodule_git_url` identifies the location of the submodule - repository, and the `sha` identifies a specific\ncommit within the submodule - repository. Git uses the given URL when cloning the submodule repository, - and checks out\nthe submodule at that specific commit.\n\nIf the submodule - repository is not hosted on github.com, the Git URLs (`git_url` and `_links[\"git\"]`) - and the\ngithub.com URLs (`html_url` and `_links[\"html\"]`) will have null - values." + to retrieve more files, use the [Git Trees\nAPI](https://docs.github.com/enterprise-server@3.5/rest/reference/git#get-a-tree).\n + * Download URLs expire and are meant to be used just once. To ensure the + download URL does not expire, please use the contents API to obtain a fresh + download URL for each download. \n* This API supports files up to 1 megabyte + in size.\n\n#### If the content is a directory\nThe response will be an array + of objects, one object for each item in the directory.\nWhen listing the contents + of a directory, submodules have their \"type\" specified as \"file\". Logically, + the value\n_should_ be \"submodule\". This behavior exists in API v3 [for + backwards compatibility purposes](https://git.io/v1YCW).\nIn the next major + version of the API, the type will be returned as \"submodule\".\n\n#### If + the content is a symlink \nIf the requested `:path` points to a symlink, and + the symlink's target is a normal file in the repository, then the\nAPI responds + with the content of the file (in the format shown in the example. Otherwise, + the API responds with an object \ndescribing the symlink itself.\n\n#### If + the content is a submodule\nThe `submodule_git_url` identifies the location + of the submodule repository, and the `sha` identifies a specific\ncommit within + the submodule repository. Git uses the given URL when cloning the submodule + repository, and checks out\nthe submodule at that specific commit.\n\nIf the + submodule repository is not hosted on github.com, the Git URLs (`git_url` + and `_links[\"git\"]`) and the\ngithub.com URLs (`html_url` and `_links[\"html\"]`) + will have null values." tags: - repos operationId: repos/get-content @@ -49926,6 +50117,11 @@ paths: - maintain - triage - admin + examples: + default: + summary: Example request body + value: + permissions: write responses: '200': description: Response @@ -50303,6 +50499,7 @@ paths: type: User site_admin: false author_association: COLLABORATOR + state_reason: completed headers: Link: *6 '301': *204 @@ -50555,6 +50752,7 @@ paths: type: User site_admin: false author_association: COLLABORATOR + state_reason: completed headers: Location: example: https://api.github.com/repos/octocat/Hello-World/issues/1347 @@ -51256,6 +51454,7 @@ paths: created_at: '2011-04-22T13:33:48Z' updated_at: '2011-04-22T13:33:48Z' author_association: COLLABORATOR + state_reason: completed headers: Link: *6 '422': *29 @@ -51478,6 +51677,7 @@ paths: created_at: '2011-04-22T13:33:48Z' updated_at: '2011-04-22T13:33:48Z' author_association: COLLABORATOR + state_reason: completed '404': *33 '410': *167 '403': *35 @@ -51580,6 +51780,13 @@ paths: enum: - open - closed + state_reason: + type: + - string + - 'null' + description: The reason for the current state + examples: + - not_planned milestone: oneOf: - type: string @@ -65890,6 +66097,7 @@ paths: score: 1 locked: true author_association: COLLABORATOR + state_reason: completed '503': *84 '422': *29 '304': *38 diff --git a/descriptions-next/ghes-3.5/ghes-3.5.json b/descriptions-next/ghes-3.5/ghes-3.5.json index 87c4f5bf02..19a1122470 100644 --- a/descriptions-next/ghes-3.5/ghes-3.5.json +++ b/descriptions-next/ghes-3.5/ghes-3.5.json @@ -9445,7 +9445,7 @@ "/organizations/{organization_id}/custom_roles": { "get": { "summary": "List custom repository roles in an organization", - "description": "List the custom repository roles available in this organization. In order to see custom\nrepository roles in an organization, the authenticated user must be an organization owner.\n\nFor more information on custom repository roles, see \"[Managing custom repository roles for an organization](https://docs.github.com/enterprise-server@3.5/organizations/managing-peoples-access-to-your-organization-with-roles/managing-custom-repository-roles-for-an-organization)\".", + "description": "List the custom repository roles available in this organization. In order to see custom\nrepository roles in an organization, the authenticated user must be an organization owner.\n\nTo use this endpoint the authenticated user must be an administrator for the organization or of an repository of the organizaiton and must use an access token with `admin:org repo` scope.\nGitHub Apps must have the `organization_custom_roles:read` organization permission to use this endpoint.\n\nFor more information on custom repository roles, see \"[Managing custom repository roles for an organization](https://docs.github.com/enterprise-server@3.5/organizations/managing-peoples-access-to-your-organization-with-roles/managing-custom-repository-roles-for-an-organization)\".", "tags": [ "orgs" ], @@ -23125,6 +23125,11 @@ "application/json": { "schema": { "$ref": "#/components/schemas/branch-with-protection" + }, + "examples": { + "default": { + "$ref": "#/components/examples/branch-get" + } } } } @@ -23475,6 +23480,11 @@ "application/json": { "schema": { "$ref": "#/components/schemas/protected-branch" + }, + "examples": { + "default": { + "$ref": "#/components/examples/branch-protection-update" + } } } } @@ -24324,7 +24334,7 @@ "properties": { "contexts": { "type": "array", - "description": "contexts parameter", + "description": "The name of the status checks", "items": { "type": "string" } @@ -24341,12 +24351,23 @@ }, { "type": "array", - "description": "contexts parameter", + "description": "The name of the status checks", "items": { "type": "string" } } ] + }, + "examples": { + "default": { + "summary": "Example adding status checks to a branch protection rule", + "value": { + "contexts": [ + "continuous-integration/travis-ci", + "continuous-integration/jenkins" + ] + } + } } } } @@ -24424,7 +24445,7 @@ "properties": { "contexts": { "type": "array", - "description": "contexts parameter", + "description": "The name of the status checks", "items": { "type": "string" } @@ -24441,12 +24462,22 @@ }, { "type": "array", - "description": "contexts parameter", + "description": "The name of the status checks", "items": { "type": "string" } } ] + }, + "examples": { + "default": { + "summary": "Example updating status checks for a branch protection rule", + "value": { + "contexts": [ + "continuous-integration/travis-ci" + ] + } + } } } } @@ -24519,7 +24550,7 @@ "properties": { "contexts": { "type": "array", - "description": "contexts parameter", + "description": "The name of the status checks", "items": { "type": "string" } @@ -24536,12 +24567,22 @@ }, { "type": "array", - "description": "contexts parameter", + "description": "The name of the status checks", "items": { "type": "string" } } ] + }, + "examples": { + "default": { + "summary": "Example removing status checks from a branch protection rule", + "value": { + "contexts": [ + "continuous-integration/travis-ci" + ] + } + } } } } @@ -25077,7 +25118,7 @@ "properties": { "teams": { "type": "array", - "description": "teams parameter", + "description": "The slug values for teams", "items": { "type": "string" } @@ -25094,12 +25135,22 @@ }, { "type": "array", - "description": "teams parameter", + "description": "The slug values for teams", "items": { "type": "string" } } ] + }, + "examples": { + "default": { + "summary": "Example adding a team in a branch protection rule", + "value": { + "teams": [ + "justice-league" + ] + } + } } } } @@ -25168,7 +25219,7 @@ "properties": { "teams": { "type": "array", - "description": "teams parameter", + "description": "The slug values for teams", "items": { "type": "string" } @@ -25179,18 +25230,28 @@ ], "example": { "teams": [ - "my-team" + "justice-league" ] } }, { "type": "array", - "description": "teams parameter", + "description": "The slug values for teams", "items": { "type": "string" } } ] + }, + "examples": { + "default": { + "summary": "Example replacing a team in a branch protection rule", + "value": { + "teams": [ + "justice-league" + ] + } + } } } } @@ -25258,7 +25319,7 @@ "properties": { "teams": { "type": "array", - "description": "teams parameter", + "description": "The slug values for teams", "items": { "type": "string" } @@ -25275,12 +25336,22 @@ }, { "type": "array", - "description": "teams parameter", + "description": "The slug values for teams", "items": { "type": "string" } } ] + }, + "examples": { + "default": { + "summary": "Example removing a team in a branch protection rule", + "value": { + "teams": [ + "justice-league" + ] + } + } } } } @@ -25403,7 +25474,7 @@ "properties": { "users": { "type": "array", - "description": "users parameter", + "description": "The username for users", "items": { "type": "string" } @@ -25425,6 +25496,16 @@ } } ] + }, + "examples": { + "default": { + "summary": "Example adding a user in a branch protection rule", + "value": { + "users": [ + "octocat" + ] + } + } } } } @@ -25493,7 +25574,7 @@ "properties": { "users": { "type": "array", - "description": "users parameter", + "description": "The username for users", "items": { "type": "string" } @@ -25515,6 +25596,16 @@ } } ] + }, + "examples": { + "default": { + "summary": "Example replacing a user in a branch protection rule", + "value": { + "users": [ + "octocat" + ] + } + } } } } @@ -25582,7 +25673,7 @@ "properties": { "users": { "type": "array", - "description": "users parameter", + "description": "The username for users", "items": { "type": "string" } @@ -25604,6 +25695,16 @@ } } ] + }, + "examples": { + "default": { + "summary": "Example removing a user in a branch protection rule", + "value": { + "users": [ + "octocat" + ] + } + } } } } @@ -27392,7 +27493,7 @@ }, "delete": { "summary": "Delete a code scanning analysis from a repository", - "description": "Deletes a specified code scanning analysis from a repository. For\nprivate repositories, you must use an access token with the `repo` scope. For public repositories,\nyou must use an access token with `public_repo` scope.\nGitHub Apps must have the `security_events` write permission to use this endpoint.\n\nYou can delete one analysis at a time.\nTo delete a series of analyses, start with the most recent analysis and work backwards.\nConceptually, the process is similar to the undo function in a text editor.\n\nWhen you list the analyses for a repository,\none or more will be identified as deletable in the response:\n\n```\n\"deletable\": true\n```\n\nAn analysis is deletable when it's the most recent in a set of analyses.\nTypically, a repository will have multiple sets of analyses\nfor each enabled code scanning tool,\nwhere a set is determined by a unique combination of analysis values:\n\n* `ref`\n* `tool`\n* `analysis_key`\n* `environment`\n\nIf you attempt to delete an analysis that is not the most recent in a set,\nyou'll get a 400 response with the message:\n\n```\nAnalysis specified is not deletable.\n```\n\nThe response from a successful `DELETE` operation provides you with\ntwo alternative URLs for deleting the next analysis in the set:\n`next_analysis_url` and `confirm_delete_url`.\nUse the `next_analysis_url` URL if you want to avoid accidentally deleting the final analysis\nin a set. This is a useful option if you want to preserve at least one analysis\nfor the specified tool in your repository.\nUse the `confirm_delete_url` URL if you are content to remove all analyses for a tool.\nWhen you delete the last analysis in a set, the value of `next_analysis_url` and `confirm_delete_url`\nin the 200 response is `null`.\n\nAs an example of the deletion process,\nlet's imagine that you added a workflow that configured a particular code scanning tool\nto analyze the code in a repository. This tool has added 15 analyses:\n10 on the default branch, and another 5 on a topic branch.\nYou therefore have two separate sets of analyses for this tool.\nYou've now decided that you want to remove all of the analyses for the tool.\nTo do this you must make 15 separate deletion requests.\nTo start, you must find an analysis that's identified as deletable.\nEach set of analyses always has one that's identified as deletable.\nHaving found the deletable analysis for one of the two sets,\ndelete this analysis and then continue deleting the next analysis in the set until they're all deleted.\nThen repeat the process for the second set.\nThe procedure therefore consists of a nested loop:\n\n**Outer loop**:\n* List the analyses for the repository, filtered by tool.\n* Parse this list to find a deletable analysis. If found:\n\n **Inner loop**:\n * Delete the identified analysis.\n * Parse the response for the value of `confirm_delete_url` and, if found, use this in the next iteration.\n\nThe above process assumes that you want to remove all trace of the tool's analyses from the GitHub user interface, for the specified repository, and it therefore uses the `confirm_delete_url` value. Alternatively, you could use the `next_analysis_url` value, which would leave the last analysis in each set undeleted to avoid removing a tool's analysis entirely.", + "description": "Deletes a specified code scanning analysis from a repository. For\nprivate repositories, you must use an access token with the `repo` scope. For public repositories,\nyou must use an access token with `public_repo` scope.\nGitHub Apps must have the `security_events` write permission to use this endpoint.\n\nYou can delete one analysis at a time.\nTo delete a series of analyses, start with the most recent analysis and work backwards.\nConceptually, the process is similar to the undo function in a text editor.\n\nWhen you list the analyses for a repository,\none or more will be identified as deletable in the response:\n\n```\n\"deletable\": true\n```\n\nAn analysis is deletable when it's the most recent in a set of analyses.\nTypically, a repository will have multiple sets of analyses\nfor each enabled code scanning tool,\nwhere a set is determined by a unique combination of analysis values:\n\n* `ref`\n* `tool`\n* `category`\n\nIf you attempt to delete an analysis that is not the most recent in a set,\nyou'll get a 400 response with the message:\n\n```\nAnalysis specified is not deletable.\n```\n\nThe response from a successful `DELETE` operation provides you with\ntwo alternative URLs for deleting the next analysis in the set:\n`next_analysis_url` and `confirm_delete_url`.\nUse the `next_analysis_url` URL if you want to avoid accidentally deleting the final analysis\nin a set. This is a useful option if you want to preserve at least one analysis\nfor the specified tool in your repository.\nUse the `confirm_delete_url` URL if you are content to remove all analyses for a tool.\nWhen you delete the last analysis in a set, the value of `next_analysis_url` and `confirm_delete_url`\nin the 200 response is `null`.\n\nAs an example of the deletion process,\nlet's imagine that you added a workflow that configured a particular code scanning tool\nto analyze the code in a repository. This tool has added 15 analyses:\n10 on the default branch, and another 5 on a topic branch.\nYou therefore have two separate sets of analyses for this tool.\nYou've now decided that you want to remove all of the analyses for the tool.\nTo do this you must make 15 separate deletion requests.\nTo start, you must find an analysis that's identified as deletable.\nEach set of analyses always has one that's identified as deletable.\nHaving found the deletable analysis for one of the two sets,\ndelete this analysis and then continue deleting the next analysis in the set until they're all deleted.\nThen repeat the process for the second set.\nThe procedure therefore consists of a nested loop:\n\n**Outer loop**:\n* List the analyses for the repository, filtered by tool.\n* Parse this list to find a deletable analysis. If found:\n\n **Inner loop**:\n * Delete the identified analysis.\n * Parse the response for the value of `confirm_delete_url` and, if found, use this in the next iteration.\n\nThe above process assumes that you want to remove all trace of the tool's analyses from the GitHub user interface, for the specified repository, and it therefore uses the `confirm_delete_url` value. Alternatively, you could use the `next_analysis_url` value, which would leave the last analysis in each set undeleted to avoid removing a tool's analysis entirely.", "operationId": "code-scanning/delete-analysis", "tags": [ "code-scanning" @@ -29285,7 +29386,7 @@ "/repos/{owner}/{repo}/contents/{path}": { "get": { "summary": "Get repository content", - "description": "Gets the contents of a file or directory in a repository. Specify the file path or directory in `:path`. If you omit\n`:path`, you will receive the contents of the repository's root directory. See the description below regarding what the API response includes for directories. \n\nFiles and symlinks support [a custom media type](https://docs.github.com/enterprise-server@3.5/rest/reference/repos#custom-media-types) for\nretrieving the raw content or rendered HTML (when supported). All content types support [a custom media\ntype](https://docs.github.com/enterprise-server@3.5/rest/reference/repos#custom-media-types) to ensure the content is returned in a consistent\nobject format.\n\n**Note**:\n* To get a repository's contents recursively, you can [recursively get the tree](https://docs.github.com/enterprise-server@3.5/rest/reference/git#trees).\n* This API has an upper limit of 1,000 files for a directory. If you need to retrieve more files, use the [Git Trees\nAPI](https://docs.github.com/enterprise-server@3.5/rest/reference/git#get-a-tree).\n* This API supports files up to 1 megabyte in size.\n\n#### If the content is a directory\nThe response will be an array of objects, one object for each item in the directory.\nWhen listing the contents of a directory, submodules have their \"type\" specified as \"file\". Logically, the value\n_should_ be \"submodule\". This behavior exists in API v3 [for backwards compatibility purposes](https://git.io/v1YCW).\nIn the next major version of the API, the type will be returned as \"submodule\".\n\n#### If the content is a symlink \nIf the requested `:path` points to a symlink, and the symlink's target is a normal file in the repository, then the\nAPI responds with the content of the file (in the format shown in the example. Otherwise, the API responds with an object \ndescribing the symlink itself.\n\n#### If the content is a submodule\nThe `submodule_git_url` identifies the location of the submodule repository, and the `sha` identifies a specific\ncommit within the submodule repository. Git uses the given URL when cloning the submodule repository, and checks out\nthe submodule at that specific commit.\n\nIf the submodule repository is not hosted on github.com, the Git URLs (`git_url` and `_links[\"git\"]`) and the\ngithub.com URLs (`html_url` and `_links[\"html\"]`) will have null values.", + "description": "Gets the contents of a file or directory in a repository. Specify the file path or directory in `:path`. If you omit\n`:path`, you will receive the contents of the repository's root directory. See the description below regarding what the API response includes for directories. \n\nFiles and symlinks support [a custom media type](https://docs.github.com/enterprise-server@3.5/rest/reference/repos#custom-media-types) for\nretrieving the raw content or rendered HTML (when supported). All content types support [a custom media\ntype](https://docs.github.com/enterprise-server@3.5/rest/reference/repos#custom-media-types) to ensure the content is returned in a consistent\nobject format.\n\n**Notes**:\n* To get a repository's contents recursively, you can [recursively get the tree](https://docs.github.com/enterprise-server@3.5/rest/reference/git#trees).\n* This API has an upper limit of 1,000 files for a directory. If you need to retrieve more files, use the [Git Trees\nAPI](https://docs.github.com/enterprise-server@3.5/rest/reference/git#get-a-tree).\n * Download URLs expire and are meant to be used just once. To ensure the download URL does not expire, please use the contents API to obtain a fresh download URL for each download. \n* This API supports files up to 1 megabyte in size.\n\n#### If the content is a directory\nThe response will be an array of objects, one object for each item in the directory.\nWhen listing the contents of a directory, submodules have their \"type\" specified as \"file\". Logically, the value\n_should_ be \"submodule\". This behavior exists in API v3 [for backwards compatibility purposes](https://git.io/v1YCW).\nIn the next major version of the API, the type will be returned as \"submodule\".\n\n#### If the content is a symlink \nIf the requested `:path` points to a symlink, and the symlink's target is a normal file in the repository, then the\nAPI responds with the content of the file (in the format shown in the example. Otherwise, the API responds with an object \ndescribing the symlink itself.\n\n#### If the content is a submodule\nThe `submodule_git_url` identifies the location of the submodule repository, and the `sha` identifies a specific\ncommit within the submodule repository. Git uses the given URL when cloning the submodule repository, and checks out\nthe submodule at that specific commit.\n\nIf the submodule repository is not hosted on github.com, the Git URLs (`git_url` and `_links[\"git\"]`) and the\ngithub.com URLs (`html_url` and `_links[\"html\"]`) will have null values.", "tags": [ "repos" ], @@ -33577,6 +33678,14 @@ ] } } + }, + "examples": { + "default": { + "summary": "Example request body", + "value": { + "permissions": "write" + } + } } } } @@ -34676,6 +34785,16 @@ "closed" ] }, + "state_reason": { + "type": [ + "string", + "null" + ], + "description": "The reason for the current state", + "examples": [ + "not_planned" + ] + }, "milestone": { "oneOf": [ { @@ -53373,14 +53492,6 @@ "write" ] }, - "organization_custom_roles": { - "type": "string", - "description": "The level of permission to grant the access token for custom roles management.", - "enum": [ - "read", - "write" - ] - }, "deployments": { "type": "string", "description": "The level of permission to grant the access token for deployments and deployment statuses.", @@ -89485,6 +89596,113 @@ } ] }, + "branch-get": { + "value": { + "name": "main", + "commit": { + "sha": "7fd1a60b01f91b314f59955a4e4d4e80d8edf11d", + "node_id": "MDY6Q29tbWl0MTI5NjI2OTo3ZmQxYTYwYjAxZjkxYjMxNGY1OTk1NWE0ZTRkNGU4MGQ4ZWRmMTFk", + "commit": { + "author": { + "name": "The Octocat", + "email": "octocat@nowhere.com", + "date": "2012-03-06T23:06:50Z" + }, + "committer": { + "name": "The Octocat", + "email": "octocat@nowhere.com", + "date": "2012-03-06T23:06:50Z" + }, + "message": "Merge pull request #6 from Spaceghost/patch-1\n\nNew line at end of file.", + "tree": { + "sha": "b4eecafa9be2f2006ce1b709d6857b07069b4608", + "url": "https://api.github.com/repos/octocat/Hello-World/git/trees/b4eecafa9be2f2006ce1b709d6857b07069b4608" + }, + "url": "https://api.github.com/repos/octocat/Hello-World/git/commits/7fd1a60b01f91b314f59955a4e4d4e80d8edf11d", + "comment_count": 77, + "verification": { + "verified": false, + "reason": "unsigned", + "signature": null, + "payload": null + } + }, + "url": "https://api.github.com/repos/octocat/Hello-World/commits/7fd1a60b01f91b314f59955a4e4d4e80d8edf11d", + "html_url": "https://github.com/octocat/Hello-World/commit/7fd1a60b01f91b314f59955a4e4d4e80d8edf11d", + "comments_url": "https://api.github.com/repos/octocat/Hello-World/commits/7fd1a60b01f91b314f59955a4e4d4e80d8edf11d/comments", + "author": { + "login": "octocat", + "id": 583231, + "node_id": "MDQ6VXNlcjU4MzIzMQ==", + "avatar_url": "https://avatars.githubusercontent.com/u/583231?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/octocat", + "html_url": "https://github.com/octocat", + "followers_url": "https://api.github.com/users/octocat/followers", + "following_url": "https://api.github.com/users/octocat/following{/other_user}", + "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}", + "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/octocat/subscriptions", + "organizations_url": "https://api.github.com/users/octocat/orgs", + "repos_url": "https://api.github.com/users/octocat/repos", + "events_url": "https://api.github.com/users/octocat/events{/privacy}", + "received_events_url": "https://api.github.com/users/octocat/received_events", + "type": "User", + "site_admin": false + }, + "committer": { + "login": "octocat", + "id": 583231, + "node_id": "MDQ6VXNlcjU4MzIzMQ==", + "avatar_url": "https://avatars.githubusercontent.com/u/583231?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/octocat", + "html_url": "https://github.com/octocat", + "followers_url": "https://api.github.com/users/octocat/followers", + "following_url": "https://api.github.com/users/octocat/following{/other_user}", + "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}", + "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/octocat/subscriptions", + "organizations_url": "https://api.github.com/users/octocat/orgs", + "repos_url": "https://api.github.com/users/octocat/repos", + "events_url": "https://api.github.com/users/octocat/events{/privacy}", + "received_events_url": "https://api.github.com/users/octocat/received_events", + "type": "User", + "site_admin": false + }, + "parents": [ + { + "sha": "553c2077f0edc3d5dc5d17262f6aa498e69d6f8e", + "url": "https://api.github.com/repos/octocat/Hello-World/commits/553c2077f0edc3d5dc5d17262f6aa498e69d6f8e", + "html_url": "https://github.com/octocat/Hello-World/commit/553c2077f0edc3d5dc5d17262f6aa498e69d6f8e" + }, + { + "sha": "762941318ee16e59dabbacb1b4049eec22f0d303", + "url": "https://api.github.com/repos/octocat/Hello-World/commits/762941318ee16e59dabbacb1b4049eec22f0d303", + "html_url": "https://github.com/octocat/Hello-World/commit/762941318ee16e59dabbacb1b4049eec22f0d303" + } + ] + }, + "_links": { + "self": "https://api.github.com/repos/octocat/Hello-World/branches/main", + "html": "https://github.com/octocat/Hello-World/tree/main" + }, + "protected": false, + "protection": { + "enabled": false, + "required_status_checks": { + "enforcement_level": "off", + "contexts": [ + + ], + "checks": [ + + ] + } + }, + "protection_url": "https://api.github.com/repos/octocat/Hello-World/branches/main/protection" + } + }, "branch-protection": { "value": { "url": "https://api.github.com/repos/octocat/Hello-World/branches/master/protection", @@ -89681,6 +89899,83 @@ } } }, + "branch-protection-update": { + "value": { + "url": "https://api.github.com/repos/octocat/hello-world/branches/main/protection", + "required_status_checks": { + "url": "https://api.github.com/repos/octocat/hello-world/branches/main/protection/required_status_checks", + "strict": true, + "contexts": [ + "continuous-integration/travis-ci" + ], + "contexts_url": "https://api.github.com/repos/octocat/hello-world/branches/main/protection/required_status_checks/contexts", + "checks": [ + { + "context": "continuous-integration/travis-ci", + "app_id": null + } + ] + }, + "restrictions": { + "url": "https://api.github.com/repos/octocat/hello-world/branches/main/protection/restrictions", + "users_url": "https://api.github.com/repos/octocat/hello-world/branches/main/protection/restrictions/users", + "teams_url": "https://api.github.com/repos/octocat/hello-world/branches/main/protection/restrictions/teams", + "apps_url": "https://api.github.com/repos/octocat/hello-world/branches/main/protection/restrictions/apps", + "users": [ + + ], + "teams": [ + + ], + "apps": [ + + ] + }, + "required_pull_request_reviews": { + "url": "https://api.github.com/repos/octocat/hello-world/branches/main/protection/required_pull_request_reviews", + "dismiss_stale_reviews": true, + "require_code_owner_reviews": true, + "required_approving_review_count": 2, + "dismissal_restrictions": { + "url": "https://api.github.com/repos/octocat/hello-world/branches/main/protection/dismissal_restrictions", + "users_url": "https://api.github.com/repos/octocat/hello-world/branches/main/protection/dismissal_restrictions/users", + "teams_url": "https://api.github.com/repos/octocat/hello-world/branches/main/protection/dismissal_restrictions/teams", + "users": [ + + ], + "teams": [ + + ], + "apps": [ + + ] + } + }, + "required_signatures": { + "url": "https://api.github.com/repos/octocat/hello-world/branches/main/protection/required_signatures", + "enabled": false + }, + "enforce_admins": { + "url": "https://api.github.com/repos/octocat/hello-world/branches/main/protection/enforce_admins", + "enabled": true + }, + "required_linear_history": { + "enabled": true + }, + "allow_force_pushes": { + "enabled": true + }, + "allow_deletions": { + "enabled": true + }, + "block_creations": { + "enabled": true + }, + "required_conversation_resolution": { + "enabled": true + } + } + }, "protected-branch-admin-enforced-2": { "value": { "url": "https://api.github.com/repos/octocat/Hello-World/branches/master/protection/enforce_admins", @@ -91220,6 +91515,7 @@ "ref": "refs/heads/main", "analysis_key": ".github/workflows/codeql-analysis.yml:CodeQL-Build", "environment": "", + "category": ".github/workflows/codeql-analysis.yml:CodeQL-Build", "state": "open", "fixed_at": null, "commit_sha": "39406e42cb832f683daa691dd652a8dc36ee8930", @@ -94512,7 +94808,8 @@ "type": "User", "site_admin": false }, - "author_association": "COLLABORATOR" + "author_association": "COLLABORATOR", + "state_reason": "completed" } ] }, @@ -94672,7 +94969,8 @@ "type": "User", "site_admin": false }, - "author_association": "COLLABORATOR" + "author_association": "COLLABORATOR", + "state_reason": "completed" } }, "issue-comment-items": { @@ -94908,7 +95206,8 @@ "closed_at": null, "created_at": "2011-04-22T13:33:48Z", "updated_at": "2011-04-22T13:33:48Z", - "author_association": "COLLABORATOR" + "author_association": "COLLABORATOR", + "state_reason": "completed" } } ] @@ -95117,7 +95416,8 @@ "closed_at": null, "created_at": "2011-04-22T13:33:48Z", "updated_at": "2011-04-22T13:33:48Z", - "author_association": "COLLABORATOR" + "author_association": "COLLABORATOR", + "state_reason": "completed" } } }, @@ -99358,7 +99658,8 @@ "body": "...", "score": 1, "locked": true, - "author_association": "COLLABORATOR" + "author_association": "COLLABORATOR", + "state_reason": "completed" } ] } diff --git a/descriptions-next/ghes-3.5/ghes-3.5.yaml b/descriptions-next/ghes-3.5/ghes-3.5.yaml index c01dcce52c..efb594aa6f 100644 --- a/descriptions-next/ghes-3.5/ghes-3.5.yaml +++ b/descriptions-next/ghes-3.5/ghes-3.5.yaml @@ -6556,6 +6556,9 @@ paths: List the custom repository roles available in this organization. In order to see custom repository roles in an organization, the authenticated user must be an organization owner. + To use this endpoint the authenticated user must be an administrator for the organization or of an repository of the organizaiton and must use an access token with `admin:org repo` scope. + GitHub Apps must have the `organization_custom_roles:read` organization permission to use this endpoint. + For more information on custom repository roles, see "[Managing custom repository roles for an organization](https://docs.github.com/enterprise-server@3.5/organizations/managing-peoples-access-to-your-organization-with-roles/managing-custom-repository-roles-for-an-organization)". tags: - orgs @@ -16389,6 +16392,9 @@ paths: application/json: schema: "$ref": "#/components/schemas/branch-with-protection" + examples: + default: + "$ref": "#/components/examples/branch-get" '301': "$ref": "#/components/responses/moved_permanently" '404': @@ -16687,6 +16693,9 @@ paths: application/json: schema: "$ref": "#/components/schemas/protected-branch" + examples: + default: + "$ref": "#/components/examples/branch-protection-update" '403': "$ref": "#/components/responses/forbidden" '422': @@ -17296,7 +17305,7 @@ paths: properties: contexts: type: array - description: contexts parameter + description: The name of the status checks items: type: string required: @@ -17305,9 +17314,16 @@ paths: contexts: - contexts - type: array - description: contexts parameter + description: The name of the status checks items: type: string + examples: + default: + summary: Example adding status checks to a branch protection rule + value: + contexts: + - continuous-integration/travis-ci + - continuous-integration/jenkins responses: '200': description: Response @@ -17361,7 +17377,7 @@ paths: properties: contexts: type: array - description: contexts parameter + description: The name of the status checks items: type: string required: @@ -17370,9 +17386,15 @@ paths: contexts: - contexts - type: array - description: contexts parameter + description: The name of the status checks items: type: string + examples: + default: + summary: Example updating status checks for a branch protection rule + value: + contexts: + - continuous-integration/travis-ci responses: '200': description: Response @@ -17422,7 +17444,7 @@ paths: properties: contexts: type: array - description: contexts parameter + description: The name of the status checks items: type: string required: @@ -17431,9 +17453,15 @@ paths: contexts: - contexts - type: array - description: contexts parameter + description: The name of the status checks items: type: string + examples: + default: + summary: Example removing status checks from a branch protection rule + value: + contexts: + - continuous-integration/travis-ci responses: '200': description: Response @@ -17801,7 +17829,7 @@ paths: properties: teams: type: array - description: teams parameter + description: The slug values for teams items: type: string required: @@ -17810,9 +17838,15 @@ paths: teams: - my-team - type: array - description: teams parameter + description: The slug values for teams items: type: string + examples: + default: + summary: Example adding a team in a branch protection rule + value: + teams: + - justice-league responses: '200': description: Response @@ -17863,18 +17897,24 @@ paths: properties: teams: type: array - description: teams parameter + description: The slug values for teams items: type: string required: - teams example: teams: - - my-team + - justice-league - type: array - description: teams parameter + description: The slug values for teams items: type: string + examples: + default: + summary: Example replacing a team in a branch protection rule + value: + teams: + - justice-league responses: '200': description: Response @@ -17924,7 +17964,7 @@ paths: properties: teams: type: array - description: teams parameter + description: The slug values for teams items: type: string required: @@ -17933,9 +17973,15 @@ paths: teams: - my-team - type: array - description: teams parameter + description: The slug values for teams items: type: string + examples: + default: + summary: Example removing a team in a branch protection rule + value: + teams: + - justice-league responses: '200': description: Response @@ -18022,7 +18068,7 @@ paths: properties: users: type: array - description: users parameter + description: The username for users items: type: string required: @@ -18033,6 +18079,12 @@ paths: - type: array items: type: string + examples: + default: + summary: Example adding a user in a branch protection rule + value: + users: + - octocat responses: '200': description: Response @@ -18083,7 +18135,7 @@ paths: properties: users: type: array - description: users parameter + description: The username for users items: type: string required: @@ -18094,6 +18146,12 @@ paths: - type: array items: type: string + examples: + default: + summary: Example replacing a user in a branch protection rule + value: + users: + - octocat responses: '200': description: Response @@ -18143,7 +18201,7 @@ paths: properties: users: type: array - description: users parameter + description: The username for users items: type: string required: @@ -18154,6 +18212,12 @@ paths: - type: array items: type: string + examples: + default: + summary: Example removing a user in a branch protection rule + value: + users: + - octocat responses: '200': description: Response @@ -19547,8 +19611,7 @@ paths: * `ref` * `tool` - * `analysis_key` - * `environment` + * `category` If you attempt to delete an analysis that is not the most recent in a set, you'll get a 400 response with the message: @@ -20999,29 +21062,31 @@ paths: support [a custom media type](https://docs.github.com/enterprise-server@3.5/rest/reference/repos#custom-media-types) for\nretrieving the raw content or rendered HTML (when supported). All content types support [a custom media\ntype](https://docs.github.com/enterprise-server@3.5/rest/reference/repos#custom-media-types) - to ensure the content is returned in a consistent\nobject format.\n\n**Note**:\n* + to ensure the content is returned in a consistent\nobject format.\n\n**Notes**:\n* \ To get a repository's contents recursively, you can [recursively get the tree](https://docs.github.com/enterprise-server@3.5/rest/reference/git#trees).\n* \ This API has an upper limit of 1,000 files for a directory. If you need - to retrieve more files, use the [Git Trees\nAPI](https://docs.github.com/enterprise-server@3.5/rest/reference/git#get-a-tree).\n* - \ This API supports files up to 1 megabyte in size.\n\n#### If the content - is a directory\nThe response will be an array of objects, one object for each - item in the directory.\nWhen listing the contents of a directory, submodules - have their \"type\" specified as \"file\". Logically, the value\n_should_ - be \"submodule\". This behavior exists in API v3 [for backwards compatibility - purposes](https://git.io/v1YCW).\nIn the next major version of the API, the - type will be returned as \"submodule\".\n\n#### If the content is a symlink - \nIf the requested `:path` points to a symlink, and the symlink's target is - a normal file in the repository, then the\nAPI responds with the content of - the file (in the format shown in the example. Otherwise, the API responds - with an object \ndescribing the symlink itself.\n\n#### If the content is - a submodule\nThe `submodule_git_url` identifies the location of the submodule - repository, and the `sha` identifies a specific\ncommit within the submodule - repository. Git uses the given URL when cloning the submodule repository, - and checks out\nthe submodule at that specific commit.\n\nIf the submodule - repository is not hosted on github.com, the Git URLs (`git_url` and `_links[\"git\"]`) - and the\ngithub.com URLs (`html_url` and `_links[\"html\"]`) will have null - values." + to retrieve more files, use the [Git Trees\nAPI](https://docs.github.com/enterprise-server@3.5/rest/reference/git#get-a-tree).\n + * Download URLs expire and are meant to be used just once. To ensure the + download URL does not expire, please use the contents API to obtain a fresh + download URL for each download. \n* This API supports files up to 1 megabyte + in size.\n\n#### If the content is a directory\nThe response will be an array + of objects, one object for each item in the directory.\nWhen listing the contents + of a directory, submodules have their \"type\" specified as \"file\". Logically, + the value\n_should_ be \"submodule\". This behavior exists in API v3 [for + backwards compatibility purposes](https://git.io/v1YCW).\nIn the next major + version of the API, the type will be returned as \"submodule\".\n\n#### If + the content is a symlink \nIf the requested `:path` points to a symlink, and + the symlink's target is a normal file in the repository, then the\nAPI responds + with the content of the file (in the format shown in the example. Otherwise, + the API responds with an object \ndescribing the symlink itself.\n\n#### If + the content is a submodule\nThe `submodule_git_url` identifies the location + of the submodule repository, and the `sha` identifies a specific\ncommit within + the submodule repository. Git uses the given URL when cloning the submodule + repository, and checks out\nthe submodule at that specific commit.\n\nIf the + submodule repository is not hosted on github.com, the Git URLs (`git_url` + and `_links[\"git\"]`) and the\ngithub.com URLs (`html_url` and `_links[\"html\"]`) + will have null values." tags: - repos operationId: repos/get-content @@ -24237,6 +24302,11 @@ paths: - maintain - triage - admin + examples: + default: + summary: Example request body + value: + permissions: write responses: '200': description: Response @@ -24961,6 +25031,13 @@ paths: enum: - open - closed + state_reason: + type: + - string + - 'null' + description: The reason for the current state + examples: + - not_planned milestone: oneOf: - type: string @@ -38034,13 +38111,6 @@ components: enum: - read - write - organization_custom_roles: - type: string - description: The level of permission to grant the access token for custom - roles management. - enum: - - read - - write deployments: type: string description: The level of permission to grant the access token for deployments @@ -65826,6 +65896,94 @@ components: - ci-test - linter protection_url: https://api.github.com/repos/octocat/hello-world/branches/master/protection + branch-get: + value: + name: main + commit: + sha: 7fd1a60b01f91b314f59955a4e4d4e80d8edf11d + node_id: MDY6Q29tbWl0MTI5NjI2OTo3ZmQxYTYwYjAxZjkxYjMxNGY1OTk1NWE0ZTRkNGU4MGQ4ZWRmMTFk + commit: + author: + name: The Octocat + email: octocat@nowhere.com + date: '2012-03-06T23:06:50Z' + committer: + name: The Octocat + email: octocat@nowhere.com + date: '2012-03-06T23:06:50Z' + message: |- + Merge pull request #6 from Spaceghost/patch-1 + + New line at end of file. + tree: + sha: b4eecafa9be2f2006ce1b709d6857b07069b4608 + url: https://api.github.com/repos/octocat/Hello-World/git/trees/b4eecafa9be2f2006ce1b709d6857b07069b4608 + url: https://api.github.com/repos/octocat/Hello-World/git/commits/7fd1a60b01f91b314f59955a4e4d4e80d8edf11d + comment_count: 77 + verification: + verified: false + reason: unsigned + signature: + payload: + url: https://api.github.com/repos/octocat/Hello-World/commits/7fd1a60b01f91b314f59955a4e4d4e80d8edf11d + html_url: https://github.com/octocat/Hello-World/commit/7fd1a60b01f91b314f59955a4e4d4e80d8edf11d + comments_url: https://api.github.com/repos/octocat/Hello-World/commits/7fd1a60b01f91b314f59955a4e4d4e80d8edf11d/comments + author: + login: octocat + id: 583231 + node_id: MDQ6VXNlcjU4MzIzMQ== + avatar_url: https://avatars.githubusercontent.com/u/583231?v=4 + gravatar_id: '' + url: https://api.github.com/users/octocat + html_url: https://github.com/octocat + followers_url: https://api.github.com/users/octocat/followers + following_url: https://api.github.com/users/octocat/following{/other_user} + gists_url: https://api.github.com/users/octocat/gists{/gist_id} + starred_url: https://api.github.com/users/octocat/starred{/owner}{/repo} + subscriptions_url: https://api.github.com/users/octocat/subscriptions + organizations_url: https://api.github.com/users/octocat/orgs + repos_url: https://api.github.com/users/octocat/repos + events_url: https://api.github.com/users/octocat/events{/privacy} + received_events_url: https://api.github.com/users/octocat/received_events + type: User + site_admin: false + committer: + login: octocat + id: 583231 + node_id: MDQ6VXNlcjU4MzIzMQ== + avatar_url: https://avatars.githubusercontent.com/u/583231?v=4 + gravatar_id: '' + url: https://api.github.com/users/octocat + html_url: https://github.com/octocat + followers_url: https://api.github.com/users/octocat/followers + following_url: https://api.github.com/users/octocat/following{/other_user} + gists_url: https://api.github.com/users/octocat/gists{/gist_id} + starred_url: https://api.github.com/users/octocat/starred{/owner}{/repo} + subscriptions_url: https://api.github.com/users/octocat/subscriptions + organizations_url: https://api.github.com/users/octocat/orgs + repos_url: https://api.github.com/users/octocat/repos + events_url: https://api.github.com/users/octocat/events{/privacy} + received_events_url: https://api.github.com/users/octocat/received_events + type: User + site_admin: false + parents: + - sha: 553c2077f0edc3d5dc5d17262f6aa498e69d6f8e + url: https://api.github.com/repos/octocat/Hello-World/commits/553c2077f0edc3d5dc5d17262f6aa498e69d6f8e + html_url: https://github.com/octocat/Hello-World/commit/553c2077f0edc3d5dc5d17262f6aa498e69d6f8e + - sha: 762941318ee16e59dabbacb1b4049eec22f0d303 + url: https://api.github.com/repos/octocat/Hello-World/commits/762941318ee16e59dabbacb1b4049eec22f0d303 + html_url: https://github.com/octocat/Hello-World/commit/762941318ee16e59dabbacb1b4049eec22f0d303 + _links: + self: https://api.github.com/repos/octocat/Hello-World/branches/main + html: https://github.com/octocat/Hello-World/tree/main + protected: false + protection: + enabled: false + required_status_checks: + enforcement_level: 'off' + contexts: [] + checks: [] + protection_url: https://api.github.com/repos/octocat/Hello-World/branches/main/protection branch-protection: value: url: https://api.github.com/repos/octocat/Hello-World/branches/master/protection @@ -65986,6 +66144,54 @@ components: enabled: true required_conversation_resolution: enabled: true + branch-protection-update: + value: + url: https://api.github.com/repos/octocat/hello-world/branches/main/protection + required_status_checks: + url: https://api.github.com/repos/octocat/hello-world/branches/main/protection/required_status_checks + strict: true + contexts: + - continuous-integration/travis-ci + contexts_url: https://api.github.com/repos/octocat/hello-world/branches/main/protection/required_status_checks/contexts + checks: + - context: continuous-integration/travis-ci + app_id: + restrictions: + url: https://api.github.com/repos/octocat/hello-world/branches/main/protection/restrictions + users_url: https://api.github.com/repos/octocat/hello-world/branches/main/protection/restrictions/users + teams_url: https://api.github.com/repos/octocat/hello-world/branches/main/protection/restrictions/teams + apps_url: https://api.github.com/repos/octocat/hello-world/branches/main/protection/restrictions/apps + users: [] + teams: [] + apps: [] + required_pull_request_reviews: + url: https://api.github.com/repos/octocat/hello-world/branches/main/protection/required_pull_request_reviews + dismiss_stale_reviews: true + require_code_owner_reviews: true + required_approving_review_count: 2 + dismissal_restrictions: + url: https://api.github.com/repos/octocat/hello-world/branches/main/protection/dismissal_restrictions + users_url: https://api.github.com/repos/octocat/hello-world/branches/main/protection/dismissal_restrictions/users + teams_url: https://api.github.com/repos/octocat/hello-world/branches/main/protection/dismissal_restrictions/teams + users: [] + teams: [] + apps: [] + required_signatures: + url: https://api.github.com/repos/octocat/hello-world/branches/main/protection/required_signatures + enabled: false + enforce_admins: + url: https://api.github.com/repos/octocat/hello-world/branches/main/protection/enforce_admins + enabled: true + required_linear_history: + enabled: true + allow_force_pushes: + enabled: true + allow_deletions: + enabled: true + block_creations: + enabled: true + required_conversation_resolution: + enabled: true protected-branch-admin-enforced-2: value: url: https://api.github.com/repos/octocat/Hello-World/branches/master/protection/enforce_admins @@ -67336,6 +67542,7 @@ components: - ref: refs/heads/main analysis_key: ".github/workflows/codeql-analysis.yml:CodeQL-Build" environment: '' + category: ".github/workflows/codeql-analysis.yml:CodeQL-Build" state: open fixed_at: commit_sha: 39406e42cb832f683daa691dd652a8dc36ee8930 @@ -70158,6 +70365,7 @@ components: type: User site_admin: false author_association: COLLABORATOR + state_reason: completed issue: value: id: 1 @@ -70303,6 +70511,7 @@ components: type: User site_admin: false author_association: COLLABORATOR + state_reason: completed issue-comment-items: value: - id: 1 @@ -70516,6 +70725,7 @@ components: created_at: '2011-04-22T13:33:48Z' updated_at: '2011-04-22T13:33:48Z' author_association: COLLABORATOR + state_reason: completed issue-event: value: id: 1 @@ -70705,6 +70915,7 @@ components: created_at: '2011-04-22T13:33:48Z' updated_at: '2011-04-22T13:33:48Z' author_association: COLLABORATOR + state_reason: completed issue-event-for-issue-items: value: - id: 1 @@ -74495,6 +74706,7 @@ components: score: 1 locked: true author_association: COLLABORATOR + state_reason: completed label-search-result-item-paginated: value: total_count: 2 diff --git a/descriptions-next/ghes-3.6/dereferenced/ghes-3.6.deref.json b/descriptions-next/ghes-3.6/dereferenced/ghes-3.6.deref.json index eabe14731a..f2404ccc60 100644 --- a/descriptions-next/ghes-3.6/dereferenced/ghes-3.6.deref.json +++ b/descriptions-next/ghes-3.6/dereferenced/ghes-3.6.deref.json @@ -4292,14 +4292,6 @@ "write" ] }, - "organization_custom_roles": { - "type": "string", - "description": "The level of permission to grant the access token for custom roles management.", - "enum": [ - "read", - "write" - ] - }, "deployments": { "type": "string", "description": "The level of permission to grant the access token for deployments and deployment statuses.", @@ -5537,14 +5529,6 @@ "write" ] }, - "organization_custom_roles": { - "type": "string", - "description": "The level of permission to grant the access token for custom roles management.", - "enum": [ - "read", - "write" - ] - }, "deployments": { "type": "string", "description": "The level of permission to grant the access token for deployments and deployment statuses.", @@ -6327,14 +6311,6 @@ "write" ] }, - "organization_custom_roles": { - "type": "string", - "description": "The level of permission to grant the access token for custom roles management.", - "enum": [ - "read", - "write" - ] - }, "deployments": { "type": "string", "description": "The level of permission to grant the access token for deployments and deployment statuses.", @@ -9323,14 +9299,6 @@ "write" ] }, - "organization_custom_roles": { - "type": "string", - "description": "The level of permission to grant the access token for custom roles management.", - "enum": [ - "read", - "write" - ] - }, "deployments": { "type": "string", "description": "The level of permission to grant the access token for deployments and deployment statuses.", @@ -10260,14 +10228,6 @@ "write" ] }, - "organization_custom_roles": { - "type": "string", - "description": "The level of permission to grant the access token for custom roles management.", - "enum": [ - "read", - "write" - ] - }, "deployments": { "type": "string", "description": "The level of permission to grant the access token for deployments and deployment statuses.", @@ -10983,14 +10943,6 @@ "write" ] }, - "organization_custom_roles": { - "type": "string", - "description": "The level of permission to grant the access token for custom roles management.", - "enum": [ - "read", - "write" - ] - }, "deployments": { "type": "string", "description": "The level of permission to grant the access token for deployments and deployment statuses.", @@ -11276,14 +11228,6 @@ "write" ] }, - "organization_custom_roles": { - "type": "string", - "description": "The level of permission to grant the access token for custom roles management.", - "enum": [ - "read", - "write" - ] - }, "deployments": { "type": "string", "description": "The level of permission to grant the access token for deployments and deployment statuses.", @@ -14786,14 +14730,6 @@ "write" ] }, - "organization_custom_roles": { - "type": "string", - "description": "The level of permission to grant the access token for custom roles management.", - "enum": [ - "read", - "write" - ] - }, "deployments": { "type": "string", "description": "The level of permission to grant the access token for deployments and deployment statuses.", @@ -15760,14 +15696,6 @@ "write" ] }, - "organization_custom_roles": { - "type": "string", - "description": "The level of permission to grant the access token for custom roles management.", - "enum": [ - "read", - "write" - ] - }, "deployments": { "type": "string", "description": "The level of permission to grant the access token for deployments and deployment statuses.", @@ -16606,14 +16534,6 @@ "write" ] }, - "organization_custom_roles": { - "type": "string", - "description": "The level of permission to grant the access token for custom roles management.", - "enum": [ - "read", - "write" - ] - }, "deployments": { "type": "string", "description": "The level of permission to grant the access token for deployments and deployment statuses.", @@ -17154,14 +17074,6 @@ "write" ] }, - "organization_custom_roles": { - "type": "string", - "description": "The level of permission to grant the access token for custom roles management.", - "enum": [ - "read", - "write" - ] - }, "deployments": { "type": "string", "description": "The level of permission to grant the access token for deployments and deployment statuses.", @@ -18665,14 +18577,6 @@ "write" ] }, - "organization_custom_roles": { - "type": "string", - "description": "The level of permission to grant the access token for custom roles management.", - "enum": [ - "read", - "write" - ] - }, "deployments": { "type": "string", "description": "The level of permission to grant the access token for deployments and deployment statuses.", @@ -19649,14 +19553,6 @@ "write" ] }, - "organization_custom_roles": { - "type": "string", - "description": "The level of permission to grant the access token for custom roles management.", - "enum": [ - "read", - "write" - ] - }, "deployments": { "type": "string", "description": "The level of permission to grant the access token for deployments and deployment statuses.", @@ -20706,14 +20602,6 @@ "write" ] }, - "organization_custom_roles": { - "type": "string", - "description": "The level of permission to grant the access token for custom roles management.", - "enum": [ - "read", - "write" - ] - }, "deployments": { "type": "string", "description": "The level of permission to grant the access token for deployments and deployment statuses.", @@ -21504,14 +21392,6 @@ "write" ] }, - "organization_custom_roles": { - "type": "string", - "description": "The level of permission to grant the access token for custom roles management.", - "enum": [ - "read", - "write" - ] - }, "deployments": { "type": "string", "description": "The level of permission to grant the access token for deployments and deployment statuses.", @@ -22539,14 +22419,6 @@ "write" ] }, - "organization_custom_roles": { - "type": "string", - "description": "The level of permission to grant the access token for custom roles management.", - "enum": [ - "read", - "write" - ] - }, "deployments": { "type": "string", "description": "The level of permission to grant the access token for deployments and deployment statuses.", @@ -23337,14 +23209,6 @@ "write" ] }, - "organization_custom_roles": { - "type": "string", - "description": "The level of permission to grant the access token for custom roles management.", - "enum": [ - "read", - "write" - ] - }, "deployments": { "type": "string", "description": "The level of permission to grant the access token for deployments and deployment statuses.", @@ -24246,14 +24110,6 @@ "write" ] }, - "organization_custom_roles": { - "type": "string", - "description": "The level of permission to grant the access token for custom roles management.", - "enum": [ - "read", - "write" - ] - }, "deployments": { "type": "string", "description": "The level of permission to grant the access token for deployments and deployment statuses.", @@ -25180,14 +25036,6 @@ "write" ] }, - "organization_custom_roles": { - "type": "string", - "description": "The level of permission to grant the access token for custom roles management.", - "enum": [ - "read", - "write" - ] - }, "deployments": { "type": "string", "description": "The level of permission to grant the access token for deployments and deployment statuses.", @@ -70494,7 +70342,7 @@ "/organizations/{organization_id}/custom_roles": { "get": { "summary": "List custom repository roles in an organization", - "description": "List the custom repository roles available in this organization. In order to see custom\nrepository roles in an organization, the authenticated user must be an organization owner.\n\nFor more information on custom repository roles, see \"[Managing custom repository roles for an organization](https://docs.github.com/enterprise-server@3.6/organizations/managing-peoples-access-to-your-organization-with-roles/managing-custom-repository-roles-for-an-organization)\".", + "description": "List the custom repository roles available in this organization. In order to see custom\nrepository roles in an organization, the authenticated user must be an organization owner.\n\nTo use this endpoint the authenticated user must be an administrator for the organization or of an repository of the organizaiton and must use an access token with `admin:org repo` scope.\nGitHub Apps must have the `organization_custom_roles:read` organization permission to use this endpoint.\n\nFor more information on custom repository roles, see \"[Managing custom repository roles for an organization](https://docs.github.com/enterprise-server@3.6/organizations/managing-peoples-access-to-your-organization-with-roles/managing-custom-repository-roles-for-an-organization)\".", "tags": [ "orgs" ], @@ -97631,14 +97479,6 @@ "write" ] }, - "organization_custom_roles": { - "type": "string", - "description": "The level of permission to grant the access token for custom roles management.", - "enum": [ - "read", - "write" - ] - }, "deployments": { "type": "string", "description": "The level of permission to grant the access token for deployments and deployment statuses.", @@ -98582,14 +98422,6 @@ "write" ] }, - "organization_custom_roles": { - "type": "string", - "description": "The level of permission to grant the access token for custom roles management.", - "enum": [ - "read", - "write" - ] - }, "deployments": { "type": "string", "description": "The level of permission to grant the access token for deployments and deployment statuses.", @@ -192223,6 +192055,115 @@ "protected", "protection_url" ] + }, + "examples": { + "default": { + "value": { + "name": "main", + "commit": { + "sha": "7fd1a60b01f91b314f59955a4e4d4e80d8edf11d", + "node_id": "MDY6Q29tbWl0MTI5NjI2OTo3ZmQxYTYwYjAxZjkxYjMxNGY1OTk1NWE0ZTRkNGU4MGQ4ZWRmMTFk", + "commit": { + "author": { + "name": "The Octocat", + "email": "octocat@nowhere.com", + "date": "2012-03-06T23:06:50Z" + }, + "committer": { + "name": "The Octocat", + "email": "octocat@nowhere.com", + "date": "2012-03-06T23:06:50Z" + }, + "message": "Merge pull request #6 from Spaceghost/patch-1\n\nNew line at end of file.", + "tree": { + "sha": "b4eecafa9be2f2006ce1b709d6857b07069b4608", + "url": "https://api.github.com/repos/octocat/Hello-World/git/trees/b4eecafa9be2f2006ce1b709d6857b07069b4608" + }, + "url": "https://api.github.com/repos/octocat/Hello-World/git/commits/7fd1a60b01f91b314f59955a4e4d4e80d8edf11d", + "comment_count": 77, + "verification": { + "verified": false, + "reason": "unsigned", + "signature": null, + "payload": null + } + }, + "url": "https://api.github.com/repos/octocat/Hello-World/commits/7fd1a60b01f91b314f59955a4e4d4e80d8edf11d", + "html_url": "https://github.com/octocat/Hello-World/commit/7fd1a60b01f91b314f59955a4e4d4e80d8edf11d", + "comments_url": "https://api.github.com/repos/octocat/Hello-World/commits/7fd1a60b01f91b314f59955a4e4d4e80d8edf11d/comments", + "author": { + "login": "octocat", + "id": 583231, + "node_id": "MDQ6VXNlcjU4MzIzMQ==", + "avatar_url": "https://avatars.githubusercontent.com/u/583231?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/octocat", + "html_url": "https://github.com/octocat", + "followers_url": "https://api.github.com/users/octocat/followers", + "following_url": "https://api.github.com/users/octocat/following{/other_user}", + "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}", + "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/octocat/subscriptions", + "organizations_url": "https://api.github.com/users/octocat/orgs", + "repos_url": "https://api.github.com/users/octocat/repos", + "events_url": "https://api.github.com/users/octocat/events{/privacy}", + "received_events_url": "https://api.github.com/users/octocat/received_events", + "type": "User", + "site_admin": false + }, + "committer": { + "login": "octocat", + "id": 583231, + "node_id": "MDQ6VXNlcjU4MzIzMQ==", + "avatar_url": "https://avatars.githubusercontent.com/u/583231?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/octocat", + "html_url": "https://github.com/octocat", + "followers_url": "https://api.github.com/users/octocat/followers", + "following_url": "https://api.github.com/users/octocat/following{/other_user}", + "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}", + "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/octocat/subscriptions", + "organizations_url": "https://api.github.com/users/octocat/orgs", + "repos_url": "https://api.github.com/users/octocat/repos", + "events_url": "https://api.github.com/users/octocat/events{/privacy}", + "received_events_url": "https://api.github.com/users/octocat/received_events", + "type": "User", + "site_admin": false + }, + "parents": [ + { + "sha": "553c2077f0edc3d5dc5d17262f6aa498e69d6f8e", + "url": "https://api.github.com/repos/octocat/Hello-World/commits/553c2077f0edc3d5dc5d17262f6aa498e69d6f8e", + "html_url": "https://github.com/octocat/Hello-World/commit/553c2077f0edc3d5dc5d17262f6aa498e69d6f8e" + }, + { + "sha": "762941318ee16e59dabbacb1b4049eec22f0d303", + "url": "https://api.github.com/repos/octocat/Hello-World/commits/762941318ee16e59dabbacb1b4049eec22f0d303", + "html_url": "https://github.com/octocat/Hello-World/commit/762941318ee16e59dabbacb1b4049eec22f0d303" + } + ] + }, + "_links": { + "self": "https://api.github.com/repos/octocat/Hello-World/branches/main", + "html": "https://github.com/octocat/Hello-World/tree/main" + }, + "protected": false, + "protection": { + "enabled": false, + "required_status_checks": { + "enforcement_level": "off", + "contexts": [ + + ], + "checks": [ + + ] + } + }, + "protection_url": "https://api.github.com/repos/octocat/Hello-World/branches/main/protection" + } + } } } } @@ -196730,6 +196671,85 @@ "required": [ "url" ] + }, + "examples": { + "default": { + "value": { + "url": "https://api.github.com/repos/octocat/hello-world/branches/main/protection", + "required_status_checks": { + "url": "https://api.github.com/repos/octocat/hello-world/branches/main/protection/required_status_checks", + "strict": true, + "contexts": [ + "continuous-integration/travis-ci" + ], + "contexts_url": "https://api.github.com/repos/octocat/hello-world/branches/main/protection/required_status_checks/contexts", + "checks": [ + { + "context": "continuous-integration/travis-ci", + "app_id": null + } + ] + }, + "restrictions": { + "url": "https://api.github.com/repos/octocat/hello-world/branches/main/protection/restrictions", + "users_url": "https://api.github.com/repos/octocat/hello-world/branches/main/protection/restrictions/users", + "teams_url": "https://api.github.com/repos/octocat/hello-world/branches/main/protection/restrictions/teams", + "apps_url": "https://api.github.com/repos/octocat/hello-world/branches/main/protection/restrictions/apps", + "users": [ + + ], + "teams": [ + + ], + "apps": [ + + ] + }, + "required_pull_request_reviews": { + "url": "https://api.github.com/repos/octocat/hello-world/branches/main/protection/required_pull_request_reviews", + "dismiss_stale_reviews": true, + "require_code_owner_reviews": true, + "required_approving_review_count": 2, + "dismissal_restrictions": { + "url": "https://api.github.com/repos/octocat/hello-world/branches/main/protection/dismissal_restrictions", + "users_url": "https://api.github.com/repos/octocat/hello-world/branches/main/protection/dismissal_restrictions/users", + "teams_url": "https://api.github.com/repos/octocat/hello-world/branches/main/protection/dismissal_restrictions/teams", + "users": [ + + ], + "teams": [ + + ], + "apps": [ + + ] + } + }, + "required_signatures": { + "url": "https://api.github.com/repos/octocat/hello-world/branches/main/protection/required_signatures", + "enabled": false + }, + "enforce_admins": { + "url": "https://api.github.com/repos/octocat/hello-world/branches/main/protection/enforce_admins", + "enabled": true + }, + "required_linear_history": { + "enabled": true + }, + "allow_force_pushes": { + "enabled": true + }, + "allow_deletions": { + "enabled": true + }, + "block_creations": { + "enabled": true + }, + "required_conversation_resolution": { + "enabled": true + } + } + } } } } @@ -201616,7 +201636,7 @@ "properties": { "contexts": { "type": "array", - "description": "contexts parameter", + "description": "The name of the status checks", "items": { "type": "string" } @@ -201633,12 +201653,23 @@ }, { "type": "array", - "description": "contexts parameter", + "description": "The name of the status checks", "items": { "type": "string" } } ] + }, + "examples": { + "default": { + "summary": "Example adding status checks to a branch protection rule", + "value": { + "contexts": [ + "continuous-integration/travis-ci", + "continuous-integration/jenkins" + ] + } + } } } } @@ -201853,7 +201884,7 @@ "properties": { "contexts": { "type": "array", - "description": "contexts parameter", + "description": "The name of the status checks", "items": { "type": "string" } @@ -201870,12 +201901,22 @@ }, { "type": "array", - "description": "contexts parameter", + "description": "The name of the status checks", "items": { "type": "string" } } ] + }, + "examples": { + "default": { + "summary": "Example updating status checks for a branch protection rule", + "value": { + "contexts": [ + "continuous-integration/travis-ci" + ] + } + } } } } @@ -202062,7 +202103,7 @@ "properties": { "contexts": { "type": "array", - "description": "contexts parameter", + "description": "The name of the status checks", "items": { "type": "string" } @@ -202079,12 +202120,22 @@ }, { "type": "array", - "description": "contexts parameter", + "description": "The name of the status checks", "items": { "type": "string" } } ] + }, + "examples": { + "default": { + "summary": "Example removing status checks from a branch protection rule", + "value": { + "contexts": [ + "continuous-integration/travis-ci" + ] + } + } } } } @@ -205206,7 +205257,7 @@ "properties": { "teams": { "type": "array", - "description": "teams parameter", + "description": "The slug values for teams", "items": { "type": "string" } @@ -205223,12 +205274,22 @@ }, { "type": "array", - "description": "teams parameter", + "description": "The slug values for teams", "items": { "type": "string" } } ] + }, + "examples": { + "default": { + "summary": "Example adding a team in a branch protection rule", + "value": { + "teams": [ + "justice-league" + ] + } + } } } } @@ -205600,7 +205661,7 @@ "properties": { "teams": { "type": "array", - "description": "teams parameter", + "description": "The slug values for teams", "items": { "type": "string" } @@ -205611,18 +205672,28 @@ ], "example": { "teams": [ - "my-team" + "justice-league" ] } }, { "type": "array", - "description": "teams parameter", + "description": "The slug values for teams", "items": { "type": "string" } } ] + }, + "examples": { + "default": { + "summary": "Example replacing a team in a branch protection rule", + "value": { + "teams": [ + "justice-league" + ] + } + } } } } @@ -205993,7 +206064,7 @@ "properties": { "teams": { "type": "array", - "description": "teams parameter", + "description": "The slug values for teams", "items": { "type": "string" } @@ -206010,12 +206081,22 @@ }, { "type": "array", - "description": "teams parameter", + "description": "The slug values for teams", "items": { "type": "string" } } ] + }, + "examples": { + "default": { + "summary": "Example removing a team in a branch protection rule", + "value": { + "teams": [ + "justice-league" + ] + } + } } } } @@ -206662,7 +206743,7 @@ "properties": { "users": { "type": "array", - "description": "users parameter", + "description": "The username for users", "items": { "type": "string" } @@ -206684,6 +206765,16 @@ } } ] + }, + "examples": { + "default": { + "summary": "Example adding a user in a branch protection rule", + "value": { + "users": [ + "octocat" + ] + } + } } } } @@ -207022,7 +207113,7 @@ "properties": { "users": { "type": "array", - "description": "users parameter", + "description": "The username for users", "items": { "type": "string" } @@ -207044,6 +207135,16 @@ } } ] + }, + "examples": { + "default": { + "summary": "Example replacing a user in a branch protection rule", + "value": { + "users": [ + "octocat" + ] + } + } } } } @@ -207381,7 +207482,7 @@ "properties": { "users": { "type": "array", - "description": "users parameter", + "description": "The username for users", "items": { "type": "string" } @@ -207403,6 +207504,16 @@ } } ] + }, + "examples": { + "default": { + "summary": "Example removing a user in a branch protection rule", + "value": { + "users": [ + "octocat" + ] + } + } } } } @@ -231080,6 +231191,7 @@ "ref": "refs/heads/main", "analysis_key": ".github/workflows/codeql-analysis.yml:CodeQL-Build", "environment": "", + "category": ".github/workflows/codeql-analysis.yml:CodeQL-Build", "state": "open", "fixed_at": null, "commit_sha": "39406e42cb832f683daa691dd652a8dc36ee8930", @@ -231887,7 +231999,7 @@ }, "delete": { "summary": "Delete a code scanning analysis from a repository", - "description": "Deletes a specified code scanning analysis from a repository. For\nprivate repositories, you must use an access token with the `repo` scope. For public repositories,\nyou must use an access token with `public_repo` scope.\nGitHub Apps must have the `security_events` write permission to use this endpoint.\n\nYou can delete one analysis at a time.\nTo delete a series of analyses, start with the most recent analysis and work backwards.\nConceptually, the process is similar to the undo function in a text editor.\n\nWhen you list the analyses for a repository,\none or more will be identified as deletable in the response:\n\n```\n\"deletable\": true\n```\n\nAn analysis is deletable when it's the most recent in a set of analyses.\nTypically, a repository will have multiple sets of analyses\nfor each enabled code scanning tool,\nwhere a set is determined by a unique combination of analysis values:\n\n* `ref`\n* `tool`\n* `analysis_key`\n* `environment`\n\nIf you attempt to delete an analysis that is not the most recent in a set,\nyou'll get a 400 response with the message:\n\n```\nAnalysis specified is not deletable.\n```\n\nThe response from a successful `DELETE` operation provides you with\ntwo alternative URLs for deleting the next analysis in the set:\n`next_analysis_url` and `confirm_delete_url`.\nUse the `next_analysis_url` URL if you want to avoid accidentally deleting the final analysis\nin a set. This is a useful option if you want to preserve at least one analysis\nfor the specified tool in your repository.\nUse the `confirm_delete_url` URL if you are content to remove all analyses for a tool.\nWhen you delete the last analysis in a set, the value of `next_analysis_url` and `confirm_delete_url`\nin the 200 response is `null`.\n\nAs an example of the deletion process,\nlet's imagine that you added a workflow that configured a particular code scanning tool\nto analyze the code in a repository. This tool has added 15 analyses:\n10 on the default branch, and another 5 on a topic branch.\nYou therefore have two separate sets of analyses for this tool.\nYou've now decided that you want to remove all of the analyses for the tool.\nTo do this you must make 15 separate deletion requests.\nTo start, you must find an analysis that's identified as deletable.\nEach set of analyses always has one that's identified as deletable.\nHaving found the deletable analysis for one of the two sets,\ndelete this analysis and then continue deleting the next analysis in the set until they're all deleted.\nThen repeat the process for the second set.\nThe procedure therefore consists of a nested loop:\n\n**Outer loop**:\n* List the analyses for the repository, filtered by tool.\n* Parse this list to find a deletable analysis. If found:\n\n **Inner loop**:\n * Delete the identified analysis.\n * Parse the response for the value of `confirm_delete_url` and, if found, use this in the next iteration.\n\nThe above process assumes that you want to remove all trace of the tool's analyses from the GitHub user interface, for the specified repository, and it therefore uses the `confirm_delete_url` value. Alternatively, you could use the `next_analysis_url` value, which would leave the last analysis in each set undeleted to avoid removing a tool's analysis entirely.", + "description": "Deletes a specified code scanning analysis from a repository. For\nprivate repositories, you must use an access token with the `repo` scope. For public repositories,\nyou must use an access token with `public_repo` scope.\nGitHub Apps must have the `security_events` write permission to use this endpoint.\n\nYou can delete one analysis at a time.\nTo delete a series of analyses, start with the most recent analysis and work backwards.\nConceptually, the process is similar to the undo function in a text editor.\n\nWhen you list the analyses for a repository,\none or more will be identified as deletable in the response:\n\n```\n\"deletable\": true\n```\n\nAn analysis is deletable when it's the most recent in a set of analyses.\nTypically, a repository will have multiple sets of analyses\nfor each enabled code scanning tool,\nwhere a set is determined by a unique combination of analysis values:\n\n* `ref`\n* `tool`\n* `category`\n\nIf you attempt to delete an analysis that is not the most recent in a set,\nyou'll get a 400 response with the message:\n\n```\nAnalysis specified is not deletable.\n```\n\nThe response from a successful `DELETE` operation provides you with\ntwo alternative URLs for deleting the next analysis in the set:\n`next_analysis_url` and `confirm_delete_url`.\nUse the `next_analysis_url` URL if you want to avoid accidentally deleting the final analysis\nin a set. This is a useful option if you want to preserve at least one analysis\nfor the specified tool in your repository.\nUse the `confirm_delete_url` URL if you are content to remove all analyses for a tool.\nWhen you delete the last analysis in a set, the value of `next_analysis_url` and `confirm_delete_url`\nin the 200 response is `null`.\n\nAs an example of the deletion process,\nlet's imagine that you added a workflow that configured a particular code scanning tool\nto analyze the code in a repository. This tool has added 15 analyses:\n10 on the default branch, and another 5 on a topic branch.\nYou therefore have two separate sets of analyses for this tool.\nYou've now decided that you want to remove all of the analyses for the tool.\nTo do this you must make 15 separate deletion requests.\nTo start, you must find an analysis that's identified as deletable.\nEach set of analyses always has one that's identified as deletable.\nHaving found the deletable analysis for one of the two sets,\ndelete this analysis and then continue deleting the next analysis in the set until they're all deleted.\nThen repeat the process for the second set.\nThe procedure therefore consists of a nested loop:\n\n**Outer loop**:\n* List the analyses for the repository, filtered by tool.\n* Parse this list to find a deletable analysis. If found:\n\n **Inner loop**:\n * Delete the identified analysis.\n * Parse the response for the value of `confirm_delete_url` and, if found, use this in the next iteration.\n\nThe above process assumes that you want to remove all trace of the tool's analyses from the GitHub user interface, for the specified repository, and it therefore uses the `confirm_delete_url` value. Alternatively, you could use the `next_analysis_url` value, which would leave the last analysis in each set undeleted to avoid removing a tool's analysis entirely.", "operationId": "code-scanning/delete-analysis", "tags": [ "code-scanning" @@ -257648,7 +257760,7 @@ "/repos/{owner}/{repo}/contents/{path}": { "get": { "summary": "Get repository content", - "description": "Gets the contents of a file or directory in a repository. Specify the file path or directory in `:path`. If you omit\n`:path`, you will receive the contents of the repository's root directory. See the description below regarding what the API response includes for directories. \n\nFiles and symlinks support [a custom media type](https://docs.github.com/enterprise-server@3.6/rest/reference/repos#custom-media-types) for\nretrieving the raw content or rendered HTML (when supported). All content types support [a custom media\ntype](https://docs.github.com/enterprise-server@3.6/rest/reference/repos#custom-media-types) to ensure the content is returned in a consistent\nobject format.\n\n**Note**:\n* To get a repository's contents recursively, you can [recursively get the tree](https://docs.github.com/enterprise-server@3.6/rest/reference/git#trees).\n* This API has an upper limit of 1,000 files for a directory. If you need to retrieve more files, use the [Git Trees\nAPI](https://docs.github.com/enterprise-server@3.6/rest/reference/git#get-a-tree).\n\n#### Size limits\nIf the requested file's size is:\n* 1 MB or smaller: All features of this endpoint are supported.\n* Between 1-100 MB: Only the `raw` or `object` [custom media types](https://docs.github.com/enterprise-server@3.6/rest/repos/contents#custom-media-types-for-repository-contents) are supported. Both will work as normal, except that when using the `object` media type, the `content` field will be an empty string and the `encoding` field will be `\"none\"`. To get the contents of these larger files, use the `raw` media type.\n * Greater than 100 MB: This endpoint is not supported.\n\n#### If the content is a directory\nThe response will be an array of objects, one object for each item in the directory.\nWhen listing the contents of a directory, submodules have their \"type\" specified as \"file\". Logically, the value\n_should_ be \"submodule\". This behavior exists in API v3 [for backwards compatibility purposes](https://git.io/v1YCW).\nIn the next major version of the API, the type will be returned as \"submodule\".\n\n#### If the content is a symlink \nIf the requested `:path` points to a symlink, and the symlink's target is a normal file in the repository, then the\nAPI responds with the content of the file (in the format shown in the example. Otherwise, the API responds with an object \ndescribing the symlink itself.\n\n#### If the content is a submodule\nThe `submodule_git_url` identifies the location of the submodule repository, and the `sha` identifies a specific\ncommit within the submodule repository. Git uses the given URL when cloning the submodule repository, and checks out\nthe submodule at that specific commit.\n\nIf the submodule repository is not hosted on github.com, the Git URLs (`git_url` and `_links[\"git\"]`) and the\ngithub.com URLs (`html_url` and `_links[\"html\"]`) will have null values.", + "description": "Gets the contents of a file or directory in a repository. Specify the file path or directory in `:path`. If you omit\n`:path`, you will receive the contents of the repository's root directory. See the description below regarding what the API response includes for directories. \n\nFiles and symlinks support [a custom media type](https://docs.github.com/enterprise-server@3.6/rest/reference/repos#custom-media-types) for\nretrieving the raw content or rendered HTML (when supported). All content types support [a custom media\ntype](https://docs.github.com/enterprise-server@3.6/rest/reference/repos#custom-media-types) to ensure the content is returned in a consistent\nobject format.\n\n**Notes**:\n* To get a repository's contents recursively, you can [recursively get the tree](https://docs.github.com/enterprise-server@3.6/rest/reference/git#trees).\n* This API has an upper limit of 1,000 files for a directory. If you need to retrieve more files, use the [Git Trees\nAPI](https://docs.github.com/enterprise-server@3.6/rest/reference/git#get-a-tree).\n * Download URLs expire and are meant to be used just once. To ensure the download URL does not expire, please use the contents API to obtain a fresh download URL for each download.\n#### Size limits\nIf the requested file's size is:\n* 1 MB or smaller: All features of this endpoint are supported.\n* Between 1-100 MB: Only the `raw` or `object` [custom media types](https://docs.github.com/enterprise-server@3.6/rest/repos/contents#custom-media-types-for-repository-contents) are supported. Both will work as normal, except that when using the `object` media type, the `content` field will be an empty string and the `encoding` field will be `\"none\"`. To get the contents of these larger files, use the `raw` media type.\n * Greater than 100 MB: This endpoint is not supported.\n\n#### If the content is a directory\nThe response will be an array of objects, one object for each item in the directory.\nWhen listing the contents of a directory, submodules have their \"type\" specified as \"file\". Logically, the value\n_should_ be \"submodule\". This behavior exists in API v3 [for backwards compatibility purposes](https://git.io/v1YCW).\nIn the next major version of the API, the type will be returned as \"submodule\".\n\n#### If the content is a symlink \nIf the requested `:path` points to a symlink, and the symlink's target is a normal file in the repository, then the\nAPI responds with the content of the file (in the format shown in the example. Otherwise, the API responds with an object \ndescribing the symlink itself.\n\n#### If the content is a submodule\nThe `submodule_git_url` identifies the location of the submodule repository, and the `sha` identifies a specific\ncommit within the submodule repository. Git uses the given URL when cloning the submodule repository, and checks out\nthe submodule at that specific commit.\n\nIf the submodule repository is not hosted on github.com, the Git URLs (`git_url` and `_links[\"git\"]`) and the\ngithub.com URLs (`html_url` and `_links[\"html\"]`) will have null values.", "tags": [ "repos" ], @@ -288594,14 +288706,6 @@ "write" ] }, - "organization_custom_roles": { - "type": "string", - "description": "The level of permission to grant the access token for custom roles management.", - "enum": [ - "read", - "write" - ] - }, "deployments": { "type": "string", "description": "The level of permission to grant the access token for deployments and deployment statuses.", @@ -292053,6 +292157,14 @@ ] } } + }, + "examples": { + "default": { + "summary": "Example request body", + "value": { + "permissions": "write" + } + } } } } @@ -298247,7 +298359,8 @@ "type": "User", "site_admin": false }, - "author_association": "COLLABORATOR" + "author_association": "COLLABORATOR", + "state_reason": "completed" } ] } @@ -301778,7 +301891,8 @@ "type": "User", "site_admin": false }, - "author_association": "COLLABORATOR" + "author_association": "COLLABORATOR", + "state_reason": "completed" } } } @@ -310510,7 +310624,8 @@ "closed_at": null, "created_at": "2011-04-22T13:33:48Z", "updated_at": "2011-04-22T13:33:48Z", - "author_association": "COLLABORATOR" + "author_association": "COLLABORATOR", + "state_reason": "completed" } } ] @@ -315525,7 +315640,8 @@ "closed_at": null, "created_at": "2011-04-22T13:33:48Z", "updated_at": "2011-04-22T13:33:48Z", - "author_association": "COLLABORATOR" + "author_association": "COLLABORATOR", + "state_reason": "completed" } } } @@ -318901,7 +319017,8 @@ "type": "User", "site_admin": false }, - "author_association": "COLLABORATOR" + "author_association": "COLLABORATOR", + "state_reason": "completed" } } } @@ -319082,6 +319199,16 @@ "closed" ] }, + "state_reason": { + "type": [ + "string", + "null" + ], + "description": "The reason for the current state", + "examples": [ + "not_planned" + ] + }, "milestone": { "oneOf": [ { @@ -322400,7 +322527,8 @@ "type": "User", "site_admin": false }, - "author_association": "COLLABORATOR" + "author_association": "COLLABORATOR", + "state_reason": "completed" } } } @@ -325926,7 +326054,8 @@ "type": "User", "site_admin": false }, - "author_association": "COLLABORATOR" + "author_association": "COLLABORATOR", + "state_reason": "completed" } } } @@ -329249,7 +329378,8 @@ "type": "User", "site_admin": false }, - "author_association": "COLLABORATOR" + "author_association": "COLLABORATOR", + "state_reason": "completed" } } } @@ -441115,7 +441245,8 @@ "body": "...", "score": 1, "locked": true, - "author_association": "COLLABORATOR" + "author_association": "COLLABORATOR", + "state_reason": "completed" } ] } @@ -465074,14 +465205,6 @@ "write" ] }, - "organization_custom_roles": { - "type": "string", - "description": "The level of permission to grant the access token for custom roles management.", - "enum": [ - "read", - "write" - ] - }, "deployments": { "type": "string", "description": "The level of permission to grant the access token for deployments and deployment statuses.", @@ -510216,14 +510339,6 @@ "write" ] }, - "organization_custom_roles": { - "type": "string", - "description": "The level of permission to grant the access token for custom roles management.", - "enum": [ - "read", - "write" - ] - }, "deployments": { "type": "string", "description": "The level of permission to grant the access token for deployments and deployment statuses.", diff --git a/descriptions-next/ghes-3.6/dereferenced/ghes-3.6.deref.yaml b/descriptions-next/ghes-3.6/dereferenced/ghes-3.6.deref.yaml index 0799567477..9f6822f5a5 100644 --- a/descriptions-next/ghes-3.6/dereferenced/ghes-3.6.deref.yaml +++ b/descriptions-next/ghes-3.6/dereferenced/ghes-3.6.deref.yaml @@ -2529,13 +2529,6 @@ paths: enum: - read - write - organization_custom_roles: - type: string - description: The level of permission to grant the - access token for custom roles management. - enum: - - read - - write deployments: type: string description: The level of permission to grant the @@ -16823,6 +16816,9 @@ paths: List the custom repository roles available in this organization. In order to see custom repository roles in an organization, the authenticated user must be an organization owner. + To use this endpoint the authenticated user must be an administrator for the organization or of an repository of the organizaiton and must use an access token with `admin:org repo` scope. + GitHub Apps must have the `organization_custom_roles:read` organization permission to use this endpoint. + For more information on custom repository roles, see "[Managing custom repository roles for an organization](https://docs.github.com/enterprise-server@3.6/organizations/managing-peoples-access-to-your-organization-with-roles/managing-custom-repository-roles-for-an-organization)". tags: - orgs @@ -35836,6 +35832,95 @@ paths: - protection - protected - protection_url + examples: + default: + value: + name: main + commit: + sha: 7fd1a60b01f91b314f59955a4e4d4e80d8edf11d + node_id: MDY6Q29tbWl0MTI5NjI2OTo3ZmQxYTYwYjAxZjkxYjMxNGY1OTk1NWE0ZTRkNGU4MGQ4ZWRmMTFk + commit: + author: + name: The Octocat + email: octocat@nowhere.com + date: '2012-03-06T23:06:50Z' + committer: + name: The Octocat + email: octocat@nowhere.com + date: '2012-03-06T23:06:50Z' + message: |- + Merge pull request #6 from Spaceghost/patch-1 + + New line at end of file. + tree: + sha: b4eecafa9be2f2006ce1b709d6857b07069b4608 + url: https://api.github.com/repos/octocat/Hello-World/git/trees/b4eecafa9be2f2006ce1b709d6857b07069b4608 + url: https://api.github.com/repos/octocat/Hello-World/git/commits/7fd1a60b01f91b314f59955a4e4d4e80d8edf11d + comment_count: 77 + verification: + verified: false + reason: unsigned + signature: + payload: + url: https://api.github.com/repos/octocat/Hello-World/commits/7fd1a60b01f91b314f59955a4e4d4e80d8edf11d + html_url: https://github.com/octocat/Hello-World/commit/7fd1a60b01f91b314f59955a4e4d4e80d8edf11d + comments_url: https://api.github.com/repos/octocat/Hello-World/commits/7fd1a60b01f91b314f59955a4e4d4e80d8edf11d/comments + author: + login: octocat + id: 583231 + node_id: MDQ6VXNlcjU4MzIzMQ== + avatar_url: https://avatars.githubusercontent.com/u/583231?v=4 + gravatar_id: '' + url: https://api.github.com/users/octocat + html_url: https://github.com/octocat + followers_url: https://api.github.com/users/octocat/followers + following_url: https://api.github.com/users/octocat/following{/other_user} + gists_url: https://api.github.com/users/octocat/gists{/gist_id} + starred_url: https://api.github.com/users/octocat/starred{/owner}{/repo} + subscriptions_url: https://api.github.com/users/octocat/subscriptions + organizations_url: https://api.github.com/users/octocat/orgs + repos_url: https://api.github.com/users/octocat/repos + events_url: https://api.github.com/users/octocat/events{/privacy} + received_events_url: https://api.github.com/users/octocat/received_events + type: User + site_admin: false + committer: + login: octocat + id: 583231 + node_id: MDQ6VXNlcjU4MzIzMQ== + avatar_url: https://avatars.githubusercontent.com/u/583231?v=4 + gravatar_id: '' + url: https://api.github.com/users/octocat + html_url: https://github.com/octocat + followers_url: https://api.github.com/users/octocat/followers + following_url: https://api.github.com/users/octocat/following{/other_user} + gists_url: https://api.github.com/users/octocat/gists{/gist_id} + starred_url: https://api.github.com/users/octocat/starred{/owner}{/repo} + subscriptions_url: https://api.github.com/users/octocat/subscriptions + organizations_url: https://api.github.com/users/octocat/orgs + repos_url: https://api.github.com/users/octocat/repos + events_url: https://api.github.com/users/octocat/events{/privacy} + received_events_url: https://api.github.com/users/octocat/received_events + type: User + site_admin: false + parents: + - sha: 553c2077f0edc3d5dc5d17262f6aa498e69d6f8e + url: https://api.github.com/repos/octocat/Hello-World/commits/553c2077f0edc3d5dc5d17262f6aa498e69d6f8e + html_url: https://github.com/octocat/Hello-World/commit/553c2077f0edc3d5dc5d17262f6aa498e69d6f8e + - sha: 762941318ee16e59dabbacb1b4049eec22f0d303 + url: https://api.github.com/repos/octocat/Hello-World/commits/762941318ee16e59dabbacb1b4049eec22f0d303 + html_url: https://github.com/octocat/Hello-World/commit/762941318ee16e59dabbacb1b4049eec22f0d303 + _links: + self: https://api.github.com/repos/octocat/Hello-World/branches/main + html: https://github.com/octocat/Hello-World/tree/main + protected: false + protection: + enabled: false + required_status_checks: + enforcement_level: 'off' + contexts: [] + checks: [] + protection_url: https://api.github.com/repos/octocat/Hello-World/branches/main/protection '301': *207 '404': *33 x-github: @@ -36465,6 +36550,55 @@ paths: - enabled required: - url + examples: + default: + value: + url: https://api.github.com/repos/octocat/hello-world/branches/main/protection + required_status_checks: + url: https://api.github.com/repos/octocat/hello-world/branches/main/protection/required_status_checks + strict: true + contexts: + - continuous-integration/travis-ci + contexts_url: https://api.github.com/repos/octocat/hello-world/branches/main/protection/required_status_checks/contexts + checks: + - context: continuous-integration/travis-ci + app_id: + restrictions: + url: https://api.github.com/repos/octocat/hello-world/branches/main/protection/restrictions + users_url: https://api.github.com/repos/octocat/hello-world/branches/main/protection/restrictions/users + teams_url: https://api.github.com/repos/octocat/hello-world/branches/main/protection/restrictions/teams + apps_url: https://api.github.com/repos/octocat/hello-world/branches/main/protection/restrictions/apps + users: [] + teams: [] + apps: [] + required_pull_request_reviews: + url: https://api.github.com/repos/octocat/hello-world/branches/main/protection/required_pull_request_reviews + dismiss_stale_reviews: true + require_code_owner_reviews: true + required_approving_review_count: 2 + dismissal_restrictions: + url: https://api.github.com/repos/octocat/hello-world/branches/main/protection/dismissal_restrictions + users_url: https://api.github.com/repos/octocat/hello-world/branches/main/protection/dismissal_restrictions/users + teams_url: https://api.github.com/repos/octocat/hello-world/branches/main/protection/dismissal_restrictions/teams + users: [] + teams: [] + apps: [] + required_signatures: + url: https://api.github.com/repos/octocat/hello-world/branches/main/protection/required_signatures + enabled: false + enforce_admins: + url: https://api.github.com/repos/octocat/hello-world/branches/main/protection/enforce_admins + enabled: true + required_linear_history: + enabled: true + allow_force_pushes: + enabled: true + allow_deletions: + enabled: true + block_creations: + enabled: true + required_conversation_resolution: + enabled: true '403': *35 '422': *83 '404': *33 @@ -37128,7 +37262,7 @@ paths: properties: contexts: type: array - description: contexts parameter + description: The name of the status checks items: type: string required: @@ -37137,9 +37271,16 @@ paths: contexts: - contexts - type: array - description: contexts parameter + description: The name of the status checks items: type: string + examples: + default: + summary: Example adding status checks to a branch protection rule + value: + contexts: + - continuous-integration/travis-ci + - continuous-integration/jenkins responses: '200': description: Response @@ -37190,7 +37331,7 @@ paths: properties: contexts: type: array - description: contexts parameter + description: The name of the status checks items: type: string required: @@ -37199,9 +37340,15 @@ paths: contexts: - contexts - type: array - description: contexts parameter + description: The name of the status checks items: type: string + examples: + default: + summary: Example updating status checks for a branch protection rule + value: + contexts: + - continuous-integration/travis-ci responses: '200': description: Response @@ -37249,7 +37396,7 @@ paths: properties: contexts: type: array - description: contexts parameter + description: The name of the status checks items: type: string required: @@ -37258,9 +37405,15 @@ paths: contexts: - contexts - type: array - description: contexts parameter + description: The name of the status checks items: type: string + examples: + default: + summary: Example removing status checks from a branch protection rule + value: + contexts: + - continuous-integration/travis-ci responses: '200': description: Response @@ -37713,7 +37866,7 @@ paths: properties: teams: type: array - description: teams parameter + description: The slug values for teams items: type: string required: @@ -37722,9 +37875,15 @@ paths: teams: - my-team - type: array - description: teams parameter + description: The slug values for teams items: type: string + examples: + default: + summary: Example adding a team in a branch protection rule + value: + teams: + - justice-league responses: '200': description: Response @@ -37772,18 +37931,24 @@ paths: properties: teams: type: array - description: teams parameter + description: The slug values for teams items: type: string required: - teams example: teams: - - my-team + - justice-league - type: array - description: teams parameter + description: The slug values for teams items: type: string + examples: + default: + summary: Example replacing a team in a branch protection rule + value: + teams: + - justice-league responses: '200': description: Response @@ -37830,7 +37995,7 @@ paths: properties: teams: type: array - description: teams parameter + description: The slug values for teams items: type: string required: @@ -37839,9 +38004,15 @@ paths: teams: - my-team - type: array - description: teams parameter + description: The slug values for teams items: type: string + examples: + default: + summary: Example removing a team in a branch protection rule + value: + teams: + - justice-league responses: '200': description: Response @@ -37922,7 +38093,7 @@ paths: properties: users: type: array - description: users parameter + description: The username for users items: type: string required: @@ -37933,6 +38104,12 @@ paths: - type: array items: type: string + examples: + default: + summary: Example adding a user in a branch protection rule + value: + users: + - octocat responses: '200': description: Response @@ -37980,7 +38157,7 @@ paths: properties: users: type: array - description: users parameter + description: The username for users items: type: string required: @@ -37991,6 +38168,12 @@ paths: - type: array items: type: string + examples: + default: + summary: Example replacing a user in a branch protection rule + value: + users: + - octocat responses: '200': description: Response @@ -38037,7 +38220,7 @@ paths: properties: users: type: array - description: users parameter + description: The username for users items: type: string required: @@ -38048,6 +38231,12 @@ paths: - type: array items: type: string + examples: + default: + summary: Example removing a user in a branch protection rule + value: + users: + - octocat responses: '200': description: Response @@ -40963,6 +41152,7 @@ paths: - ref: refs/heads/main analysis_key: ".github/workflows/codeql-analysis.yml:CodeQL-Build" environment: '' + category: ".github/workflows/codeql-analysis.yml:CodeQL-Build" state: open fixed_at: commit_sha: 39406e42cb832f683daa691dd652a8dc36ee8930 @@ -41301,8 +41491,7 @@ paths: * `ref` * `tool` - * `analysis_key` - * `environment` + * `category` If you attempt to delete an analysis that is not the most recent in a set, you'll get a 400 response with the message: @@ -45027,14 +45216,16 @@ paths: support [a custom media type](https://docs.github.com/enterprise-server@3.6/rest/reference/repos#custom-media-types) for\nretrieving the raw content or rendered HTML (when supported). All content types support [a custom media\ntype](https://docs.github.com/enterprise-server@3.6/rest/reference/repos#custom-media-types) - to ensure the content is returned in a consistent\nobject format.\n\n**Note**:\n* + to ensure the content is returned in a consistent\nobject format.\n\n**Notes**:\n* \ To get a repository's contents recursively, you can [recursively get the tree](https://docs.github.com/enterprise-server@3.6/rest/reference/git#trees).\n* \ This API has an upper limit of 1,000 files for a directory. If you need - to retrieve more files, use the [Git Trees\nAPI](https://docs.github.com/enterprise-server@3.6/rest/reference/git#get-a-tree).\n\n#### - Size limits\nIf the requested file's size is:\n* 1 MB or smaller: All features - of this endpoint are supported.\n* Between 1-100 MB: Only the `raw` or `object` - [custom media types](https://docs.github.com/enterprise-server@3.6/rest/repos/contents#custom-media-types-for-repository-contents) + to retrieve more files, use the [Git Trees\nAPI](https://docs.github.com/enterprise-server@3.6/rest/reference/git#get-a-tree).\n + * Download URLs expire and are meant to be used just once. To ensure the + download URL does not expire, please use the contents API to obtain a fresh + download URL for each download.\n#### Size limits\nIf the requested file's + size is:\n* 1 MB or smaller: All features of this endpoint are supported.\n* + Between 1-100 MB: Only the `raw` or `object` [custom media types](https://docs.github.com/enterprise-server@3.6/rest/repos/contents#custom-media-types-for-repository-contents) are supported. Both will work as normal, except that when using the `object` media type, the `content` field will be an empty string and the `encoding` field will be `\"none\"`. To get the contents of these larger files, use the @@ -50581,6 +50772,11 @@ paths: - maintain - triage - admin + examples: + default: + summary: Example request body + value: + permissions: write responses: '200': description: Response @@ -50958,6 +51154,7 @@ paths: type: User site_admin: false author_association: COLLABORATOR + state_reason: completed headers: Link: *6 '301': *207 @@ -51210,6 +51407,7 @@ paths: type: User site_admin: false author_association: COLLABORATOR + state_reason: completed headers: Location: example: https://api.github.com/repos/octocat/Hello-World/issues/1347 @@ -51911,6 +52109,7 @@ paths: created_at: '2011-04-22T13:33:48Z' updated_at: '2011-04-22T13:33:48Z' author_association: COLLABORATOR + state_reason: completed headers: Link: *6 '422': *29 @@ -52133,6 +52332,7 @@ paths: created_at: '2011-04-22T13:33:48Z' updated_at: '2011-04-22T13:33:48Z' author_association: COLLABORATOR + state_reason: completed '404': *33 '410': *169 '403': *35 @@ -52235,6 +52435,13 @@ paths: enum: - open - closed + state_reason: + type: + - string + - 'null' + description: The reason for the current state + examples: + - not_planned milestone: oneOf: - type: string @@ -66601,6 +66808,7 @@ paths: score: 1 locked: true author_association: COLLABORATOR + state_reason: completed '503': *87 '422': *29 '304': *38 diff --git a/descriptions-next/ghes-3.6/ghes-3.6.json b/descriptions-next/ghes-3.6/ghes-3.6.json index 4cc43aa75b..b0ffc0ef66 100644 --- a/descriptions-next/ghes-3.6/ghes-3.6.json +++ b/descriptions-next/ghes-3.6/ghes-3.6.json @@ -9539,7 +9539,7 @@ "/organizations/{organization_id}/custom_roles": { "get": { "summary": "List custom repository roles in an organization", - "description": "List the custom repository roles available in this organization. In order to see custom\nrepository roles in an organization, the authenticated user must be an organization owner.\n\nFor more information on custom repository roles, see \"[Managing custom repository roles for an organization](https://docs.github.com/enterprise-server@3.6/organizations/managing-peoples-access-to-your-organization-with-roles/managing-custom-repository-roles-for-an-organization)\".", + "description": "List the custom repository roles available in this organization. In order to see custom\nrepository roles in an organization, the authenticated user must be an organization owner.\n\nTo use this endpoint the authenticated user must be an administrator for the organization or of an repository of the organizaiton and must use an access token with `admin:org repo` scope.\nGitHub Apps must have the `organization_custom_roles:read` organization permission to use this endpoint.\n\nFor more information on custom repository roles, see \"[Managing custom repository roles for an organization](https://docs.github.com/enterprise-server@3.6/organizations/managing-peoples-access-to-your-organization-with-roles/managing-custom-repository-roles-for-an-organization)\".", "tags": [ "orgs" ], @@ -23353,6 +23353,11 @@ "application/json": { "schema": { "$ref": "#/components/schemas/branch-with-protection" + }, + "examples": { + "default": { + "$ref": "#/components/examples/branch-get" + } } } } @@ -23703,6 +23708,11 @@ "application/json": { "schema": { "$ref": "#/components/schemas/protected-branch" + }, + "examples": { + "default": { + "$ref": "#/components/examples/branch-protection-update" + } } } } @@ -24552,7 +24562,7 @@ "properties": { "contexts": { "type": "array", - "description": "contexts parameter", + "description": "The name of the status checks", "items": { "type": "string" } @@ -24569,12 +24579,23 @@ }, { "type": "array", - "description": "contexts parameter", + "description": "The name of the status checks", "items": { "type": "string" } } ] + }, + "examples": { + "default": { + "summary": "Example adding status checks to a branch protection rule", + "value": { + "contexts": [ + "continuous-integration/travis-ci", + "continuous-integration/jenkins" + ] + } + } } } } @@ -24652,7 +24673,7 @@ "properties": { "contexts": { "type": "array", - "description": "contexts parameter", + "description": "The name of the status checks", "items": { "type": "string" } @@ -24669,12 +24690,22 @@ }, { "type": "array", - "description": "contexts parameter", + "description": "The name of the status checks", "items": { "type": "string" } } ] + }, + "examples": { + "default": { + "summary": "Example updating status checks for a branch protection rule", + "value": { + "contexts": [ + "continuous-integration/travis-ci" + ] + } + } } } } @@ -24747,7 +24778,7 @@ "properties": { "contexts": { "type": "array", - "description": "contexts parameter", + "description": "The name of the status checks", "items": { "type": "string" } @@ -24764,12 +24795,22 @@ }, { "type": "array", - "description": "contexts parameter", + "description": "The name of the status checks", "items": { "type": "string" } } ] + }, + "examples": { + "default": { + "summary": "Example removing status checks from a branch protection rule", + "value": { + "contexts": [ + "continuous-integration/travis-ci" + ] + } + } } } } @@ -25305,7 +25346,7 @@ "properties": { "teams": { "type": "array", - "description": "teams parameter", + "description": "The slug values for teams", "items": { "type": "string" } @@ -25322,12 +25363,22 @@ }, { "type": "array", - "description": "teams parameter", + "description": "The slug values for teams", "items": { "type": "string" } } ] + }, + "examples": { + "default": { + "summary": "Example adding a team in a branch protection rule", + "value": { + "teams": [ + "justice-league" + ] + } + } } } } @@ -25396,7 +25447,7 @@ "properties": { "teams": { "type": "array", - "description": "teams parameter", + "description": "The slug values for teams", "items": { "type": "string" } @@ -25407,18 +25458,28 @@ ], "example": { "teams": [ - "my-team" + "justice-league" ] } }, { "type": "array", - "description": "teams parameter", + "description": "The slug values for teams", "items": { "type": "string" } } ] + }, + "examples": { + "default": { + "summary": "Example replacing a team in a branch protection rule", + "value": { + "teams": [ + "justice-league" + ] + } + } } } } @@ -25486,7 +25547,7 @@ "properties": { "teams": { "type": "array", - "description": "teams parameter", + "description": "The slug values for teams", "items": { "type": "string" } @@ -25503,12 +25564,22 @@ }, { "type": "array", - "description": "teams parameter", + "description": "The slug values for teams", "items": { "type": "string" } } ] + }, + "examples": { + "default": { + "summary": "Example removing a team in a branch protection rule", + "value": { + "teams": [ + "justice-league" + ] + } + } } } } @@ -25631,7 +25702,7 @@ "properties": { "users": { "type": "array", - "description": "users parameter", + "description": "The username for users", "items": { "type": "string" } @@ -25653,6 +25724,16 @@ } } ] + }, + "examples": { + "default": { + "summary": "Example adding a user in a branch protection rule", + "value": { + "users": [ + "octocat" + ] + } + } } } } @@ -25721,7 +25802,7 @@ "properties": { "users": { "type": "array", - "description": "users parameter", + "description": "The username for users", "items": { "type": "string" } @@ -25743,6 +25824,16 @@ } } ] + }, + "examples": { + "default": { + "summary": "Example replacing a user in a branch protection rule", + "value": { + "users": [ + "octocat" + ] + } + } } } } @@ -25810,7 +25901,7 @@ "properties": { "users": { "type": "array", - "description": "users parameter", + "description": "The username for users", "items": { "type": "string" } @@ -25832,6 +25923,16 @@ } } ] + }, + "examples": { + "default": { + "summary": "Example removing a user in a branch protection rule", + "value": { + "users": [ + "octocat" + ] + } + } } } } @@ -27623,7 +27724,7 @@ }, "delete": { "summary": "Delete a code scanning analysis from a repository", - "description": "Deletes a specified code scanning analysis from a repository. For\nprivate repositories, you must use an access token with the `repo` scope. For public repositories,\nyou must use an access token with `public_repo` scope.\nGitHub Apps must have the `security_events` write permission to use this endpoint.\n\nYou can delete one analysis at a time.\nTo delete a series of analyses, start with the most recent analysis and work backwards.\nConceptually, the process is similar to the undo function in a text editor.\n\nWhen you list the analyses for a repository,\none or more will be identified as deletable in the response:\n\n```\n\"deletable\": true\n```\n\nAn analysis is deletable when it's the most recent in a set of analyses.\nTypically, a repository will have multiple sets of analyses\nfor each enabled code scanning tool,\nwhere a set is determined by a unique combination of analysis values:\n\n* `ref`\n* `tool`\n* `analysis_key`\n* `environment`\n\nIf you attempt to delete an analysis that is not the most recent in a set,\nyou'll get a 400 response with the message:\n\n```\nAnalysis specified is not deletable.\n```\n\nThe response from a successful `DELETE` operation provides you with\ntwo alternative URLs for deleting the next analysis in the set:\n`next_analysis_url` and `confirm_delete_url`.\nUse the `next_analysis_url` URL if you want to avoid accidentally deleting the final analysis\nin a set. This is a useful option if you want to preserve at least one analysis\nfor the specified tool in your repository.\nUse the `confirm_delete_url` URL if you are content to remove all analyses for a tool.\nWhen you delete the last analysis in a set, the value of `next_analysis_url` and `confirm_delete_url`\nin the 200 response is `null`.\n\nAs an example of the deletion process,\nlet's imagine that you added a workflow that configured a particular code scanning tool\nto analyze the code in a repository. This tool has added 15 analyses:\n10 on the default branch, and another 5 on a topic branch.\nYou therefore have two separate sets of analyses for this tool.\nYou've now decided that you want to remove all of the analyses for the tool.\nTo do this you must make 15 separate deletion requests.\nTo start, you must find an analysis that's identified as deletable.\nEach set of analyses always has one that's identified as deletable.\nHaving found the deletable analysis for one of the two sets,\ndelete this analysis and then continue deleting the next analysis in the set until they're all deleted.\nThen repeat the process for the second set.\nThe procedure therefore consists of a nested loop:\n\n**Outer loop**:\n* List the analyses for the repository, filtered by tool.\n* Parse this list to find a deletable analysis. If found:\n\n **Inner loop**:\n * Delete the identified analysis.\n * Parse the response for the value of `confirm_delete_url` and, if found, use this in the next iteration.\n\nThe above process assumes that you want to remove all trace of the tool's analyses from the GitHub user interface, for the specified repository, and it therefore uses the `confirm_delete_url` value. Alternatively, you could use the `next_analysis_url` value, which would leave the last analysis in each set undeleted to avoid removing a tool's analysis entirely.", + "description": "Deletes a specified code scanning analysis from a repository. For\nprivate repositories, you must use an access token with the `repo` scope. For public repositories,\nyou must use an access token with `public_repo` scope.\nGitHub Apps must have the `security_events` write permission to use this endpoint.\n\nYou can delete one analysis at a time.\nTo delete a series of analyses, start with the most recent analysis and work backwards.\nConceptually, the process is similar to the undo function in a text editor.\n\nWhen you list the analyses for a repository,\none or more will be identified as deletable in the response:\n\n```\n\"deletable\": true\n```\n\nAn analysis is deletable when it's the most recent in a set of analyses.\nTypically, a repository will have multiple sets of analyses\nfor each enabled code scanning tool,\nwhere a set is determined by a unique combination of analysis values:\n\n* `ref`\n* `tool`\n* `category`\n\nIf you attempt to delete an analysis that is not the most recent in a set,\nyou'll get a 400 response with the message:\n\n```\nAnalysis specified is not deletable.\n```\n\nThe response from a successful `DELETE` operation provides you with\ntwo alternative URLs for deleting the next analysis in the set:\n`next_analysis_url` and `confirm_delete_url`.\nUse the `next_analysis_url` URL if you want to avoid accidentally deleting the final analysis\nin a set. This is a useful option if you want to preserve at least one analysis\nfor the specified tool in your repository.\nUse the `confirm_delete_url` URL if you are content to remove all analyses for a tool.\nWhen you delete the last analysis in a set, the value of `next_analysis_url` and `confirm_delete_url`\nin the 200 response is `null`.\n\nAs an example of the deletion process,\nlet's imagine that you added a workflow that configured a particular code scanning tool\nto analyze the code in a repository. This tool has added 15 analyses:\n10 on the default branch, and another 5 on a topic branch.\nYou therefore have two separate sets of analyses for this tool.\nYou've now decided that you want to remove all of the analyses for the tool.\nTo do this you must make 15 separate deletion requests.\nTo start, you must find an analysis that's identified as deletable.\nEach set of analyses always has one that's identified as deletable.\nHaving found the deletable analysis for one of the two sets,\ndelete this analysis and then continue deleting the next analysis in the set until they're all deleted.\nThen repeat the process for the second set.\nThe procedure therefore consists of a nested loop:\n\n**Outer loop**:\n* List the analyses for the repository, filtered by tool.\n* Parse this list to find a deletable analysis. If found:\n\n **Inner loop**:\n * Delete the identified analysis.\n * Parse the response for the value of `confirm_delete_url` and, if found, use this in the next iteration.\n\nThe above process assumes that you want to remove all trace of the tool's analyses from the GitHub user interface, for the specified repository, and it therefore uses the `confirm_delete_url` value. Alternatively, you could use the `next_analysis_url` value, which would leave the last analysis in each set undeleted to avoid removing a tool's analysis entirely.", "operationId": "code-scanning/delete-analysis", "tags": [ "code-scanning" @@ -29516,7 +29617,7 @@ "/repos/{owner}/{repo}/contents/{path}": { "get": { "summary": "Get repository content", - "description": "Gets the contents of a file or directory in a repository. Specify the file path or directory in `:path`. If you omit\n`:path`, you will receive the contents of the repository's root directory. See the description below regarding what the API response includes for directories. \n\nFiles and symlinks support [a custom media type](https://docs.github.com/enterprise-server@3.6/rest/reference/repos#custom-media-types) for\nretrieving the raw content or rendered HTML (when supported). All content types support [a custom media\ntype](https://docs.github.com/enterprise-server@3.6/rest/reference/repos#custom-media-types) to ensure the content is returned in a consistent\nobject format.\n\n**Note**:\n* To get a repository's contents recursively, you can [recursively get the tree](https://docs.github.com/enterprise-server@3.6/rest/reference/git#trees).\n* This API has an upper limit of 1,000 files for a directory. If you need to retrieve more files, use the [Git Trees\nAPI](https://docs.github.com/enterprise-server@3.6/rest/reference/git#get-a-tree).\n\n#### Size limits\nIf the requested file's size is:\n* 1 MB or smaller: All features of this endpoint are supported.\n* Between 1-100 MB: Only the `raw` or `object` [custom media types](https://docs.github.com/enterprise-server@3.6/rest/repos/contents#custom-media-types-for-repository-contents) are supported. Both will work as normal, except that when using the `object` media type, the `content` field will be an empty string and the `encoding` field will be `\"none\"`. To get the contents of these larger files, use the `raw` media type.\n * Greater than 100 MB: This endpoint is not supported.\n\n#### If the content is a directory\nThe response will be an array of objects, one object for each item in the directory.\nWhen listing the contents of a directory, submodules have their \"type\" specified as \"file\". Logically, the value\n_should_ be \"submodule\". This behavior exists in API v3 [for backwards compatibility purposes](https://git.io/v1YCW).\nIn the next major version of the API, the type will be returned as \"submodule\".\n\n#### If the content is a symlink \nIf the requested `:path` points to a symlink, and the symlink's target is a normal file in the repository, then the\nAPI responds with the content of the file (in the format shown in the example. Otherwise, the API responds with an object \ndescribing the symlink itself.\n\n#### If the content is a submodule\nThe `submodule_git_url` identifies the location of the submodule repository, and the `sha` identifies a specific\ncommit within the submodule repository. Git uses the given URL when cloning the submodule repository, and checks out\nthe submodule at that specific commit.\n\nIf the submodule repository is not hosted on github.com, the Git URLs (`git_url` and `_links[\"git\"]`) and the\ngithub.com URLs (`html_url` and `_links[\"html\"]`) will have null values.", + "description": "Gets the contents of a file or directory in a repository. Specify the file path or directory in `:path`. If you omit\n`:path`, you will receive the contents of the repository's root directory. See the description below regarding what the API response includes for directories. \n\nFiles and symlinks support [a custom media type](https://docs.github.com/enterprise-server@3.6/rest/reference/repos#custom-media-types) for\nretrieving the raw content or rendered HTML (when supported). All content types support [a custom media\ntype](https://docs.github.com/enterprise-server@3.6/rest/reference/repos#custom-media-types) to ensure the content is returned in a consistent\nobject format.\n\n**Notes**:\n* To get a repository's contents recursively, you can [recursively get the tree](https://docs.github.com/enterprise-server@3.6/rest/reference/git#trees).\n* This API has an upper limit of 1,000 files for a directory. If you need to retrieve more files, use the [Git Trees\nAPI](https://docs.github.com/enterprise-server@3.6/rest/reference/git#get-a-tree).\n * Download URLs expire and are meant to be used just once. To ensure the download URL does not expire, please use the contents API to obtain a fresh download URL for each download.\n#### Size limits\nIf the requested file's size is:\n* 1 MB or smaller: All features of this endpoint are supported.\n* Between 1-100 MB: Only the `raw` or `object` [custom media types](https://docs.github.com/enterprise-server@3.6/rest/repos/contents#custom-media-types-for-repository-contents) are supported. Both will work as normal, except that when using the `object` media type, the `content` field will be an empty string and the `encoding` field will be `\"none\"`. To get the contents of these larger files, use the `raw` media type.\n * Greater than 100 MB: This endpoint is not supported.\n\n#### If the content is a directory\nThe response will be an array of objects, one object for each item in the directory.\nWhen listing the contents of a directory, submodules have their \"type\" specified as \"file\". Logically, the value\n_should_ be \"submodule\". This behavior exists in API v3 [for backwards compatibility purposes](https://git.io/v1YCW).\nIn the next major version of the API, the type will be returned as \"submodule\".\n\n#### If the content is a symlink \nIf the requested `:path` points to a symlink, and the symlink's target is a normal file in the repository, then the\nAPI responds with the content of the file (in the format shown in the example. Otherwise, the API responds with an object \ndescribing the symlink itself.\n\n#### If the content is a submodule\nThe `submodule_git_url` identifies the location of the submodule repository, and the `sha` identifies a specific\ncommit within the submodule repository. Git uses the given URL when cloning the submodule repository, and checks out\nthe submodule at that specific commit.\n\nIf the submodule repository is not hosted on github.com, the Git URLs (`git_url` and `_links[\"git\"]`) and the\ngithub.com URLs (`html_url` and `_links[\"html\"]`) will have null values.", "tags": [ "repos" ], @@ -33875,6 +33976,14 @@ ] } } + }, + "examples": { + "default": { + "summary": "Example request body", + "value": { + "permissions": "write" + } + } } } } @@ -34974,6 +35083,16 @@ "closed" ] }, + "state_reason": { + "type": [ + "string", + "null" + ], + "description": "The reason for the current state", + "examples": [ + "not_planned" + ] + }, "milestone": { "oneOf": [ { @@ -53681,14 +53800,6 @@ "write" ] }, - "organization_custom_roles": { - "type": "string", - "description": "The level of permission to grant the access token for custom roles management.", - "enum": [ - "read", - "write" - ] - }, "deployments": { "type": "string", "description": "The level of permission to grant the access token for deployments and deployment statuses.", @@ -90278,6 +90389,113 @@ } ] }, + "branch-get": { + "value": { + "name": "main", + "commit": { + "sha": "7fd1a60b01f91b314f59955a4e4d4e80d8edf11d", + "node_id": "MDY6Q29tbWl0MTI5NjI2OTo3ZmQxYTYwYjAxZjkxYjMxNGY1OTk1NWE0ZTRkNGU4MGQ4ZWRmMTFk", + "commit": { + "author": { + "name": "The Octocat", + "email": "octocat@nowhere.com", + "date": "2012-03-06T23:06:50Z" + }, + "committer": { + "name": "The Octocat", + "email": "octocat@nowhere.com", + "date": "2012-03-06T23:06:50Z" + }, + "message": "Merge pull request #6 from Spaceghost/patch-1\n\nNew line at end of file.", + "tree": { + "sha": "b4eecafa9be2f2006ce1b709d6857b07069b4608", + "url": "https://api.github.com/repos/octocat/Hello-World/git/trees/b4eecafa9be2f2006ce1b709d6857b07069b4608" + }, + "url": "https://api.github.com/repos/octocat/Hello-World/git/commits/7fd1a60b01f91b314f59955a4e4d4e80d8edf11d", + "comment_count": 77, + "verification": { + "verified": false, + "reason": "unsigned", + "signature": null, + "payload": null + } + }, + "url": "https://api.github.com/repos/octocat/Hello-World/commits/7fd1a60b01f91b314f59955a4e4d4e80d8edf11d", + "html_url": "https://github.com/octocat/Hello-World/commit/7fd1a60b01f91b314f59955a4e4d4e80d8edf11d", + "comments_url": "https://api.github.com/repos/octocat/Hello-World/commits/7fd1a60b01f91b314f59955a4e4d4e80d8edf11d/comments", + "author": { + "login": "octocat", + "id": 583231, + "node_id": "MDQ6VXNlcjU4MzIzMQ==", + "avatar_url": "https://avatars.githubusercontent.com/u/583231?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/octocat", + "html_url": "https://github.com/octocat", + "followers_url": "https://api.github.com/users/octocat/followers", + "following_url": "https://api.github.com/users/octocat/following{/other_user}", + "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}", + "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/octocat/subscriptions", + "organizations_url": "https://api.github.com/users/octocat/orgs", + "repos_url": "https://api.github.com/users/octocat/repos", + "events_url": "https://api.github.com/users/octocat/events{/privacy}", + "received_events_url": "https://api.github.com/users/octocat/received_events", + "type": "User", + "site_admin": false + }, + "committer": { + "login": "octocat", + "id": 583231, + "node_id": "MDQ6VXNlcjU4MzIzMQ==", + "avatar_url": "https://avatars.githubusercontent.com/u/583231?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/octocat", + "html_url": "https://github.com/octocat", + "followers_url": "https://api.github.com/users/octocat/followers", + "following_url": "https://api.github.com/users/octocat/following{/other_user}", + "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}", + "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/octocat/subscriptions", + "organizations_url": "https://api.github.com/users/octocat/orgs", + "repos_url": "https://api.github.com/users/octocat/repos", + "events_url": "https://api.github.com/users/octocat/events{/privacy}", + "received_events_url": "https://api.github.com/users/octocat/received_events", + "type": "User", + "site_admin": false + }, + "parents": [ + { + "sha": "553c2077f0edc3d5dc5d17262f6aa498e69d6f8e", + "url": "https://api.github.com/repos/octocat/Hello-World/commits/553c2077f0edc3d5dc5d17262f6aa498e69d6f8e", + "html_url": "https://github.com/octocat/Hello-World/commit/553c2077f0edc3d5dc5d17262f6aa498e69d6f8e" + }, + { + "sha": "762941318ee16e59dabbacb1b4049eec22f0d303", + "url": "https://api.github.com/repos/octocat/Hello-World/commits/762941318ee16e59dabbacb1b4049eec22f0d303", + "html_url": "https://github.com/octocat/Hello-World/commit/762941318ee16e59dabbacb1b4049eec22f0d303" + } + ] + }, + "_links": { + "self": "https://api.github.com/repos/octocat/Hello-World/branches/main", + "html": "https://github.com/octocat/Hello-World/tree/main" + }, + "protected": false, + "protection": { + "enabled": false, + "required_status_checks": { + "enforcement_level": "off", + "contexts": [ + + ], + "checks": [ + + ] + } + }, + "protection_url": "https://api.github.com/repos/octocat/Hello-World/branches/main/protection" + } + }, "branch-protection": { "value": { "url": "https://api.github.com/repos/octocat/Hello-World/branches/master/protection", @@ -90474,6 +90692,83 @@ } } }, + "branch-protection-update": { + "value": { + "url": "https://api.github.com/repos/octocat/hello-world/branches/main/protection", + "required_status_checks": { + "url": "https://api.github.com/repos/octocat/hello-world/branches/main/protection/required_status_checks", + "strict": true, + "contexts": [ + "continuous-integration/travis-ci" + ], + "contexts_url": "https://api.github.com/repos/octocat/hello-world/branches/main/protection/required_status_checks/contexts", + "checks": [ + { + "context": "continuous-integration/travis-ci", + "app_id": null + } + ] + }, + "restrictions": { + "url": "https://api.github.com/repos/octocat/hello-world/branches/main/protection/restrictions", + "users_url": "https://api.github.com/repos/octocat/hello-world/branches/main/protection/restrictions/users", + "teams_url": "https://api.github.com/repos/octocat/hello-world/branches/main/protection/restrictions/teams", + "apps_url": "https://api.github.com/repos/octocat/hello-world/branches/main/protection/restrictions/apps", + "users": [ + + ], + "teams": [ + + ], + "apps": [ + + ] + }, + "required_pull_request_reviews": { + "url": "https://api.github.com/repos/octocat/hello-world/branches/main/protection/required_pull_request_reviews", + "dismiss_stale_reviews": true, + "require_code_owner_reviews": true, + "required_approving_review_count": 2, + "dismissal_restrictions": { + "url": "https://api.github.com/repos/octocat/hello-world/branches/main/protection/dismissal_restrictions", + "users_url": "https://api.github.com/repos/octocat/hello-world/branches/main/protection/dismissal_restrictions/users", + "teams_url": "https://api.github.com/repos/octocat/hello-world/branches/main/protection/dismissal_restrictions/teams", + "users": [ + + ], + "teams": [ + + ], + "apps": [ + + ] + } + }, + "required_signatures": { + "url": "https://api.github.com/repos/octocat/hello-world/branches/main/protection/required_signatures", + "enabled": false + }, + "enforce_admins": { + "url": "https://api.github.com/repos/octocat/hello-world/branches/main/protection/enforce_admins", + "enabled": true + }, + "required_linear_history": { + "enabled": true + }, + "allow_force_pushes": { + "enabled": true + }, + "allow_deletions": { + "enabled": true + }, + "block_creations": { + "enabled": true + }, + "required_conversation_resolution": { + "enabled": true + } + } + }, "protected-branch-admin-enforced-2": { "value": { "url": "https://api.github.com/repos/octocat/Hello-World/branches/master/protection/enforce_admins", @@ -92019,6 +92314,7 @@ "ref": "refs/heads/main", "analysis_key": ".github/workflows/codeql-analysis.yml:CodeQL-Build", "environment": "", + "category": ".github/workflows/codeql-analysis.yml:CodeQL-Build", "state": "open", "fixed_at": null, "commit_sha": "39406e42cb832f683daa691dd652a8dc36ee8930", @@ -95359,7 +95655,8 @@ "type": "User", "site_admin": false }, - "author_association": "COLLABORATOR" + "author_association": "COLLABORATOR", + "state_reason": "completed" } ] }, @@ -95519,7 +95816,8 @@ "type": "User", "site_admin": false }, - "author_association": "COLLABORATOR" + "author_association": "COLLABORATOR", + "state_reason": "completed" } }, "issue-comment-items": { @@ -95755,7 +96053,8 @@ "closed_at": null, "created_at": "2011-04-22T13:33:48Z", "updated_at": "2011-04-22T13:33:48Z", - "author_association": "COLLABORATOR" + "author_association": "COLLABORATOR", + "state_reason": "completed" } } ] @@ -95964,7 +96263,8 @@ "closed_at": null, "created_at": "2011-04-22T13:33:48Z", "updated_at": "2011-04-22T13:33:48Z", - "author_association": "COLLABORATOR" + "author_association": "COLLABORATOR", + "state_reason": "completed" } } }, @@ -100239,7 +100539,8 @@ "body": "...", "score": 1, "locked": true, - "author_association": "COLLABORATOR" + "author_association": "COLLABORATOR", + "state_reason": "completed" } ] } diff --git a/descriptions-next/ghes-3.6/ghes-3.6.yaml b/descriptions-next/ghes-3.6/ghes-3.6.yaml index 0864080b51..e6bb16236a 100644 --- a/descriptions-next/ghes-3.6/ghes-3.6.yaml +++ b/descriptions-next/ghes-3.6/ghes-3.6.yaml @@ -6625,6 +6625,9 @@ paths: List the custom repository roles available in this organization. In order to see custom repository roles in an organization, the authenticated user must be an organization owner. + To use this endpoint the authenticated user must be an administrator for the organization or of an repository of the organizaiton and must use an access token with `admin:org repo` scope. + GitHub Apps must have the `organization_custom_roles:read` organization permission to use this endpoint. + For more information on custom repository roles, see "[Managing custom repository roles for an organization](https://docs.github.com/enterprise-server@3.6/organizations/managing-peoples-access-to-your-organization-with-roles/managing-custom-repository-roles-for-an-organization)". tags: - orgs @@ -16564,6 +16567,9 @@ paths: application/json: schema: "$ref": "#/components/schemas/branch-with-protection" + examples: + default: + "$ref": "#/components/examples/branch-get" '301': "$ref": "#/components/responses/moved_permanently" '404': @@ -16862,6 +16868,9 @@ paths: application/json: schema: "$ref": "#/components/schemas/protected-branch" + examples: + default: + "$ref": "#/components/examples/branch-protection-update" '403': "$ref": "#/components/responses/forbidden" '422': @@ -17471,7 +17480,7 @@ paths: properties: contexts: type: array - description: contexts parameter + description: The name of the status checks items: type: string required: @@ -17480,9 +17489,16 @@ paths: contexts: - contexts - type: array - description: contexts parameter + description: The name of the status checks items: type: string + examples: + default: + summary: Example adding status checks to a branch protection rule + value: + contexts: + - continuous-integration/travis-ci + - continuous-integration/jenkins responses: '200': description: Response @@ -17536,7 +17552,7 @@ paths: properties: contexts: type: array - description: contexts parameter + description: The name of the status checks items: type: string required: @@ -17545,9 +17561,15 @@ paths: contexts: - contexts - type: array - description: contexts parameter + description: The name of the status checks items: type: string + examples: + default: + summary: Example updating status checks for a branch protection rule + value: + contexts: + - continuous-integration/travis-ci responses: '200': description: Response @@ -17597,7 +17619,7 @@ paths: properties: contexts: type: array - description: contexts parameter + description: The name of the status checks items: type: string required: @@ -17606,9 +17628,15 @@ paths: contexts: - contexts - type: array - description: contexts parameter + description: The name of the status checks items: type: string + examples: + default: + summary: Example removing status checks from a branch protection rule + value: + contexts: + - continuous-integration/travis-ci responses: '200': description: Response @@ -17976,7 +18004,7 @@ paths: properties: teams: type: array - description: teams parameter + description: The slug values for teams items: type: string required: @@ -17985,9 +18013,15 @@ paths: teams: - my-team - type: array - description: teams parameter + description: The slug values for teams items: type: string + examples: + default: + summary: Example adding a team in a branch protection rule + value: + teams: + - justice-league responses: '200': description: Response @@ -18038,18 +18072,24 @@ paths: properties: teams: type: array - description: teams parameter + description: The slug values for teams items: type: string required: - teams example: teams: - - my-team + - justice-league - type: array - description: teams parameter + description: The slug values for teams items: type: string + examples: + default: + summary: Example replacing a team in a branch protection rule + value: + teams: + - justice-league responses: '200': description: Response @@ -18099,7 +18139,7 @@ paths: properties: teams: type: array - description: teams parameter + description: The slug values for teams items: type: string required: @@ -18108,9 +18148,15 @@ paths: teams: - my-team - type: array - description: teams parameter + description: The slug values for teams items: type: string + examples: + default: + summary: Example removing a team in a branch protection rule + value: + teams: + - justice-league responses: '200': description: Response @@ -18197,7 +18243,7 @@ paths: properties: users: type: array - description: users parameter + description: The username for users items: type: string required: @@ -18208,6 +18254,12 @@ paths: - type: array items: type: string + examples: + default: + summary: Example adding a user in a branch protection rule + value: + users: + - octocat responses: '200': description: Response @@ -18258,7 +18310,7 @@ paths: properties: users: type: array - description: users parameter + description: The username for users items: type: string required: @@ -18269,6 +18321,12 @@ paths: - type: array items: type: string + examples: + default: + summary: Example replacing a user in a branch protection rule + value: + users: + - octocat responses: '200': description: Response @@ -18318,7 +18376,7 @@ paths: properties: users: type: array - description: users parameter + description: The username for users items: type: string required: @@ -18329,6 +18387,12 @@ paths: - type: array items: type: string + examples: + default: + summary: Example removing a user in a branch protection rule + value: + users: + - octocat responses: '200': description: Response @@ -19724,8 +19788,7 @@ paths: * `ref` * `tool` - * `analysis_key` - * `environment` + * `category` If you attempt to delete an analysis that is not the most recent in a set, you'll get a 400 response with the message: @@ -21178,14 +21241,16 @@ paths: support [a custom media type](https://docs.github.com/enterprise-server@3.6/rest/reference/repos#custom-media-types) for\nretrieving the raw content or rendered HTML (when supported). All content types support [a custom media\ntype](https://docs.github.com/enterprise-server@3.6/rest/reference/repos#custom-media-types) - to ensure the content is returned in a consistent\nobject format.\n\n**Note**:\n* + to ensure the content is returned in a consistent\nobject format.\n\n**Notes**:\n* \ To get a repository's contents recursively, you can [recursively get the tree](https://docs.github.com/enterprise-server@3.6/rest/reference/git#trees).\n* \ This API has an upper limit of 1,000 files for a directory. If you need - to retrieve more files, use the [Git Trees\nAPI](https://docs.github.com/enterprise-server@3.6/rest/reference/git#get-a-tree).\n\n#### - Size limits\nIf the requested file's size is:\n* 1 MB or smaller: All features - of this endpoint are supported.\n* Between 1-100 MB: Only the `raw` or `object` - [custom media types](https://docs.github.com/enterprise-server@3.6/rest/repos/contents#custom-media-types-for-repository-contents) + to retrieve more files, use the [Git Trees\nAPI](https://docs.github.com/enterprise-server@3.6/rest/reference/git#get-a-tree).\n + * Download URLs expire and are meant to be used just once. To ensure the + download URL does not expire, please use the contents API to obtain a fresh + download URL for each download.\n#### Size limits\nIf the requested file's + size is:\n* 1 MB or smaller: All features of this endpoint are supported.\n* + Between 1-100 MB: Only the `raw` or `object` [custom media types](https://docs.github.com/enterprise-server@3.6/rest/repos/contents#custom-media-types-for-repository-contents) are supported. Both will work as normal, except that when using the `object` media type, the `content` field will be an empty string and the `encoding` field will be `\"none\"`. To get the contents of these larger files, use the @@ -24468,6 +24533,11 @@ paths: - maintain - triage - admin + examples: + default: + summary: Example request body + value: + permissions: write responses: '200': description: Response @@ -25192,6 +25262,13 @@ paths: enum: - open - closed + state_reason: + type: + - string + - 'null' + description: The reason for the current state + examples: + - not_planned milestone: oneOf: - type: string @@ -38270,13 +38347,6 @@ components: enum: - read - write - organization_custom_roles: - type: string - description: The level of permission to grant the access token for custom - roles management. - enum: - - read - - write deployments: type: string description: The level of permission to grant the access token for deployments @@ -66470,6 +66540,94 @@ components: - ci-test - linter protection_url: https://api.github.com/repos/octocat/hello-world/branches/master/protection + branch-get: + value: + name: main + commit: + sha: 7fd1a60b01f91b314f59955a4e4d4e80d8edf11d + node_id: MDY6Q29tbWl0MTI5NjI2OTo3ZmQxYTYwYjAxZjkxYjMxNGY1OTk1NWE0ZTRkNGU4MGQ4ZWRmMTFk + commit: + author: + name: The Octocat + email: octocat@nowhere.com + date: '2012-03-06T23:06:50Z' + committer: + name: The Octocat + email: octocat@nowhere.com + date: '2012-03-06T23:06:50Z' + message: |- + Merge pull request #6 from Spaceghost/patch-1 + + New line at end of file. + tree: + sha: b4eecafa9be2f2006ce1b709d6857b07069b4608 + url: https://api.github.com/repos/octocat/Hello-World/git/trees/b4eecafa9be2f2006ce1b709d6857b07069b4608 + url: https://api.github.com/repos/octocat/Hello-World/git/commits/7fd1a60b01f91b314f59955a4e4d4e80d8edf11d + comment_count: 77 + verification: + verified: false + reason: unsigned + signature: + payload: + url: https://api.github.com/repos/octocat/Hello-World/commits/7fd1a60b01f91b314f59955a4e4d4e80d8edf11d + html_url: https://github.com/octocat/Hello-World/commit/7fd1a60b01f91b314f59955a4e4d4e80d8edf11d + comments_url: https://api.github.com/repos/octocat/Hello-World/commits/7fd1a60b01f91b314f59955a4e4d4e80d8edf11d/comments + author: + login: octocat + id: 583231 + node_id: MDQ6VXNlcjU4MzIzMQ== + avatar_url: https://avatars.githubusercontent.com/u/583231?v=4 + gravatar_id: '' + url: https://api.github.com/users/octocat + html_url: https://github.com/octocat + followers_url: https://api.github.com/users/octocat/followers + following_url: https://api.github.com/users/octocat/following{/other_user} + gists_url: https://api.github.com/users/octocat/gists{/gist_id} + starred_url: https://api.github.com/users/octocat/starred{/owner}{/repo} + subscriptions_url: https://api.github.com/users/octocat/subscriptions + organizations_url: https://api.github.com/users/octocat/orgs + repos_url: https://api.github.com/users/octocat/repos + events_url: https://api.github.com/users/octocat/events{/privacy} + received_events_url: https://api.github.com/users/octocat/received_events + type: User + site_admin: false + committer: + login: octocat + id: 583231 + node_id: MDQ6VXNlcjU4MzIzMQ== + avatar_url: https://avatars.githubusercontent.com/u/583231?v=4 + gravatar_id: '' + url: https://api.github.com/users/octocat + html_url: https://github.com/octocat + followers_url: https://api.github.com/users/octocat/followers + following_url: https://api.github.com/users/octocat/following{/other_user} + gists_url: https://api.github.com/users/octocat/gists{/gist_id} + starred_url: https://api.github.com/users/octocat/starred{/owner}{/repo} + subscriptions_url: https://api.github.com/users/octocat/subscriptions + organizations_url: https://api.github.com/users/octocat/orgs + repos_url: https://api.github.com/users/octocat/repos + events_url: https://api.github.com/users/octocat/events{/privacy} + received_events_url: https://api.github.com/users/octocat/received_events + type: User + site_admin: false + parents: + - sha: 553c2077f0edc3d5dc5d17262f6aa498e69d6f8e + url: https://api.github.com/repos/octocat/Hello-World/commits/553c2077f0edc3d5dc5d17262f6aa498e69d6f8e + html_url: https://github.com/octocat/Hello-World/commit/553c2077f0edc3d5dc5d17262f6aa498e69d6f8e + - sha: 762941318ee16e59dabbacb1b4049eec22f0d303 + url: https://api.github.com/repos/octocat/Hello-World/commits/762941318ee16e59dabbacb1b4049eec22f0d303 + html_url: https://github.com/octocat/Hello-World/commit/762941318ee16e59dabbacb1b4049eec22f0d303 + _links: + self: https://api.github.com/repos/octocat/Hello-World/branches/main + html: https://github.com/octocat/Hello-World/tree/main + protected: false + protection: + enabled: false + required_status_checks: + enforcement_level: 'off' + contexts: [] + checks: [] + protection_url: https://api.github.com/repos/octocat/Hello-World/branches/main/protection branch-protection: value: url: https://api.github.com/repos/octocat/Hello-World/branches/master/protection @@ -66630,6 +66788,54 @@ components: enabled: true required_conversation_resolution: enabled: true + branch-protection-update: + value: + url: https://api.github.com/repos/octocat/hello-world/branches/main/protection + required_status_checks: + url: https://api.github.com/repos/octocat/hello-world/branches/main/protection/required_status_checks + strict: true + contexts: + - continuous-integration/travis-ci + contexts_url: https://api.github.com/repos/octocat/hello-world/branches/main/protection/required_status_checks/contexts + checks: + - context: continuous-integration/travis-ci + app_id: + restrictions: + url: https://api.github.com/repos/octocat/hello-world/branches/main/protection/restrictions + users_url: https://api.github.com/repos/octocat/hello-world/branches/main/protection/restrictions/users + teams_url: https://api.github.com/repos/octocat/hello-world/branches/main/protection/restrictions/teams + apps_url: https://api.github.com/repos/octocat/hello-world/branches/main/protection/restrictions/apps + users: [] + teams: [] + apps: [] + required_pull_request_reviews: + url: https://api.github.com/repos/octocat/hello-world/branches/main/protection/required_pull_request_reviews + dismiss_stale_reviews: true + require_code_owner_reviews: true + required_approving_review_count: 2 + dismissal_restrictions: + url: https://api.github.com/repos/octocat/hello-world/branches/main/protection/dismissal_restrictions + users_url: https://api.github.com/repos/octocat/hello-world/branches/main/protection/dismissal_restrictions/users + teams_url: https://api.github.com/repos/octocat/hello-world/branches/main/protection/dismissal_restrictions/teams + users: [] + teams: [] + apps: [] + required_signatures: + url: https://api.github.com/repos/octocat/hello-world/branches/main/protection/required_signatures + enabled: false + enforce_admins: + url: https://api.github.com/repos/octocat/hello-world/branches/main/protection/enforce_admins + enabled: true + required_linear_history: + enabled: true + allow_force_pushes: + enabled: true + allow_deletions: + enabled: true + block_creations: + enabled: true + required_conversation_resolution: + enabled: true protected-branch-admin-enforced-2: value: url: https://api.github.com/repos/octocat/Hello-World/branches/master/protection/enforce_admins @@ -67989,6 +68195,7 @@ components: - ref: refs/heads/main analysis_key: ".github/workflows/codeql-analysis.yml:CodeQL-Build" environment: '' + category: ".github/workflows/codeql-analysis.yml:CodeQL-Build" state: open fixed_at: commit_sha: 39406e42cb832f683daa691dd652a8dc36ee8930 @@ -70844,6 +71051,7 @@ components: type: User site_admin: false author_association: COLLABORATOR + state_reason: completed issue: value: id: 1 @@ -70989,6 +71197,7 @@ components: type: User site_admin: false author_association: COLLABORATOR + state_reason: completed issue-comment-items: value: - id: 1 @@ -71202,6 +71411,7 @@ components: created_at: '2011-04-22T13:33:48Z' updated_at: '2011-04-22T13:33:48Z' author_association: COLLABORATOR + state_reason: completed issue-event: value: id: 1 @@ -71391,6 +71601,7 @@ components: created_at: '2011-04-22T13:33:48Z' updated_at: '2011-04-22T13:33:48Z' author_association: COLLABORATOR + state_reason: completed issue-event-for-issue-items: value: - id: 1 @@ -75214,6 +75425,7 @@ components: score: 1 locked: true author_association: COLLABORATOR + state_reason: completed label-search-result-item-paginated: value: total_count: 2 diff --git a/descriptions-next/github.ae/dereferenced/github.ae.deref.json b/descriptions-next/github.ae/dereferenced/github.ae.deref.json index 5a23834416..f51c2bc6bc 100644 --- a/descriptions-next/github.ae/dereferenced/github.ae.deref.json +++ b/descriptions-next/github.ae/dereferenced/github.ae.deref.json @@ -2762,14 +2762,6 @@ "write" ] }, - "organization_custom_roles": { - "type": "string", - "description": "The level of permission to grant the access token for custom roles management.", - "enum": [ - "read", - "write" - ] - }, "deployments": { "type": "string", "description": "The level of permission to grant the access token for deployments and deployment statuses.", @@ -3668,14 +3660,6 @@ "write" ] }, - "organization_custom_roles": { - "type": "string", - "description": "The level of permission to grant the access token for custom roles management.", - "enum": [ - "read", - "write" - ] - }, "deployments": { "type": "string", "description": "The level of permission to grant the access token for deployments and deployment statuses.", @@ -4458,14 +4442,6 @@ "write" ] }, - "organization_custom_roles": { - "type": "string", - "description": "The level of permission to grant the access token for custom roles management.", - "enum": [ - "read", - "write" - ] - }, "deployments": { "type": "string", "description": "The level of permission to grant the access token for deployments and deployment statuses.", @@ -7453,14 +7429,6 @@ "write" ] }, - "organization_custom_roles": { - "type": "string", - "description": "The level of permission to grant the access token for custom roles management.", - "enum": [ - "read", - "write" - ] - }, "deployments": { "type": "string", "description": "The level of permission to grant the access token for deployments and deployment statuses.", @@ -8390,14 +8358,6 @@ "write" ] }, - "organization_custom_roles": { - "type": "string", - "description": "The level of permission to grant the access token for custom roles management.", - "enum": [ - "read", - "write" - ] - }, "deployments": { "type": "string", "description": "The level of permission to grant the access token for deployments and deployment statuses.", @@ -9113,14 +9073,6 @@ "write" ] }, - "organization_custom_roles": { - "type": "string", - "description": "The level of permission to grant the access token for custom roles management.", - "enum": [ - "read", - "write" - ] - }, "deployments": { "type": "string", "description": "The level of permission to grant the access token for deployments and deployment statuses.", @@ -9406,14 +9358,6 @@ "write" ] }, - "organization_custom_roles": { - "type": "string", - "description": "The level of permission to grant the access token for custom roles management.", - "enum": [ - "read", - "write" - ] - }, "deployments": { "type": "string", "description": "The level of permission to grant the access token for deployments and deployment statuses.", @@ -11981,14 +11925,6 @@ "write" ] }, - "organization_custom_roles": { - "type": "string", - "description": "The level of permission to grant the access token for custom roles management.", - "enum": [ - "read", - "write" - ] - }, "deployments": { "type": "string", "description": "The level of permission to grant the access token for deployments and deployment statuses.", @@ -12955,14 +12891,6 @@ "write" ] }, - "organization_custom_roles": { - "type": "string", - "description": "The level of permission to grant the access token for custom roles management.", - "enum": [ - "read", - "write" - ] - }, "deployments": { "type": "string", "description": "The level of permission to grant the access token for deployments and deployment statuses.", @@ -14027,14 +13955,6 @@ "write" ] }, - "organization_custom_roles": { - "type": "string", - "description": "The level of permission to grant the access token for custom roles management.", - "enum": [ - "read", - "write" - ] - }, "deployments": { "type": "string", "description": "The level of permission to grant the access token for deployments and deployment statuses.", @@ -61875,14 +61795,6 @@ "write" ] }, - "organization_custom_roles": { - "type": "string", - "description": "The level of permission to grant the access token for custom roles management.", - "enum": [ - "read", - "write" - ] - }, "deployments": { "type": "string", "description": "The level of permission to grant the access token for deployments and deployment statuses.", @@ -62826,14 +62738,6 @@ "write" ] }, - "organization_custom_roles": { - "type": "string", - "description": "The level of permission to grant the access token for custom roles management.", - "enum": [ - "read", - "write" - ] - }, "deployments": { "type": "string", "description": "The level of permission to grant the access token for deployments and deployment statuses.", @@ -149396,6 +149300,115 @@ "protected", "protection_url" ] + }, + "examples": { + "default": { + "value": { + "name": "main", + "commit": { + "sha": "7fd1a60b01f91b314f59955a4e4d4e80d8edf11d", + "node_id": "MDY6Q29tbWl0MTI5NjI2OTo3ZmQxYTYwYjAxZjkxYjMxNGY1OTk1NWE0ZTRkNGU4MGQ4ZWRmMTFk", + "commit": { + "author": { + "name": "The Octocat", + "email": "octocat@nowhere.com", + "date": "2012-03-06T23:06:50Z" + }, + "committer": { + "name": "The Octocat", + "email": "octocat@nowhere.com", + "date": "2012-03-06T23:06:50Z" + }, + "message": "Merge pull request #6 from Spaceghost/patch-1\n\nNew line at end of file.", + "tree": { + "sha": "b4eecafa9be2f2006ce1b709d6857b07069b4608", + "url": "https://api.github.com/repos/octocat/Hello-World/git/trees/b4eecafa9be2f2006ce1b709d6857b07069b4608" + }, + "url": "https://api.github.com/repos/octocat/Hello-World/git/commits/7fd1a60b01f91b314f59955a4e4d4e80d8edf11d", + "comment_count": 77, + "verification": { + "verified": false, + "reason": "unsigned", + "signature": null, + "payload": null + } + }, + "url": "https://api.github.com/repos/octocat/Hello-World/commits/7fd1a60b01f91b314f59955a4e4d4e80d8edf11d", + "html_url": "https://github.com/octocat/Hello-World/commit/7fd1a60b01f91b314f59955a4e4d4e80d8edf11d", + "comments_url": "https://api.github.com/repos/octocat/Hello-World/commits/7fd1a60b01f91b314f59955a4e4d4e80d8edf11d/comments", + "author": { + "login": "octocat", + "id": 583231, + "node_id": "MDQ6VXNlcjU4MzIzMQ==", + "avatar_url": "https://avatars.githubusercontent.com/u/583231?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/octocat", + "html_url": "https://github.com/octocat", + "followers_url": "https://api.github.com/users/octocat/followers", + "following_url": "https://api.github.com/users/octocat/following{/other_user}", + "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}", + "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/octocat/subscriptions", + "organizations_url": "https://api.github.com/users/octocat/orgs", + "repos_url": "https://api.github.com/users/octocat/repos", + "events_url": "https://api.github.com/users/octocat/events{/privacy}", + "received_events_url": "https://api.github.com/users/octocat/received_events", + "type": "User", + "site_admin": false + }, + "committer": { + "login": "octocat", + "id": 583231, + "node_id": "MDQ6VXNlcjU4MzIzMQ==", + "avatar_url": "https://avatars.githubusercontent.com/u/583231?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/octocat", + "html_url": "https://github.com/octocat", + "followers_url": "https://api.github.com/users/octocat/followers", + "following_url": "https://api.github.com/users/octocat/following{/other_user}", + "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}", + "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/octocat/subscriptions", + "organizations_url": "https://api.github.com/users/octocat/orgs", + "repos_url": "https://api.github.com/users/octocat/repos", + "events_url": "https://api.github.com/users/octocat/events{/privacy}", + "received_events_url": "https://api.github.com/users/octocat/received_events", + "type": "User", + "site_admin": false + }, + "parents": [ + { + "sha": "553c2077f0edc3d5dc5d17262f6aa498e69d6f8e", + "url": "https://api.github.com/repos/octocat/Hello-World/commits/553c2077f0edc3d5dc5d17262f6aa498e69d6f8e", + "html_url": "https://github.com/octocat/Hello-World/commit/553c2077f0edc3d5dc5d17262f6aa498e69d6f8e" + }, + { + "sha": "762941318ee16e59dabbacb1b4049eec22f0d303", + "url": "https://api.github.com/repos/octocat/Hello-World/commits/762941318ee16e59dabbacb1b4049eec22f0d303", + "html_url": "https://github.com/octocat/Hello-World/commit/762941318ee16e59dabbacb1b4049eec22f0d303" + } + ] + }, + "_links": { + "self": "https://api.github.com/repos/octocat/Hello-World/branches/main", + "html": "https://github.com/octocat/Hello-World/tree/main" + }, + "protected": false, + "protection": { + "enabled": false, + "required_status_checks": { + "enforcement_level": "off", + "contexts": [ + + ], + "checks": [ + + ] + } + }, + "protection_url": "https://api.github.com/repos/octocat/Hello-World/branches/main/protection" + } + } } } } @@ -153903,6 +153916,85 @@ "required": [ "url" ] + }, + "examples": { + "default": { + "value": { + "url": "https://api.github.com/repos/octocat/hello-world/branches/main/protection", + "required_status_checks": { + "url": "https://api.github.com/repos/octocat/hello-world/branches/main/protection/required_status_checks", + "strict": true, + "contexts": [ + "continuous-integration/travis-ci" + ], + "contexts_url": "https://api.github.com/repos/octocat/hello-world/branches/main/protection/required_status_checks/contexts", + "checks": [ + { + "context": "continuous-integration/travis-ci", + "app_id": null + } + ] + }, + "restrictions": { + "url": "https://api.github.com/repos/octocat/hello-world/branches/main/protection/restrictions", + "users_url": "https://api.github.com/repos/octocat/hello-world/branches/main/protection/restrictions/users", + "teams_url": "https://api.github.com/repos/octocat/hello-world/branches/main/protection/restrictions/teams", + "apps_url": "https://api.github.com/repos/octocat/hello-world/branches/main/protection/restrictions/apps", + "users": [ + + ], + "teams": [ + + ], + "apps": [ + + ] + }, + "required_pull_request_reviews": { + "url": "https://api.github.com/repos/octocat/hello-world/branches/main/protection/required_pull_request_reviews", + "dismiss_stale_reviews": true, + "require_code_owner_reviews": true, + "required_approving_review_count": 2, + "dismissal_restrictions": { + "url": "https://api.github.com/repos/octocat/hello-world/branches/main/protection/dismissal_restrictions", + "users_url": "https://api.github.com/repos/octocat/hello-world/branches/main/protection/dismissal_restrictions/users", + "teams_url": "https://api.github.com/repos/octocat/hello-world/branches/main/protection/dismissal_restrictions/teams", + "users": [ + + ], + "teams": [ + + ], + "apps": [ + + ] + } + }, + "required_signatures": { + "url": "https://api.github.com/repos/octocat/hello-world/branches/main/protection/required_signatures", + "enabled": false + }, + "enforce_admins": { + "url": "https://api.github.com/repos/octocat/hello-world/branches/main/protection/enforce_admins", + "enabled": true + }, + "required_linear_history": { + "enabled": true + }, + "allow_force_pushes": { + "enabled": true + }, + "allow_deletions": { + "enabled": true + }, + "block_creations": { + "enabled": true + }, + "required_conversation_resolution": { + "enabled": true + } + } + } } } } @@ -158789,7 +158881,7 @@ "properties": { "contexts": { "type": "array", - "description": "contexts parameter", + "description": "The name of the status checks", "items": { "type": "string" } @@ -158806,12 +158898,23 @@ }, { "type": "array", - "description": "contexts parameter", + "description": "The name of the status checks", "items": { "type": "string" } } ] + }, + "examples": { + "default": { + "summary": "Example adding status checks to a branch protection rule", + "value": { + "contexts": [ + "continuous-integration/travis-ci", + "continuous-integration/jenkins" + ] + } + } } } } @@ -159026,7 +159129,7 @@ "properties": { "contexts": { "type": "array", - "description": "contexts parameter", + "description": "The name of the status checks", "items": { "type": "string" } @@ -159043,12 +159146,22 @@ }, { "type": "array", - "description": "contexts parameter", + "description": "The name of the status checks", "items": { "type": "string" } } ] + }, + "examples": { + "default": { + "summary": "Example updating status checks for a branch protection rule", + "value": { + "contexts": [ + "continuous-integration/travis-ci" + ] + } + } } } } @@ -159235,7 +159348,7 @@ "properties": { "contexts": { "type": "array", - "description": "contexts parameter", + "description": "The name of the status checks", "items": { "type": "string" } @@ -159252,12 +159365,22 @@ }, { "type": "array", - "description": "contexts parameter", + "description": "The name of the status checks", "items": { "type": "string" } } ] + }, + "examples": { + "default": { + "summary": "Example removing status checks from a branch protection rule", + "value": { + "contexts": [ + "continuous-integration/travis-ci" + ] + } + } } } } @@ -162379,7 +162502,7 @@ "properties": { "teams": { "type": "array", - "description": "teams parameter", + "description": "The slug values for teams", "items": { "type": "string" } @@ -162396,12 +162519,22 @@ }, { "type": "array", - "description": "teams parameter", + "description": "The slug values for teams", "items": { "type": "string" } } ] + }, + "examples": { + "default": { + "summary": "Example adding a team in a branch protection rule", + "value": { + "teams": [ + "justice-league" + ] + } + } } } } @@ -162773,7 +162906,7 @@ "properties": { "teams": { "type": "array", - "description": "teams parameter", + "description": "The slug values for teams", "items": { "type": "string" } @@ -162784,18 +162917,28 @@ ], "example": { "teams": [ - "my-team" + "justice-league" ] } }, { "type": "array", - "description": "teams parameter", + "description": "The slug values for teams", "items": { "type": "string" } } ] + }, + "examples": { + "default": { + "summary": "Example replacing a team in a branch protection rule", + "value": { + "teams": [ + "justice-league" + ] + } + } } } } @@ -163166,7 +163309,7 @@ "properties": { "teams": { "type": "array", - "description": "teams parameter", + "description": "The slug values for teams", "items": { "type": "string" } @@ -163183,12 +163326,22 @@ }, { "type": "array", - "description": "teams parameter", + "description": "The slug values for teams", "items": { "type": "string" } } ] + }, + "examples": { + "default": { + "summary": "Example removing a team in a branch protection rule", + "value": { + "teams": [ + "justice-league" + ] + } + } } } } @@ -163835,7 +163988,7 @@ "properties": { "users": { "type": "array", - "description": "users parameter", + "description": "The username for users", "items": { "type": "string" } @@ -163857,6 +164010,16 @@ } } ] + }, + "examples": { + "default": { + "summary": "Example adding a user in a branch protection rule", + "value": { + "users": [ + "octocat" + ] + } + } } } } @@ -164195,7 +164358,7 @@ "properties": { "users": { "type": "array", - "description": "users parameter", + "description": "The username for users", "items": { "type": "string" } @@ -164217,6 +164380,16 @@ } } ] + }, + "examples": { + "default": { + "summary": "Example replacing a user in a branch protection rule", + "value": { + "users": [ + "octocat" + ] + } + } } } } @@ -164554,7 +164727,7 @@ "properties": { "users": { "type": "array", - "description": "users parameter", + "description": "The username for users", "items": { "type": "string" } @@ -164576,6 +164749,16 @@ } } ] + }, + "examples": { + "default": { + "summary": "Example removing a user in a branch protection rule", + "value": { + "users": [ + "octocat" + ] + } + } } } } @@ -185051,6 +185234,33 @@ "6c81cd8e-b078-4ac3-a3be-1dad7dbd0b53" ] } + }, + { + "name": "direction", + "description": "The direction to sort the results by.", + "in": "query", + "required": false, + "schema": { + "type": "string", + "enum": [ + "asc", + "desc" + ], + "default": "desc" + } + }, + { + "name": "sort", + "description": "The property by which to sort the results.", + "in": "query", + "required": false, + "schema": { + "type": "string", + "enum": [ + "created" + ], + "default": "created" + } } ], "responses": { @@ -211055,7 +211265,7 @@ "/repos/{owner}/{repo}/contents/{path}": { "get": { "summary": "Get repository content", - "description": "Gets the contents of a file or directory in a repository. Specify the file path or directory in `:path`. If you omit\n`:path`, you will receive the contents of the repository's root directory. See the description below regarding what the API response includes for directories. \n\nFiles and symlinks support [a custom media type](https://docs.github.com/github-ae@latest/rest/reference/repos#custom-media-types) for\nretrieving the raw content or rendered HTML (when supported). All content types support [a custom media\ntype](https://docs.github.com/github-ae@latest/rest/reference/repos#custom-media-types) to ensure the content is returned in a consistent\nobject format.\n\n**Note**:\n* To get a repository's contents recursively, you can [recursively get the tree](https://docs.github.com/github-ae@latest/rest/reference/git#trees).\n* This API has an upper limit of 1,000 files for a directory. If you need to retrieve more files, use the [Git Trees\nAPI](https://docs.github.com/github-ae@latest/rest/reference/git#get-a-tree).\n* This API supports files up to 1 megabyte in size.\n\n#### If the content is a directory\nThe response will be an array of objects, one object for each item in the directory.\nWhen listing the contents of a directory, submodules have their \"type\" specified as \"file\". Logically, the value\n_should_ be \"submodule\". This behavior exists in API v3 [for backwards compatibility purposes](https://git.io/v1YCW).\nIn the next major version of the API, the type will be returned as \"submodule\".\n\n#### If the content is a symlink \nIf the requested `:path` points to a symlink, and the symlink's target is a normal file in the repository, then the\nAPI responds with the content of the file (in the format shown in the example. Otherwise, the API responds with an object \ndescribing the symlink itself.\n\n#### If the content is a submodule\nThe `submodule_git_url` identifies the location of the submodule repository, and the `sha` identifies a specific\ncommit within the submodule repository. Git uses the given URL when cloning the submodule repository, and checks out\nthe submodule at that specific commit.\n\nIf the submodule repository is not hosted on github.com, the Git URLs (`git_url` and `_links[\"git\"]`) and the\ngithub.com URLs (`html_url` and `_links[\"html\"]`) will have null values.", + "description": "Gets the contents of a file or directory in a repository. Specify the file path or directory in `:path`. If you omit\n`:path`, you will receive the contents of the repository's root directory. See the description below regarding what the API response includes for directories. \n\nFiles and symlinks support [a custom media type](https://docs.github.com/github-ae@latest/rest/reference/repos#custom-media-types) for\nretrieving the raw content or rendered HTML (when supported). All content types support [a custom media\ntype](https://docs.github.com/github-ae@latest/rest/reference/repos#custom-media-types) to ensure the content is returned in a consistent\nobject format.\n\n**Notes**:\n* To get a repository's contents recursively, you can [recursively get the tree](https://docs.github.com/github-ae@latest/rest/reference/git#trees).\n* This API has an upper limit of 1,000 files for a directory. If you need to retrieve more files, use the [Git Trees\nAPI](https://docs.github.com/github-ae@latest/rest/reference/git#get-a-tree).\n * Download URLs expire and are meant to be used just once. To ensure the download URL does not expire, please use the contents API to obtain a fresh download URL for each download. \n* This API supports files up to 1 megabyte in size.\n\n#### If the content is a directory\nThe response will be an array of objects, one object for each item in the directory.\nWhen listing the contents of a directory, submodules have their \"type\" specified as \"file\". Logically, the value\n_should_ be \"submodule\". This behavior exists in API v3 [for backwards compatibility purposes](https://git.io/v1YCW).\nIn the next major version of the API, the type will be returned as \"submodule\".\n\n#### If the content is a symlink \nIf the requested `:path` points to a symlink, and the symlink's target is a normal file in the repository, then the\nAPI responds with the content of the file (in the format shown in the example. Otherwise, the API responds with an object \ndescribing the symlink itself.\n\n#### If the content is a submodule\nThe `submodule_git_url` identifies the location of the submodule repository, and the `sha` identifies a specific\ncommit within the submodule repository. Git uses the given URL when cloning the submodule repository, and checks out\nthe submodule at that specific commit.\n\nIf the submodule repository is not hosted on github.com, the Git URLs (`git_url` and `_links[\"git\"]`) and the\ngithub.com URLs (`html_url` and `_links[\"html\"]`) will have null values.", "tags": [ "repos" ], @@ -240816,14 +241026,6 @@ "write" ] }, - "organization_custom_roles": { - "type": "string", - "description": "The level of permission to grant the access token for custom roles management.", - "enum": [ - "read", - "write" - ] - }, "deployments": { "type": "string", "description": "The level of permission to grant the access token for deployments and deployment statuses.", @@ -244199,6 +244401,14 @@ ] } } + }, + "examples": { + "default": { + "summary": "Example request body", + "value": { + "permissions": "write" + } + } } } } @@ -250241,7 +250451,8 @@ "type": "User", "site_admin": false }, - "author_association": "COLLABORATOR" + "author_association": "COLLABORATOR", + "state_reason": "completed" } ] } @@ -253696,7 +253907,8 @@ "type": "User", "site_admin": false }, - "author_association": "COLLABORATOR" + "author_association": "COLLABORATOR", + "state_reason": "completed" } } } @@ -262367,7 +262579,8 @@ "closed_at": null, "created_at": "2011-04-22T13:33:48Z", "updated_at": "2011-04-22T13:33:48Z", - "author_association": "COLLABORATOR" + "author_association": "COLLABORATOR", + "state_reason": "completed" } } ] @@ -267306,7 +267519,8 @@ "closed_at": null, "created_at": "2011-04-22T13:33:48Z", "updated_at": "2011-04-22T13:33:48Z", - "author_association": "COLLABORATOR" + "author_association": "COLLABORATOR", + "state_reason": "completed" } } } @@ -270606,7 +270820,8 @@ "type": "User", "site_admin": false }, - "author_association": "COLLABORATOR" + "author_association": "COLLABORATOR", + "state_reason": "completed" } } } @@ -270787,6 +271002,16 @@ "closed" ] }, + "state_reason": { + "type": [ + "string", + "null" + ], + "description": "The reason for the current state", + "examples": [ + "not_planned" + ] + }, "milestone": { "oneOf": [ { @@ -274029,7 +274254,8 @@ "type": "User", "site_admin": false }, - "author_association": "COLLABORATOR" + "author_association": "COLLABORATOR", + "state_reason": "completed" } } } @@ -277479,7 +277705,8 @@ "type": "User", "site_admin": false }, - "author_association": "COLLABORATOR" + "author_association": "COLLABORATOR", + "state_reason": "completed" } } } @@ -280726,7 +280953,8 @@ "type": "User", "site_admin": false }, - "author_association": "COLLABORATOR" + "author_association": "COLLABORATOR", + "state_reason": "completed" } } } @@ -387727,7 +387955,8 @@ "body": "...", "score": 1, "locked": true, - "author_association": "COLLABORATOR" + "author_association": "COLLABORATOR", + "state_reason": "completed" } ] } @@ -407823,14 +408052,6 @@ "write" ] }, - "organization_custom_roles": { - "type": "string", - "description": "The level of permission to grant the access token for custom roles management.", - "enum": [ - "read", - "write" - ] - }, "deployments": { "type": "string", "description": "The level of permission to grant the access token for deployments and deployment statuses.", @@ -447751,14 +447972,6 @@ "write" ] }, - "organization_custom_roles": { - "type": "string", - "description": "The level of permission to grant the access token for custom roles management.", - "enum": [ - "read", - "write" - ] - }, "deployments": { "type": "string", "description": "The level of permission to grant the access token for deployments and deployment statuses.", diff --git a/descriptions-next/github.ae/dereferenced/github.ae.deref.yaml b/descriptions-next/github.ae/dereferenced/github.ae.deref.yaml index dd7be8ae92..48db10f6a2 100644 --- a/descriptions-next/github.ae/dereferenced/github.ae.deref.yaml +++ b/descriptions-next/github.ae/dereferenced/github.ae.deref.yaml @@ -1679,13 +1679,6 @@ paths: enum: - read - write - organization_custom_roles: - type: string - description: The level of permission to grant the - access token for custom roles management. - enum: - - read - - write deployments: type: string description: The level of permission to grant the @@ -29152,6 +29145,95 @@ paths: - protection - protected - protection_url + examples: + default: + value: + name: main + commit: + sha: 7fd1a60b01f91b314f59955a4e4d4e80d8edf11d + node_id: MDY6Q29tbWl0MTI5NjI2OTo3ZmQxYTYwYjAxZjkxYjMxNGY1OTk1NWE0ZTRkNGU4MGQ4ZWRmMTFk + commit: + author: + name: The Octocat + email: octocat@nowhere.com + date: '2012-03-06T23:06:50Z' + committer: + name: The Octocat + email: octocat@nowhere.com + date: '2012-03-06T23:06:50Z' + message: |- + Merge pull request #6 from Spaceghost/patch-1 + + New line at end of file. + tree: + sha: b4eecafa9be2f2006ce1b709d6857b07069b4608 + url: https://api.github.com/repos/octocat/Hello-World/git/trees/b4eecafa9be2f2006ce1b709d6857b07069b4608 + url: https://api.github.com/repos/octocat/Hello-World/git/commits/7fd1a60b01f91b314f59955a4e4d4e80d8edf11d + comment_count: 77 + verification: + verified: false + reason: unsigned + signature: + payload: + url: https://api.github.com/repos/octocat/Hello-World/commits/7fd1a60b01f91b314f59955a4e4d4e80d8edf11d + html_url: https://github.com/octocat/Hello-World/commit/7fd1a60b01f91b314f59955a4e4d4e80d8edf11d + comments_url: https://api.github.com/repos/octocat/Hello-World/commits/7fd1a60b01f91b314f59955a4e4d4e80d8edf11d/comments + author: + login: octocat + id: 583231 + node_id: MDQ6VXNlcjU4MzIzMQ== + avatar_url: https://avatars.githubusercontent.com/u/583231?v=4 + gravatar_id: '' + url: https://api.github.com/users/octocat + html_url: https://github.com/octocat + followers_url: https://api.github.com/users/octocat/followers + following_url: https://api.github.com/users/octocat/following{/other_user} + gists_url: https://api.github.com/users/octocat/gists{/gist_id} + starred_url: https://api.github.com/users/octocat/starred{/owner}{/repo} + subscriptions_url: https://api.github.com/users/octocat/subscriptions + organizations_url: https://api.github.com/users/octocat/orgs + repos_url: https://api.github.com/users/octocat/repos + events_url: https://api.github.com/users/octocat/events{/privacy} + received_events_url: https://api.github.com/users/octocat/received_events + type: User + site_admin: false + committer: + login: octocat + id: 583231 + node_id: MDQ6VXNlcjU4MzIzMQ== + avatar_url: https://avatars.githubusercontent.com/u/583231?v=4 + gravatar_id: '' + url: https://api.github.com/users/octocat + html_url: https://github.com/octocat + followers_url: https://api.github.com/users/octocat/followers + following_url: https://api.github.com/users/octocat/following{/other_user} + gists_url: https://api.github.com/users/octocat/gists{/gist_id} + starred_url: https://api.github.com/users/octocat/starred{/owner}{/repo} + subscriptions_url: https://api.github.com/users/octocat/subscriptions + organizations_url: https://api.github.com/users/octocat/orgs + repos_url: https://api.github.com/users/octocat/repos + events_url: https://api.github.com/users/octocat/events{/privacy} + received_events_url: https://api.github.com/users/octocat/received_events + type: User + site_admin: false + parents: + - sha: 553c2077f0edc3d5dc5d17262f6aa498e69d6f8e + url: https://api.github.com/repos/octocat/Hello-World/commits/553c2077f0edc3d5dc5d17262f6aa498e69d6f8e + html_url: https://github.com/octocat/Hello-World/commit/553c2077f0edc3d5dc5d17262f6aa498e69d6f8e + - sha: 762941318ee16e59dabbacb1b4049eec22f0d303 + url: https://api.github.com/repos/octocat/Hello-World/commits/762941318ee16e59dabbacb1b4049eec22f0d303 + html_url: https://github.com/octocat/Hello-World/commit/762941318ee16e59dabbacb1b4049eec22f0d303 + _links: + self: https://api.github.com/repos/octocat/Hello-World/branches/main + html: https://github.com/octocat/Hello-World/tree/main + protected: false + protection: + enabled: false + required_status_checks: + enforcement_level: 'off' + contexts: [] + checks: [] + protection_url: https://api.github.com/repos/octocat/Hello-World/branches/main/protection '301': *189 '404': *29 x-github: @@ -29781,6 +29863,55 @@ paths: - enabled required: - url + examples: + default: + value: + url: https://api.github.com/repos/octocat/hello-world/branches/main/protection + required_status_checks: + url: https://api.github.com/repos/octocat/hello-world/branches/main/protection/required_status_checks + strict: true + contexts: + - continuous-integration/travis-ci + contexts_url: https://api.github.com/repos/octocat/hello-world/branches/main/protection/required_status_checks/contexts + checks: + - context: continuous-integration/travis-ci + app_id: + restrictions: + url: https://api.github.com/repos/octocat/hello-world/branches/main/protection/restrictions + users_url: https://api.github.com/repos/octocat/hello-world/branches/main/protection/restrictions/users + teams_url: https://api.github.com/repos/octocat/hello-world/branches/main/protection/restrictions/teams + apps_url: https://api.github.com/repos/octocat/hello-world/branches/main/protection/restrictions/apps + users: [] + teams: [] + apps: [] + required_pull_request_reviews: + url: https://api.github.com/repos/octocat/hello-world/branches/main/protection/required_pull_request_reviews + dismiss_stale_reviews: true + require_code_owner_reviews: true + required_approving_review_count: 2 + dismissal_restrictions: + url: https://api.github.com/repos/octocat/hello-world/branches/main/protection/dismissal_restrictions + users_url: https://api.github.com/repos/octocat/hello-world/branches/main/protection/dismissal_restrictions/users + teams_url: https://api.github.com/repos/octocat/hello-world/branches/main/protection/dismissal_restrictions/teams + users: [] + teams: [] + apps: [] + required_signatures: + url: https://api.github.com/repos/octocat/hello-world/branches/main/protection/required_signatures + enabled: false + enforce_admins: + url: https://api.github.com/repos/octocat/hello-world/branches/main/protection/enforce_admins + enabled: true + required_linear_history: + enabled: true + allow_force_pushes: + enabled: true + allow_deletions: + enabled: true + block_creations: + enabled: true + required_conversation_resolution: + enabled: true '403': *34 '422': *121 '404': *29 @@ -30444,7 +30575,7 @@ paths: properties: contexts: type: array - description: contexts parameter + description: The name of the status checks items: type: string required: @@ -30453,9 +30584,16 @@ paths: contexts: - contexts - type: array - description: contexts parameter + description: The name of the status checks items: type: string + examples: + default: + summary: Example adding status checks to a branch protection rule + value: + contexts: + - continuous-integration/travis-ci + - continuous-integration/jenkins responses: '200': description: Response @@ -30506,7 +30644,7 @@ paths: properties: contexts: type: array - description: contexts parameter + description: The name of the status checks items: type: string required: @@ -30515,9 +30653,15 @@ paths: contexts: - contexts - type: array - description: contexts parameter + description: The name of the status checks items: type: string + examples: + default: + summary: Example updating status checks for a branch protection rule + value: + contexts: + - continuous-integration/travis-ci responses: '200': description: Response @@ -30565,7 +30709,7 @@ paths: properties: contexts: type: array - description: contexts parameter + description: The name of the status checks items: type: string required: @@ -30574,9 +30718,15 @@ paths: contexts: - contexts - type: array - description: contexts parameter + description: The name of the status checks items: type: string + examples: + default: + summary: Example removing status checks from a branch protection rule + value: + contexts: + - continuous-integration/travis-ci responses: '200': description: Response @@ -31029,7 +31179,7 @@ paths: properties: teams: type: array - description: teams parameter + description: The slug values for teams items: type: string required: @@ -31038,9 +31188,15 @@ paths: teams: - my-team - type: array - description: teams parameter + description: The slug values for teams items: type: string + examples: + default: + summary: Example adding a team in a branch protection rule + value: + teams: + - justice-league responses: '200': description: Response @@ -31088,18 +31244,24 @@ paths: properties: teams: type: array - description: teams parameter + description: The slug values for teams items: type: string required: - teams example: teams: - - my-team + - justice-league - type: array - description: teams parameter + description: The slug values for teams items: type: string + examples: + default: + summary: Example replacing a team in a branch protection rule + value: + teams: + - justice-league responses: '200': description: Response @@ -31146,7 +31308,7 @@ paths: properties: teams: type: array - description: teams parameter + description: The slug values for teams items: type: string required: @@ -31155,9 +31317,15 @@ paths: teams: - my-team - type: array - description: teams parameter + description: The slug values for teams items: type: string + examples: + default: + summary: Example removing a team in a branch protection rule + value: + teams: + - justice-league responses: '200': description: Response @@ -31238,7 +31406,7 @@ paths: properties: users: type: array - description: users parameter + description: The username for users items: type: string required: @@ -31249,6 +31417,12 @@ paths: - type: array items: type: string + examples: + default: + summary: Example adding a user in a branch protection rule + value: + users: + - octocat responses: '200': description: Response @@ -31296,7 +31470,7 @@ paths: properties: users: type: array - description: users parameter + description: The username for users items: type: string required: @@ -31307,6 +31481,12 @@ paths: - type: array items: type: string + examples: + default: + summary: Example replacing a user in a branch protection rule + value: + users: + - octocat responses: '200': description: Response @@ -31353,7 +31533,7 @@ paths: properties: users: type: array - description: users parameter + description: The username for users items: type: string required: @@ -31364,6 +31544,12 @@ paths: - type: array items: type: string + examples: + default: + summary: Example removing a user in a branch protection rule + value: + users: + - octocat responses: '200': description: Response @@ -34386,6 +34572,16 @@ paths: description: An identifier for the upload. examples: - 6c81cd8e-b078-4ac3-a3be-1dad7dbd0b53 + - *7 + - name: sort + description: The property by which to sort the results. + in: query + required: false + schema: + type: string + enum: + - created + default: created responses: '200': description: Response @@ -38374,29 +38570,31 @@ paths: support [a custom media type](https://docs.github.com/github-ae@latest/rest/reference/repos#custom-media-types) for\nretrieving the raw content or rendered HTML (when supported). All content types support [a custom media\ntype](https://docs.github.com/github-ae@latest/rest/reference/repos#custom-media-types) - to ensure the content is returned in a consistent\nobject format.\n\n**Note**:\n* + to ensure the content is returned in a consistent\nobject format.\n\n**Notes**:\n* \ To get a repository's contents recursively, you can [recursively get the tree](https://docs.github.com/github-ae@latest/rest/reference/git#trees).\n* \ This API has an upper limit of 1,000 files for a directory. If you need - to retrieve more files, use the [Git Trees\nAPI](https://docs.github.com/github-ae@latest/rest/reference/git#get-a-tree).\n* - \ This API supports files up to 1 megabyte in size.\n\n#### If the content - is a directory\nThe response will be an array of objects, one object for each - item in the directory.\nWhen listing the contents of a directory, submodules - have their \"type\" specified as \"file\". Logically, the value\n_should_ - be \"submodule\". This behavior exists in API v3 [for backwards compatibility - purposes](https://git.io/v1YCW).\nIn the next major version of the API, the - type will be returned as \"submodule\".\n\n#### If the content is a symlink - \nIf the requested `:path` points to a symlink, and the symlink's target is - a normal file in the repository, then the\nAPI responds with the content of - the file (in the format shown in the example. Otherwise, the API responds - with an object \ndescribing the symlink itself.\n\n#### If the content is - a submodule\nThe `submodule_git_url` identifies the location of the submodule - repository, and the `sha` identifies a specific\ncommit within the submodule - repository. Git uses the given URL when cloning the submodule repository, - and checks out\nthe submodule at that specific commit.\n\nIf the submodule - repository is not hosted on github.com, the Git URLs (`git_url` and `_links[\"git\"]`) - and the\ngithub.com URLs (`html_url` and `_links[\"html\"]`) will have null - values." + to retrieve more files, use the [Git Trees\nAPI](https://docs.github.com/github-ae@latest/rest/reference/git#get-a-tree).\n + * Download URLs expire and are meant to be used just once. To ensure the + download URL does not expire, please use the contents API to obtain a fresh + download URL for each download. \n* This API supports files up to 1 megabyte + in size.\n\n#### If the content is a directory\nThe response will be an array + of objects, one object for each item in the directory.\nWhen listing the contents + of a directory, submodules have their \"type\" specified as \"file\". Logically, + the value\n_should_ be \"submodule\". This behavior exists in API v3 [for + backwards compatibility purposes](https://git.io/v1YCW).\nIn the next major + version of the API, the type will be returned as \"submodule\".\n\n#### If + the content is a symlink \nIf the requested `:path` points to a symlink, and + the symlink's target is a normal file in the repository, then the\nAPI responds + with the content of the file (in the format shown in the example. Otherwise, + the API responds with an object \ndescribing the symlink itself.\n\n#### If + the content is a submodule\nThe `submodule_git_url` identifies the location + of the submodule repository, and the `sha` identifies a specific\ncommit within + the submodule repository. Git uses the given URL when cloning the submodule + repository, and checks out\nthe submodule at that specific commit.\n\nIf the + submodule repository is not hosted on github.com, the Git URLs (`git_url` + and `_links[\"git\"]`) and the\ngithub.com URLs (`html_url` and `_links[\"html\"]`) + will have null values." tags: - repos operationId: repos/get-content @@ -43786,6 +43984,11 @@ paths: - maintain - triage - admin + examples: + default: + summary: Example request body + value: + permissions: write responses: '200': description: Response @@ -44163,6 +44366,7 @@ paths: type: User site_admin: false author_association: COLLABORATOR + state_reason: completed headers: Link: *6 '301': *189 @@ -44415,6 +44619,7 @@ paths: type: User site_admin: false author_association: COLLABORATOR + state_reason: completed headers: Location: example: https://api.github.com/repos/octocat/Hello-World/issues/1347 @@ -45119,6 +45324,7 @@ paths: created_at: '2011-04-22T13:33:48Z' updated_at: '2011-04-22T13:33:48Z' author_association: COLLABORATOR + state_reason: completed headers: Link: *6 '422': *25 @@ -45341,6 +45547,7 @@ paths: created_at: '2011-04-22T13:33:48Z' updated_at: '2011-04-22T13:33:48Z' author_association: COLLABORATOR + state_reason: completed '404': *29 '410': *155 '403': *34 @@ -45443,6 +45650,13 @@ paths: enum: - open - closed + state_reason: + type: + - string + - 'null' + description: The reason for the current state + examples: + - not_planned milestone: oneOf: - type: string @@ -59270,6 +59484,7 @@ paths: score: 1 locked: true author_association: COLLABORATOR + state_reason: completed '503': *223 '422': *25 '304': *36 diff --git a/descriptions-next/github.ae/github.ae.json b/descriptions-next/github.ae/github.ae.json index 159db312b4..02e5e5cf50 100644 --- a/descriptions-next/github.ae/github.ae.json +++ b/descriptions-next/github.ae/github.ae.json @@ -18022,6 +18022,11 @@ "application/json": { "schema": { "$ref": "#/components/schemas/branch-with-protection" + }, + "examples": { + "default": { + "$ref": "#/components/examples/branch-get" + } } } } @@ -18372,6 +18377,11 @@ "application/json": { "schema": { "$ref": "#/components/schemas/protected-branch" + }, + "examples": { + "default": { + "$ref": "#/components/examples/branch-protection-update" + } } } } @@ -19221,7 +19231,7 @@ "properties": { "contexts": { "type": "array", - "description": "contexts parameter", + "description": "The name of the status checks", "items": { "type": "string" } @@ -19238,12 +19248,23 @@ }, { "type": "array", - "description": "contexts parameter", + "description": "The name of the status checks", "items": { "type": "string" } } ] + }, + "examples": { + "default": { + "summary": "Example adding status checks to a branch protection rule", + "value": { + "contexts": [ + "continuous-integration/travis-ci", + "continuous-integration/jenkins" + ] + } + } } } } @@ -19321,7 +19342,7 @@ "properties": { "contexts": { "type": "array", - "description": "contexts parameter", + "description": "The name of the status checks", "items": { "type": "string" } @@ -19338,12 +19359,22 @@ }, { "type": "array", - "description": "contexts parameter", + "description": "The name of the status checks", "items": { "type": "string" } } ] + }, + "examples": { + "default": { + "summary": "Example updating status checks for a branch protection rule", + "value": { + "contexts": [ + "continuous-integration/travis-ci" + ] + } + } } } } @@ -19416,7 +19447,7 @@ "properties": { "contexts": { "type": "array", - "description": "contexts parameter", + "description": "The name of the status checks", "items": { "type": "string" } @@ -19433,12 +19464,22 @@ }, { "type": "array", - "description": "contexts parameter", + "description": "The name of the status checks", "items": { "type": "string" } } ] + }, + "examples": { + "default": { + "summary": "Example removing status checks from a branch protection rule", + "value": { + "contexts": [ + "continuous-integration/travis-ci" + ] + } + } } } } @@ -19974,7 +20015,7 @@ "properties": { "teams": { "type": "array", - "description": "teams parameter", + "description": "The slug values for teams", "items": { "type": "string" } @@ -19991,12 +20032,22 @@ }, { "type": "array", - "description": "teams parameter", + "description": "The slug values for teams", "items": { "type": "string" } } ] + }, + "examples": { + "default": { + "summary": "Example adding a team in a branch protection rule", + "value": { + "teams": [ + "justice-league" + ] + } + } } } } @@ -20065,7 +20116,7 @@ "properties": { "teams": { "type": "array", - "description": "teams parameter", + "description": "The slug values for teams", "items": { "type": "string" } @@ -20076,18 +20127,28 @@ ], "example": { "teams": [ - "my-team" + "justice-league" ] } }, { "type": "array", - "description": "teams parameter", + "description": "The slug values for teams", "items": { "type": "string" } } ] + }, + "examples": { + "default": { + "summary": "Example replacing a team in a branch protection rule", + "value": { + "teams": [ + "justice-league" + ] + } + } } } } @@ -20155,7 +20216,7 @@ "properties": { "teams": { "type": "array", - "description": "teams parameter", + "description": "The slug values for teams", "items": { "type": "string" } @@ -20172,12 +20233,22 @@ }, { "type": "array", - "description": "teams parameter", + "description": "The slug values for teams", "items": { "type": "string" } } ] + }, + "examples": { + "default": { + "summary": "Example removing a team in a branch protection rule", + "value": { + "teams": [ + "justice-league" + ] + } + } } } } @@ -20300,7 +20371,7 @@ "properties": { "users": { "type": "array", - "description": "users parameter", + "description": "The username for users", "items": { "type": "string" } @@ -20322,6 +20393,16 @@ } } ] + }, + "examples": { + "default": { + "summary": "Example adding a user in a branch protection rule", + "value": { + "users": [ + "octocat" + ] + } + } } } } @@ -20390,7 +20471,7 @@ "properties": { "users": { "type": "array", - "description": "users parameter", + "description": "The username for users", "items": { "type": "string" } @@ -20412,6 +20493,16 @@ } } ] + }, + "examples": { + "default": { + "summary": "Example replacing a user in a branch protection rule", + "value": { + "users": [ + "octocat" + ] + } + } } } } @@ -20479,7 +20570,7 @@ "properties": { "users": { "type": "array", - "description": "users parameter", + "description": "The username for users", "items": { "type": "string" } @@ -20501,6 +20592,16 @@ } } ] + }, + "examples": { + "default": { + "summary": "Example removing a user in a branch protection rule", + "value": { + "users": [ + "octocat" + ] + } + } } } } @@ -22071,6 +22172,22 @@ "schema": { "$ref": "#/components/schemas/code-scanning-analysis-sarif-id" } + }, + { + "$ref": "#/components/parameters/direction" + }, + { + "name": "sort", + "description": "The property by which to sort the results.", + "in": "query", + "required": false, + "schema": { + "type": "string", + "enum": [ + "created" + ], + "default": "created" + } } ], "responses": { @@ -24097,7 +24214,7 @@ "/repos/{owner}/{repo}/contents/{path}": { "get": { "summary": "Get repository content", - "description": "Gets the contents of a file or directory in a repository. Specify the file path or directory in `:path`. If you omit\n`:path`, you will receive the contents of the repository's root directory. See the description below regarding what the API response includes for directories. \n\nFiles and symlinks support [a custom media type](https://docs.github.com/github-ae@latest/rest/reference/repos#custom-media-types) for\nretrieving the raw content or rendered HTML (when supported). All content types support [a custom media\ntype](https://docs.github.com/github-ae@latest/rest/reference/repos#custom-media-types) to ensure the content is returned in a consistent\nobject format.\n\n**Note**:\n* To get a repository's contents recursively, you can [recursively get the tree](https://docs.github.com/github-ae@latest/rest/reference/git#trees).\n* This API has an upper limit of 1,000 files for a directory. If you need to retrieve more files, use the [Git Trees\nAPI](https://docs.github.com/github-ae@latest/rest/reference/git#get-a-tree).\n* This API supports files up to 1 megabyte in size.\n\n#### If the content is a directory\nThe response will be an array of objects, one object for each item in the directory.\nWhen listing the contents of a directory, submodules have their \"type\" specified as \"file\". Logically, the value\n_should_ be \"submodule\". This behavior exists in API v3 [for backwards compatibility purposes](https://git.io/v1YCW).\nIn the next major version of the API, the type will be returned as \"submodule\".\n\n#### If the content is a symlink \nIf the requested `:path` points to a symlink, and the symlink's target is a normal file in the repository, then the\nAPI responds with the content of the file (in the format shown in the example. Otherwise, the API responds with an object \ndescribing the symlink itself.\n\n#### If the content is a submodule\nThe `submodule_git_url` identifies the location of the submodule repository, and the `sha` identifies a specific\ncommit within the submodule repository. Git uses the given URL when cloning the submodule repository, and checks out\nthe submodule at that specific commit.\n\nIf the submodule repository is not hosted on github.com, the Git URLs (`git_url` and `_links[\"git\"]`) and the\ngithub.com URLs (`html_url` and `_links[\"html\"]`) will have null values.", + "description": "Gets the contents of a file or directory in a repository. Specify the file path or directory in `:path`. If you omit\n`:path`, you will receive the contents of the repository's root directory. See the description below regarding what the API response includes for directories. \n\nFiles and symlinks support [a custom media type](https://docs.github.com/github-ae@latest/rest/reference/repos#custom-media-types) for\nretrieving the raw content or rendered HTML (when supported). All content types support [a custom media\ntype](https://docs.github.com/github-ae@latest/rest/reference/repos#custom-media-types) to ensure the content is returned in a consistent\nobject format.\n\n**Notes**:\n* To get a repository's contents recursively, you can [recursively get the tree](https://docs.github.com/github-ae@latest/rest/reference/git#trees).\n* This API has an upper limit of 1,000 files for a directory. If you need to retrieve more files, use the [Git Trees\nAPI](https://docs.github.com/github-ae@latest/rest/reference/git#get-a-tree).\n * Download URLs expire and are meant to be used just once. To ensure the download URL does not expire, please use the contents API to obtain a fresh download URL for each download. \n* This API supports files up to 1 megabyte in size.\n\n#### If the content is a directory\nThe response will be an array of objects, one object for each item in the directory.\nWhen listing the contents of a directory, submodules have their \"type\" specified as \"file\". Logically, the value\n_should_ be \"submodule\". This behavior exists in API v3 [for backwards compatibility purposes](https://git.io/v1YCW).\nIn the next major version of the API, the type will be returned as \"submodule\".\n\n#### If the content is a symlink \nIf the requested `:path` points to a symlink, and the symlink's target is a normal file in the repository, then the\nAPI responds with the content of the file (in the format shown in the example. Otherwise, the API responds with an object \ndescribing the symlink itself.\n\n#### If the content is a submodule\nThe `submodule_git_url` identifies the location of the submodule repository, and the `sha` identifies a specific\ncommit within the submodule repository. Git uses the given URL when cloning the submodule repository, and checks out\nthe submodule at that specific commit.\n\nIf the submodule repository is not hosted on github.com, the Git URLs (`git_url` and `_links[\"git\"]`) and the\ngithub.com URLs (`html_url` and `_links[\"html\"]`) will have null values.", "tags": [ "repos" ], @@ -28113,6 +28230,14 @@ ] } } + }, + "examples": { + "default": { + "summary": "Example request body", + "value": { + "permissions": "write" + } + } } } } @@ -29230,6 +29355,16 @@ "closed" ] }, + "state_reason": { + "type": [ + "string", + "null" + ], + "description": "The reason for the current state", + "examples": [ + "not_planned" + ] + }, "milestone": { "oneOf": [ { @@ -45351,14 +45486,6 @@ "write" ] }, - "organization_custom_roles": { - "type": "string", - "description": "The level of permission to grant the access token for custom roles management.", - "enum": [ - "read", - "write" - ] - }, "deployments": { "type": "string", "description": "The level of permission to grant the access token for deployments and deployment statuses.", @@ -78636,6 +78763,113 @@ } ] }, + "branch-get": { + "value": { + "name": "main", + "commit": { + "sha": "7fd1a60b01f91b314f59955a4e4d4e80d8edf11d", + "node_id": "MDY6Q29tbWl0MTI5NjI2OTo3ZmQxYTYwYjAxZjkxYjMxNGY1OTk1NWE0ZTRkNGU4MGQ4ZWRmMTFk", + "commit": { + "author": { + "name": "The Octocat", + "email": "octocat@nowhere.com", + "date": "2012-03-06T23:06:50Z" + }, + "committer": { + "name": "The Octocat", + "email": "octocat@nowhere.com", + "date": "2012-03-06T23:06:50Z" + }, + "message": "Merge pull request #6 from Spaceghost/patch-1\n\nNew line at end of file.", + "tree": { + "sha": "b4eecafa9be2f2006ce1b709d6857b07069b4608", + "url": "https://api.github.com/repos/octocat/Hello-World/git/trees/b4eecafa9be2f2006ce1b709d6857b07069b4608" + }, + "url": "https://api.github.com/repos/octocat/Hello-World/git/commits/7fd1a60b01f91b314f59955a4e4d4e80d8edf11d", + "comment_count": 77, + "verification": { + "verified": false, + "reason": "unsigned", + "signature": null, + "payload": null + } + }, + "url": "https://api.github.com/repos/octocat/Hello-World/commits/7fd1a60b01f91b314f59955a4e4d4e80d8edf11d", + "html_url": "https://github.com/octocat/Hello-World/commit/7fd1a60b01f91b314f59955a4e4d4e80d8edf11d", + "comments_url": "https://api.github.com/repos/octocat/Hello-World/commits/7fd1a60b01f91b314f59955a4e4d4e80d8edf11d/comments", + "author": { + "login": "octocat", + "id": 583231, + "node_id": "MDQ6VXNlcjU4MzIzMQ==", + "avatar_url": "https://avatars.githubusercontent.com/u/583231?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/octocat", + "html_url": "https://github.com/octocat", + "followers_url": "https://api.github.com/users/octocat/followers", + "following_url": "https://api.github.com/users/octocat/following{/other_user}", + "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}", + "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/octocat/subscriptions", + "organizations_url": "https://api.github.com/users/octocat/orgs", + "repos_url": "https://api.github.com/users/octocat/repos", + "events_url": "https://api.github.com/users/octocat/events{/privacy}", + "received_events_url": "https://api.github.com/users/octocat/received_events", + "type": "User", + "site_admin": false + }, + "committer": { + "login": "octocat", + "id": 583231, + "node_id": "MDQ6VXNlcjU4MzIzMQ==", + "avatar_url": "https://avatars.githubusercontent.com/u/583231?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/octocat", + "html_url": "https://github.com/octocat", + "followers_url": "https://api.github.com/users/octocat/followers", + "following_url": "https://api.github.com/users/octocat/following{/other_user}", + "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}", + "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/octocat/subscriptions", + "organizations_url": "https://api.github.com/users/octocat/orgs", + "repos_url": "https://api.github.com/users/octocat/repos", + "events_url": "https://api.github.com/users/octocat/events{/privacy}", + "received_events_url": "https://api.github.com/users/octocat/received_events", + "type": "User", + "site_admin": false + }, + "parents": [ + { + "sha": "553c2077f0edc3d5dc5d17262f6aa498e69d6f8e", + "url": "https://api.github.com/repos/octocat/Hello-World/commits/553c2077f0edc3d5dc5d17262f6aa498e69d6f8e", + "html_url": "https://github.com/octocat/Hello-World/commit/553c2077f0edc3d5dc5d17262f6aa498e69d6f8e" + }, + { + "sha": "762941318ee16e59dabbacb1b4049eec22f0d303", + "url": "https://api.github.com/repos/octocat/Hello-World/commits/762941318ee16e59dabbacb1b4049eec22f0d303", + "html_url": "https://github.com/octocat/Hello-World/commit/762941318ee16e59dabbacb1b4049eec22f0d303" + } + ] + }, + "_links": { + "self": "https://api.github.com/repos/octocat/Hello-World/branches/main", + "html": "https://github.com/octocat/Hello-World/tree/main" + }, + "protected": false, + "protection": { + "enabled": false, + "required_status_checks": { + "enforcement_level": "off", + "contexts": [ + + ], + "checks": [ + + ] + } + }, + "protection_url": "https://api.github.com/repos/octocat/Hello-World/branches/main/protection" + } + }, "branch-protection": { "value": { "url": "https://api.github.com/repos/octocat/Hello-World/branches/master/protection", @@ -78832,6 +79066,83 @@ } } }, + "branch-protection-update": { + "value": { + "url": "https://api.github.com/repos/octocat/hello-world/branches/main/protection", + "required_status_checks": { + "url": "https://api.github.com/repos/octocat/hello-world/branches/main/protection/required_status_checks", + "strict": true, + "contexts": [ + "continuous-integration/travis-ci" + ], + "contexts_url": "https://api.github.com/repos/octocat/hello-world/branches/main/protection/required_status_checks/contexts", + "checks": [ + { + "context": "continuous-integration/travis-ci", + "app_id": null + } + ] + }, + "restrictions": { + "url": "https://api.github.com/repos/octocat/hello-world/branches/main/protection/restrictions", + "users_url": "https://api.github.com/repos/octocat/hello-world/branches/main/protection/restrictions/users", + "teams_url": "https://api.github.com/repos/octocat/hello-world/branches/main/protection/restrictions/teams", + "apps_url": "https://api.github.com/repos/octocat/hello-world/branches/main/protection/restrictions/apps", + "users": [ + + ], + "teams": [ + + ], + "apps": [ + + ] + }, + "required_pull_request_reviews": { + "url": "https://api.github.com/repos/octocat/hello-world/branches/main/protection/required_pull_request_reviews", + "dismiss_stale_reviews": true, + "require_code_owner_reviews": true, + "required_approving_review_count": 2, + "dismissal_restrictions": { + "url": "https://api.github.com/repos/octocat/hello-world/branches/main/protection/dismissal_restrictions", + "users_url": "https://api.github.com/repos/octocat/hello-world/branches/main/protection/dismissal_restrictions/users", + "teams_url": "https://api.github.com/repos/octocat/hello-world/branches/main/protection/dismissal_restrictions/teams", + "users": [ + + ], + "teams": [ + + ], + "apps": [ + + ] + } + }, + "required_signatures": { + "url": "https://api.github.com/repos/octocat/hello-world/branches/main/protection/required_signatures", + "enabled": false + }, + "enforce_admins": { + "url": "https://api.github.com/repos/octocat/hello-world/branches/main/protection/enforce_admins", + "enabled": true + }, + "required_linear_history": { + "enabled": true + }, + "allow_force_pushes": { + "enabled": true + }, + "allow_deletions": { + "enabled": true + }, + "block_creations": { + "enabled": true + }, + "required_conversation_resolution": { + "enabled": true + } + } + }, "protected-branch-admin-enforced-2": { "value": { "url": "https://api.github.com/repos/octocat/Hello-World/branches/master/protection/enforce_admins", @@ -83570,7 +83881,8 @@ "type": "User", "site_admin": false }, - "author_association": "COLLABORATOR" + "author_association": "COLLABORATOR", + "state_reason": "completed" } ] }, @@ -83730,7 +84042,8 @@ "type": "User", "site_admin": false }, - "author_association": "COLLABORATOR" + "author_association": "COLLABORATOR", + "state_reason": "completed" } }, "issue-comment-items": { @@ -83966,7 +84279,8 @@ "closed_at": null, "created_at": "2011-04-22T13:33:48Z", "updated_at": "2011-04-22T13:33:48Z", - "author_association": "COLLABORATOR" + "author_association": "COLLABORATOR", + "state_reason": "completed" } } ] @@ -84175,7 +84489,8 @@ "closed_at": null, "created_at": "2011-04-22T13:33:48Z", "updated_at": "2011-04-22T13:33:48Z", - "author_association": "COLLABORATOR" + "author_association": "COLLABORATOR", + "state_reason": "completed" } } }, @@ -88356,7 +88671,8 @@ "body": "...", "score": 1, "locked": true, - "author_association": "COLLABORATOR" + "author_association": "COLLABORATOR", + "state_reason": "completed" } ] } diff --git a/descriptions-next/github.ae/github.ae.yaml b/descriptions-next/github.ae/github.ae.yaml index 45a5004f59..26d15f84f8 100644 --- a/descriptions-next/github.ae/github.ae.yaml +++ b/descriptions-next/github.ae/github.ae.yaml @@ -12757,6 +12757,9 @@ paths: application/json: schema: "$ref": "#/components/schemas/branch-with-protection" + examples: + default: + "$ref": "#/components/examples/branch-get" '301': "$ref": "#/components/responses/moved_permanently" '404': @@ -13055,6 +13058,9 @@ paths: application/json: schema: "$ref": "#/components/schemas/protected-branch" + examples: + default: + "$ref": "#/components/examples/branch-protection-update" '403': "$ref": "#/components/responses/forbidden" '422': @@ -13664,7 +13670,7 @@ paths: properties: contexts: type: array - description: contexts parameter + description: The name of the status checks items: type: string required: @@ -13673,9 +13679,16 @@ paths: contexts: - contexts - type: array - description: contexts parameter + description: The name of the status checks items: type: string + examples: + default: + summary: Example adding status checks to a branch protection rule + value: + contexts: + - continuous-integration/travis-ci + - continuous-integration/jenkins responses: '200': description: Response @@ -13729,7 +13742,7 @@ paths: properties: contexts: type: array - description: contexts parameter + description: The name of the status checks items: type: string required: @@ -13738,9 +13751,15 @@ paths: contexts: - contexts - type: array - description: contexts parameter + description: The name of the status checks items: type: string + examples: + default: + summary: Example updating status checks for a branch protection rule + value: + contexts: + - continuous-integration/travis-ci responses: '200': description: Response @@ -13790,7 +13809,7 @@ paths: properties: contexts: type: array - description: contexts parameter + description: The name of the status checks items: type: string required: @@ -13799,9 +13818,15 @@ paths: contexts: - contexts - type: array - description: contexts parameter + description: The name of the status checks items: type: string + examples: + default: + summary: Example removing status checks from a branch protection rule + value: + contexts: + - continuous-integration/travis-ci responses: '200': description: Response @@ -14169,7 +14194,7 @@ paths: properties: teams: type: array - description: teams parameter + description: The slug values for teams items: type: string required: @@ -14178,9 +14203,15 @@ paths: teams: - my-team - type: array - description: teams parameter + description: The slug values for teams items: type: string + examples: + default: + summary: Example adding a team in a branch protection rule + value: + teams: + - justice-league responses: '200': description: Response @@ -14231,18 +14262,24 @@ paths: properties: teams: type: array - description: teams parameter + description: The slug values for teams items: type: string required: - teams example: teams: - - my-team + - justice-league - type: array - description: teams parameter + description: The slug values for teams items: type: string + examples: + default: + summary: Example replacing a team in a branch protection rule + value: + teams: + - justice-league responses: '200': description: Response @@ -14292,7 +14329,7 @@ paths: properties: teams: type: array - description: teams parameter + description: The slug values for teams items: type: string required: @@ -14301,9 +14338,15 @@ paths: teams: - my-team - type: array - description: teams parameter + description: The slug values for teams items: type: string + examples: + default: + summary: Example removing a team in a branch protection rule + value: + teams: + - justice-league responses: '200': description: Response @@ -14390,7 +14433,7 @@ paths: properties: users: type: array - description: users parameter + description: The username for users items: type: string required: @@ -14401,6 +14444,12 @@ paths: - type: array items: type: string + examples: + default: + summary: Example adding a user in a branch protection rule + value: + users: + - octocat responses: '200': description: Response @@ -14451,7 +14500,7 @@ paths: properties: users: type: array - description: users parameter + description: The username for users items: type: string required: @@ -14462,6 +14511,12 @@ paths: - type: array items: type: string + examples: + default: + summary: Example replacing a user in a branch protection rule + value: + users: + - octocat responses: '200': description: Response @@ -14511,7 +14566,7 @@ paths: properties: users: type: array - description: users parameter + description: The username for users items: type: string required: @@ -14522,6 +14577,12 @@ paths: - type: array items: type: string + examples: + default: + summary: Example removing a user in a branch protection rule + value: + users: + - octocat responses: '200': description: Response @@ -15714,6 +15775,16 @@ paths: required: false schema: "$ref": "#/components/schemas/code-scanning-analysis-sarif-id" + - "$ref": "#/components/parameters/direction" + - name: sort + description: The property by which to sort the results. + in: query + required: false + schema: + type: string + enum: + - created + default: created responses: '200': description: Response @@ -17310,29 +17381,31 @@ paths: support [a custom media type](https://docs.github.com/github-ae@latest/rest/reference/repos#custom-media-types) for\nretrieving the raw content or rendered HTML (when supported). All content types support [a custom media\ntype](https://docs.github.com/github-ae@latest/rest/reference/repos#custom-media-types) - to ensure the content is returned in a consistent\nobject format.\n\n**Note**:\n* + to ensure the content is returned in a consistent\nobject format.\n\n**Notes**:\n* \ To get a repository's contents recursively, you can [recursively get the tree](https://docs.github.com/github-ae@latest/rest/reference/git#trees).\n* \ This API has an upper limit of 1,000 files for a directory. If you need - to retrieve more files, use the [Git Trees\nAPI](https://docs.github.com/github-ae@latest/rest/reference/git#get-a-tree).\n* - \ This API supports files up to 1 megabyte in size.\n\n#### If the content - is a directory\nThe response will be an array of objects, one object for each - item in the directory.\nWhen listing the contents of a directory, submodules - have their \"type\" specified as \"file\". Logically, the value\n_should_ - be \"submodule\". This behavior exists in API v3 [for backwards compatibility - purposes](https://git.io/v1YCW).\nIn the next major version of the API, the - type will be returned as \"submodule\".\n\n#### If the content is a symlink - \nIf the requested `:path` points to a symlink, and the symlink's target is - a normal file in the repository, then the\nAPI responds with the content of - the file (in the format shown in the example. Otherwise, the API responds - with an object \ndescribing the symlink itself.\n\n#### If the content is - a submodule\nThe `submodule_git_url` identifies the location of the submodule - repository, and the `sha` identifies a specific\ncommit within the submodule - repository. Git uses the given URL when cloning the submodule repository, - and checks out\nthe submodule at that specific commit.\n\nIf the submodule - repository is not hosted on github.com, the Git URLs (`git_url` and `_links[\"git\"]`) - and the\ngithub.com URLs (`html_url` and `_links[\"html\"]`) will have null - values." + to retrieve more files, use the [Git Trees\nAPI](https://docs.github.com/github-ae@latest/rest/reference/git#get-a-tree).\n + * Download URLs expire and are meant to be used just once. To ensure the + download URL does not expire, please use the contents API to obtain a fresh + download URL for each download. \n* This API supports files up to 1 megabyte + in size.\n\n#### If the content is a directory\nThe response will be an array + of objects, one object for each item in the directory.\nWhen listing the contents + of a directory, submodules have their \"type\" specified as \"file\". Logically, + the value\n_should_ be \"submodule\". This behavior exists in API v3 [for + backwards compatibility purposes](https://git.io/v1YCW).\nIn the next major + version of the API, the type will be returned as \"submodule\".\n\n#### If + the content is a symlink \nIf the requested `:path` points to a symlink, and + the symlink's target is a normal file in the repository, then the\nAPI responds + with the content of the file (in the format shown in the example. Otherwise, + the API responds with an object \ndescribing the symlink itself.\n\n#### If + the content is a submodule\nThe `submodule_git_url` identifies the location + of the submodule repository, and the `sha` identifies a specific\ncommit within + the submodule repository. Git uses the given URL when cloning the submodule + repository, and checks out\nthe submodule at that specific commit.\n\nIf the + submodule repository is not hosted on github.com, the Git URLs (`git_url` + and `_links[\"git\"]`) and the\ngithub.com URLs (`html_url` and `_links[\"html\"]`) + will have null values." tags: - repos operationId: repos/get-content @@ -20287,6 +20360,11 @@ paths: - maintain - triage - admin + examples: + default: + summary: Example request body + value: + permissions: write responses: '200': description: Response @@ -21041,6 +21119,13 @@ paths: enum: - open - closed + state_reason: + type: + - string + - 'null' + description: The reason for the current state + examples: + - not_planned milestone: oneOf: - type: string @@ -32281,13 +32366,6 @@ components: enum: - read - write - organization_custom_roles: - type: string - description: The level of permission to grant the access token for custom - roles management. - enum: - - read - - write deployments: type: string description: The level of permission to grant the access token for deployments @@ -57793,6 +57871,94 @@ components: - ci-test - linter protection_url: https://api.github.com/repos/octocat/hello-world/branches/master/protection + branch-get: + value: + name: main + commit: + sha: 7fd1a60b01f91b314f59955a4e4d4e80d8edf11d + node_id: MDY6Q29tbWl0MTI5NjI2OTo3ZmQxYTYwYjAxZjkxYjMxNGY1OTk1NWE0ZTRkNGU4MGQ4ZWRmMTFk + commit: + author: + name: The Octocat + email: octocat@nowhere.com + date: '2012-03-06T23:06:50Z' + committer: + name: The Octocat + email: octocat@nowhere.com + date: '2012-03-06T23:06:50Z' + message: |- + Merge pull request #6 from Spaceghost/patch-1 + + New line at end of file. + tree: + sha: b4eecafa9be2f2006ce1b709d6857b07069b4608 + url: https://api.github.com/repos/octocat/Hello-World/git/trees/b4eecafa9be2f2006ce1b709d6857b07069b4608 + url: https://api.github.com/repos/octocat/Hello-World/git/commits/7fd1a60b01f91b314f59955a4e4d4e80d8edf11d + comment_count: 77 + verification: + verified: false + reason: unsigned + signature: + payload: + url: https://api.github.com/repos/octocat/Hello-World/commits/7fd1a60b01f91b314f59955a4e4d4e80d8edf11d + html_url: https://github.com/octocat/Hello-World/commit/7fd1a60b01f91b314f59955a4e4d4e80d8edf11d + comments_url: https://api.github.com/repos/octocat/Hello-World/commits/7fd1a60b01f91b314f59955a4e4d4e80d8edf11d/comments + author: + login: octocat + id: 583231 + node_id: MDQ6VXNlcjU4MzIzMQ== + avatar_url: https://avatars.githubusercontent.com/u/583231?v=4 + gravatar_id: '' + url: https://api.github.com/users/octocat + html_url: https://github.com/octocat + followers_url: https://api.github.com/users/octocat/followers + following_url: https://api.github.com/users/octocat/following{/other_user} + gists_url: https://api.github.com/users/octocat/gists{/gist_id} + starred_url: https://api.github.com/users/octocat/starred{/owner}{/repo} + subscriptions_url: https://api.github.com/users/octocat/subscriptions + organizations_url: https://api.github.com/users/octocat/orgs + repos_url: https://api.github.com/users/octocat/repos + events_url: https://api.github.com/users/octocat/events{/privacy} + received_events_url: https://api.github.com/users/octocat/received_events + type: User + site_admin: false + committer: + login: octocat + id: 583231 + node_id: MDQ6VXNlcjU4MzIzMQ== + avatar_url: https://avatars.githubusercontent.com/u/583231?v=4 + gravatar_id: '' + url: https://api.github.com/users/octocat + html_url: https://github.com/octocat + followers_url: https://api.github.com/users/octocat/followers + following_url: https://api.github.com/users/octocat/following{/other_user} + gists_url: https://api.github.com/users/octocat/gists{/gist_id} + starred_url: https://api.github.com/users/octocat/starred{/owner}{/repo} + subscriptions_url: https://api.github.com/users/octocat/subscriptions + organizations_url: https://api.github.com/users/octocat/orgs + repos_url: https://api.github.com/users/octocat/repos + events_url: https://api.github.com/users/octocat/events{/privacy} + received_events_url: https://api.github.com/users/octocat/received_events + type: User + site_admin: false + parents: + - sha: 553c2077f0edc3d5dc5d17262f6aa498e69d6f8e + url: https://api.github.com/repos/octocat/Hello-World/commits/553c2077f0edc3d5dc5d17262f6aa498e69d6f8e + html_url: https://github.com/octocat/Hello-World/commit/553c2077f0edc3d5dc5d17262f6aa498e69d6f8e + - sha: 762941318ee16e59dabbacb1b4049eec22f0d303 + url: https://api.github.com/repos/octocat/Hello-World/commits/762941318ee16e59dabbacb1b4049eec22f0d303 + html_url: https://github.com/octocat/Hello-World/commit/762941318ee16e59dabbacb1b4049eec22f0d303 + _links: + self: https://api.github.com/repos/octocat/Hello-World/branches/main + html: https://github.com/octocat/Hello-World/tree/main + protected: false + protection: + enabled: false + required_status_checks: + enforcement_level: 'off' + contexts: [] + checks: [] + protection_url: https://api.github.com/repos/octocat/Hello-World/branches/main/protection branch-protection: value: url: https://api.github.com/repos/octocat/Hello-World/branches/master/protection @@ -57953,6 +58119,54 @@ components: enabled: true required_conversation_resolution: enabled: true + branch-protection-update: + value: + url: https://api.github.com/repos/octocat/hello-world/branches/main/protection + required_status_checks: + url: https://api.github.com/repos/octocat/hello-world/branches/main/protection/required_status_checks + strict: true + contexts: + - continuous-integration/travis-ci + contexts_url: https://api.github.com/repos/octocat/hello-world/branches/main/protection/required_status_checks/contexts + checks: + - context: continuous-integration/travis-ci + app_id: + restrictions: + url: https://api.github.com/repos/octocat/hello-world/branches/main/protection/restrictions + users_url: https://api.github.com/repos/octocat/hello-world/branches/main/protection/restrictions/users + teams_url: https://api.github.com/repos/octocat/hello-world/branches/main/protection/restrictions/teams + apps_url: https://api.github.com/repos/octocat/hello-world/branches/main/protection/restrictions/apps + users: [] + teams: [] + apps: [] + required_pull_request_reviews: + url: https://api.github.com/repos/octocat/hello-world/branches/main/protection/required_pull_request_reviews + dismiss_stale_reviews: true + require_code_owner_reviews: true + required_approving_review_count: 2 + dismissal_restrictions: + url: https://api.github.com/repos/octocat/hello-world/branches/main/protection/dismissal_restrictions + users_url: https://api.github.com/repos/octocat/hello-world/branches/main/protection/dismissal_restrictions/users + teams_url: https://api.github.com/repos/octocat/hello-world/branches/main/protection/dismissal_restrictions/teams + users: [] + teams: [] + apps: [] + required_signatures: + url: https://api.github.com/repos/octocat/hello-world/branches/main/protection/required_signatures + enabled: false + enforce_admins: + url: https://api.github.com/repos/octocat/hello-world/branches/main/protection/enforce_admins + enabled: true + required_linear_history: + enabled: true + allow_force_pushes: + enabled: true + allow_deletions: + enabled: true + block_creations: + enabled: true + required_conversation_resolution: + enabled: true protected-branch-admin-enforced-2: value: url: https://api.github.com/repos/octocat/Hello-World/branches/master/protection/enforce_admins @@ -62055,6 +62269,7 @@ components: type: User site_admin: false author_association: COLLABORATOR + state_reason: completed issue: value: id: 1 @@ -62200,6 +62415,7 @@ components: type: User site_admin: false author_association: COLLABORATOR + state_reason: completed issue-comment-items: value: - id: 1 @@ -62413,6 +62629,7 @@ components: created_at: '2011-04-22T13:33:48Z' updated_at: '2011-04-22T13:33:48Z' author_association: COLLABORATOR + state_reason: completed issue-event: value: id: 1 @@ -62602,6 +62819,7 @@ components: created_at: '2011-04-22T13:33:48Z' updated_at: '2011-04-22T13:33:48Z' author_association: COLLABORATOR + state_reason: completed issue-event-for-issue-items: value: - id: 1 @@ -66328,6 +66546,7 @@ components: score: 1 locked: true author_association: COLLABORATOR + state_reason: completed label-search-result-item-paginated: value: total_count: 2