Skip to content

Commit

Permalink
feat: add new "List CodeQL databases for a repository" (`GET /repos/{…
Browse files Browse the repository at this point in the history
…owner}/{repo}/code-scanning/codeql/databases`) and "Get a CodeQL database for a repository" (`GET /repos/{owner}/{repo}/code-scanning/codeql/databases/{language}`) APIs, plus description tweaks (#294)

WIP: schema updates

Co-authored-by: Octokit Bot <[email protected]>
  • Loading branch information
octokitbot and Octokit Bot authored Sep 15, 2022
1 parent cb05d6e commit 7456c02
Show file tree
Hide file tree
Showing 39 changed files with 4,869 additions and 343 deletions.
715 changes: 710 additions & 5 deletions cache/api.github.com.deref.json

Large diffs are not rendered by default.

283 changes: 280 additions & 3 deletions cache/api.github.com.json
Original file line number Diff line number Diff line change
Expand Up @@ -27952,6 +27952,131 @@
}
}
},
"/repos/{owner}/{repo}/code-scanning/codeql/databases": {
"get": {
"summary": "List CodeQL databases for a repository",
"description": "Lists the CodeQL databases that are available in a repository.\n\nFor private repositories, you must use an access token with the `security_events` scope.\nFor public repositories, you can use tokens with the `security_events` or `public_repo` scope.\nGitHub Apps must have the `contents` read permission to use this endpoint.",
"tags": [
"code-scanning"
],
"operationId": "code-scanning/list-codeql-databases",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/code-scanning#list-codeql-databases"
},
"parameters": [
{
"$ref": "#/components/parameters/owner"
},
{
"$ref": "#/components/parameters/repo"
}
],
"responses": {
"200": {
"description": "Response",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/code-scanning-codeql-database"
}
},
"examples": {
"default": {
"$ref": "#/components/examples/code-scanning-codeql-databases"
}
}
}
}
},
"403": {
"$ref": "#/components/responses/code_scanning_forbidden_read"
},
"404": {
"$ref": "#/components/responses/not_found"
},
"503": {
"$ref": "#/components/responses/service_unavailable"
}
},
"x-github": {
"githubCloudOnly": true,
"enabledForGitHubApps": true,
"previews": [],
"category": "code-scanning",
"subcategory": null
}
}
},
"/repos/{owner}/{repo}/code-scanning/codeql/databases/{language}": {
"get": {
"summary": "Get a CodeQL database for a repository",
"description": "Gets a CodeQL database for a language in a repository.\n\nBy default this endpoint returns JSON metadata about the CodeQL database. To\ndownload the CodeQL database binary content, set the `Accept` header of the request\nto [`application/zip`](https://docs.github.com/rest/overview/media-types), and make sure\nyour HTTP client is configured to follow redirects or use the `Location` header\nto make a second request to get the redirect URL.\n\nFor private repositories, you must use an access token with the `security_events` scope.\nFor public repositories, you can use tokens with the `security_events` or `public_repo` scope.\nGitHub Apps must have the `contents` read permission to use this endpoint.",
"tags": [
"code-scanning"
],
"operationId": "code-scanning/get-codeql-database",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/code-scanning#get-codeql-database"
},
"parameters": [
{
"$ref": "#/components/parameters/owner"
},
{
"$ref": "#/components/parameters/repo"
},
{
"name": "language",
"in": "path",
"description": "The language of the CodeQL database.",
"schema": {
"type": "string"
},
"required": true
}
],
"responses": {
"200": {
"description": "Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/code-scanning-codeql-database"
},
"examples": {
"default": {
"$ref": "#/components/examples/code-scanning-codeql-database"
}
}
}
}
},
"302": {
"$ref": "#/components/responses/found"
},
"403": {
"$ref": "#/components/responses/code_scanning_forbidden_read"
},
"404": {
"$ref": "#/components/responses/not_found"
},
"503": {
"$ref": "#/components/responses/service_unavailable"
}
},
"x-github": {
"githubCloudOnly": true,
"enabledForGitHubApps": true,
"previews": [],
"category": "code-scanning",
"subcategory": null
}
}
},
"/repos/{owner}/{repo}/code-scanning/sarifs": {
"post": {
"summary": "Upload an analysis as SARIF data",
Expand Down Expand Up @@ -30692,7 +30817,7 @@
},
"put": {
"summary": "Create or update file contents",
"description": "Creates a new file or replaces an existing file in a repository. You must authenticate using an access token with the `workflow` scope to use this endpoint.",
"description": "Creates a new file or replaces an existing file in a repository. You must authenticate using an access token with the `workflow` scope to use this endpoint.\n\n**Note:** If you use this endpoint and the \"[Delete a file](https://docs.github.com/rest/reference/repos/#delete-file)\" endpoint in parallel, the concurrent requests will conflict and you will receive errors. You must use these endpoints serially instead.",
"tags": [
"repos"
],
Expand Down Expand Up @@ -30870,7 +30995,7 @@
},
"delete": {
"summary": "Delete a file",
"description": "Deletes a file in a repository.\n\nYou can provide an additional `committer` parameter, which is an object containing information about the committer. Or, you can provide an `author` parameter, which is an object containing information about the author.\n\nThe `author` section is optional and is filled in with the `committer` information if omitted. If the `committer` information is omitted, the authenticated user's information is used.\n\nYou must provide values for both `name` and `email`, whether you choose to use `author` or `committer`. Otherwise, you'll receive a `422` status code.",
"description": "Deletes a file in a repository.\n\nYou can provide an additional `committer` parameter, which is an object containing information about the committer. Or, you can provide an `author` parameter, which is an object containing information about the author.\n\nThe `author` section is optional and is filled in with the `committer` information if omitted. If the `committer` information is omitted, the authenticated user's information is used.\n\nYou must provide values for both `name` and `email`, whether you choose to use `author` or `committer`. Otherwise, you'll receive a `422` status code.\n\n**Note:** If you use this endpoint and the \"[Create or update file contents](https://docs.github.com/rest/reference/repos/#create-or-update-file-contents)\" endpoint in parallel, the concurrent requests will conflict and you will receive errors. You must use these endpoints serially instead.",
"tags": [
"repos"
],
Expand Down Expand Up @@ -74506,6 +74631,62 @@
"confirm_delete_url"
]
},
"code-scanning-codeql-database": {
"title": "CodeQL Database",
"description": "A CodeQL database.",
"type": "object",
"properties": {
"id": {
"type": "integer",
"description": "The ID of the CodeQL database."
},
"name": {
"type": "string",
"description": "The name of the CodeQL database."
},
"language": {
"type": "string",
"description": "The language of the CodeQL database."
},
"uploader": {
"$ref": "#/components/schemas/simple-user"
},
"content_type": {
"type": "string",
"description": "The MIME type of the CodeQL database file."
},
"size": {
"type": "integer",
"description": "The size of the CodeQL database file in bytes."
},
"created_at": {
"type": "string",
"format": "date-time",
"description": "The date and time at which the CodeQL database was created, in ISO 8601 format':' YYYY-MM-DDTHH:MM:SSZ."
},
"updated_at": {
"type": "string",
"format": "date-time",
"description": "The date and time at which the CodeQL database was last updated, in ISO 8601 format':' YYYY-MM-DDTHH:MM:SSZ."
},
"url": {
"type": "string",
"format": "uri",
"description": "The URL at which to download the CodeQL database. The `Accept` header must be set to the value of the `content_type` property."
}
},
"required": [
"id",
"name",
"language",
"uploader",
"content_type",
"size",
"created_at",
"updated_at",
"url"
]
},
"code-scanning-analysis-sarif-file": {
"description": "A Base64 string representing the SARIF file to upload. You must first compress your SARIF file using [`gzip`](http://www.gnu.org/software/gzip/manual/gzip.html) and then translate the contents of the file into a Base64 encoding string. For more information, see \"[SARIF support for code scanning](https://docs.github.com/code-security/secure-coding/sarif-support-for-code-scanning).\"",
"type": "string"
Expand Down Expand Up @@ -99340,6 +99521,102 @@
"confirm_delete_url": "https://api.github.com/repos/octocat/hello-world/code-scanning/analyses/41?confirm_delete"
}
},
"code-scanning-codeql-databases": {
"value": [
{
"id": 1,
"name": "database.zip",
"language": "java",
"uploader": {
"login": "octocat",
"id": 1,
"node_id": "MDQ6VXNlcjE=",
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"gravatar_id": "",
"url": "https://api.github.com/users/octocat",
"html_url": "https://github.com/octocat",
"followers_url": "https://api.github.com/users/octocat/followers",
"following_url": "https://api.github.com/users/octocat/following{/other_user}",
"gists_url": "https://api.github.com/users/octocat/gists{/gist_id}",
"starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/octocat/subscriptions",
"organizations_url": "https://api.github.com/users/octocat/orgs",
"repos_url": "https://api.github.com/users/octocat/repos",
"events_url": "https://api.github.com/users/octocat/events{/privacy}",
"received_events_url": "https://api.github.com/users/octocat/received_events",
"type": "User",
"site_admin": false
},
"content_type": "application/zip",
"size": 1024,
"created_at": "2022-09-12T12:14:32Z",
"updated_at": "2022-09-12T12:14:32Z",
"url": "https://api.github.com/repos/octocat/Hello-World/code-scanning/codeql/databases/java"
},
{
"id": 2,
"name": "database.zip",
"language": "ruby",
"uploader": {
"login": "octocat",
"id": 1,
"node_id": "MDQ6VXNlcjE=",
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"gravatar_id": "",
"url": "https://api.github.com/users/octocat",
"html_url": "https://github.com/octocat",
"followers_url": "https://api.github.com/users/octocat/followers",
"following_url": "https://api.github.com/users/octocat/following{/other_user}",
"gists_url": "https://api.github.com/users/octocat/gists{/gist_id}",
"starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/octocat/subscriptions",
"organizations_url": "https://api.github.com/users/octocat/orgs",
"repos_url": "https://api.github.com/users/octocat/repos",
"events_url": "https://api.github.com/users/octocat/events{/privacy}",
"received_events_url": "https://api.github.com/users/octocat/received_events",
"type": "User",
"site_admin": false
},
"content_type": "application/zip",
"size": 1024,
"created_at": "2022-09-12T12:14:32Z",
"updated_at": "2022-09-12T12:14:32Z",
"url": "https://api.github.com/repos/octocat/Hello-World/code-scanning/codeql/databases/ruby"
}
]
},
"code-scanning-codeql-database": {
"value": {
"id": 1,
"name": "database.zip",
"language": "java",
"uploader": {
"login": "octocat",
"id": 1,
"node_id": "MDQ6VXNlcjE=",
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"gravatar_id": "",
"url": "https://api.github.com/users/octocat",
"html_url": "https://github.com/octocat",
"followers_url": "https://api.github.com/users/octocat/followers",
"following_url": "https://api.github.com/users/octocat/following{/other_user}",
"gists_url": "https://api.github.com/users/octocat/gists{/gist_id}",
"starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/octocat/subscriptions",
"organizations_url": "https://api.github.com/users/octocat/orgs",
"repos_url": "https://api.github.com/users/octocat/repos",
"events_url": "https://api.github.com/users/octocat/events{/privacy}",
"received_events_url": "https://api.github.com/users/octocat/received_events",
"type": "User",
"site_admin": false
},
"content_type": "application/zip",
"size": 1024,
"created_at": "2022-09-12T12:14:32Z",
"updated_at": "2022-09-12T12:14:32Z",
"url": "https://api.github.com/repos/octocat/Hello-World/code-scanning/codeql/databases/java"
}
},
"code-scanning-sarif-upload": {
"summary": "Default response",
"value": {
Expand Down Expand Up @@ -111754,7 +112031,7 @@
}
},
"code_scanning_forbidden_write": {
"description": "Response if the repository is archived or if github advanced security is not enabled for this repository",
"description": "Response if the repository is archived or if GitHub Advanced Security is not enabled for this repository",
"content": {
"application/json": {
"schema": {
Expand Down
10 changes: 5 additions & 5 deletions cache/ghes-3.2.deref.json
Original file line number Diff line number Diff line change
Expand Up @@ -168556,7 +168556,7 @@
}
},
"403": {
"description": "Response if the repository is archived or if github advanced security is not enabled for this repository",
"description": "Response if the repository is archived or if GitHub Advanced Security is not enabled for this repository",
"content": {
"application/json": {
"schema": {
Expand Down Expand Up @@ -169741,7 +169741,7 @@
}
},
"403": {
"description": "Response if the repository is archived or if github advanced security is not enabled for this repository",
"description": "Response if the repository is archived or if GitHub Advanced Security is not enabled for this repository",
"content": {
"application/json": {
"schema": {
Expand Down Expand Up @@ -169946,7 +169946,7 @@
"description": "Bad Request if the sarif field is invalid"
},
"403": {
"description": "Response if the repository is archived or if github advanced security is not enabled for this repository",
"description": "Response if the repository is archived or if GitHub Advanced Security is not enabled for this repository",
"content": {
"application/json": {
"schema": {
Expand Down Expand Up @@ -191464,7 +191464,7 @@
},
"put": {
"summary": "Create or update file contents",
"description": "Creates a new file or replaces an existing file in a repository. You must authenticate using an access token with the `workflow` scope to use this endpoint.",
"description": "Creates a new file or replaces an existing file in a repository. You must authenticate using an access token with the `workflow` scope to use this endpoint.\n\n**Note:** If you use this endpoint and the \"[Delete a file](https://docs.github.com/[email protected]/rest/reference/repos/#delete-file)\" endpoint in parallel, the concurrent requests will conflict and you will receive errors. You must use these endpoints serially instead.",
"tags": [
"repos"
],
Expand Down Expand Up @@ -192168,7 +192168,7 @@
},
"delete": {
"summary": "Delete a file",
"description": "Deletes a file in a repository.\n\nYou can provide an additional `committer` parameter, which is an object containing information about the committer. Or, you can provide an `author` parameter, which is an object containing information about the author.\n\nThe `author` section is optional and is filled in with the `committer` information if omitted. If the `committer` information is omitted, the authenticated user's information is used.\n\nYou must provide values for both `name` and `email`, whether you choose to use `author` or `committer`. Otherwise, you'll receive a `422` status code.",
"description": "Deletes a file in a repository.\n\nYou can provide an additional `committer` parameter, which is an object containing information about the committer. Or, you can provide an `author` parameter, which is an object containing information about the author.\n\nThe `author` section is optional and is filled in with the `committer` information if omitted. If the `committer` information is omitted, the authenticated user's information is used.\n\nYou must provide values for both `name` and `email`, whether you choose to use `author` or `committer`. Otherwise, you'll receive a `422` status code.\n\n**Note:** If you use this endpoint and the \"[Create or update file contents](https://docs.github.com/[email protected]/rest/reference/repos/#create-or-update-file-contents)\" endpoint in parallel, the concurrent requests will conflict and you will receive errors. You must use these endpoints serially instead.",
"tags": [
"repos"
],
Expand Down
Loading

0 comments on commit 7456c02

Please sign in to comment.