diff --git a/descriptions-next/api.github.com/api.github.com.2022-11-28.json b/descriptions-next/api.github.com/api.github.com.2022-11-28.json index a6ff19ef9f..8f99d7acd6 100644 --- a/descriptions-next/api.github.com/api.github.com.2022-11-28.json +++ b/descriptions-next/api.github.com/api.github.com.2022-11-28.json @@ -49368,6 +49368,148 @@ } } }, + "/repos/{owner}/{repo}/code-quality/setup": { + "get": { + "summary": "Get a code quality setup configuration", + "description": "Gets a code quality setup configuration.\n\nOAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with private or public repositories, or the `public_repo` scope to use this endpoint with only public repositories.", + "tags": [ + "code-quality" + ], + "operationId": "code-quality/get-setup", + "externalDocs": { + "description": "API method documentation", + "url": "https://docs.github.com/rest/code-quality/code-quality#get-a-code-quality-setup-configuration" + }, + "parameters": [ + { + "$ref": "#/components/parameters/owner" + }, + { + "$ref": "#/components/parameters/repo" + } + ], + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/code-quality-setup" + }, + "examples": { + "default": { + "$ref": "#/components/examples/code-quality-setup" + } + } + } + } + }, + "403": { + "$ref": "#/components/responses/code_quality_forbidden_read" + }, + "404": { + "$ref": "#/components/responses/not_found" + }, + "503": { + "$ref": "#/components/responses/service_unavailable" + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": true, + "category": "code-quality", + "subcategory": "code-quality" + } + }, + "patch": { + "summary": "Update a code quality setup configuration", + "description": "Updates a code quality setup configuration.\n\nOAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with private or public repositories, or the `public_repo` scope to use this endpoint with only public repositories.", + "tags": [ + "code-quality" + ], + "operationId": "code-quality/update-setup", + "externalDocs": { + "description": "API method documentation", + "url": "https://docs.github.com/rest/code-quality/code-quality#update-a-code-quality-setup-configuration" + }, + "parameters": [ + { + "$ref": "#/components/parameters/owner" + }, + { + "$ref": "#/components/parameters/repo" + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/code-quality-setup-update" + }, + "examples": { + "default": { + "$ref": "#/components/examples/code-quality-setup-update" + } + } + } + } + }, + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/empty-object" + }, + "examples": { + "default": { + "value": null + } + } + } + } + }, + "202": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/code-quality-setup-update-response" + }, + "examples": { + "default": { + "$ref": "#/components/examples/code-quality-setup-update-response" + } + } + } + } + }, + "403": { + "$ref": "#/components/responses/code_quality_forbidden_write" + }, + "404": { + "$ref": "#/components/responses/not_found" + }, + "409": { + "$ref": "#/components/responses/code_quality_conflict" + }, + "422": { + "$ref": "#/components/responses/code_quality_invalid_state" + }, + "503": { + "$ref": "#/components/responses/service_unavailable" + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": true, + "category": "code-quality", + "subcategory": "code-quality" + } + } + }, "/repos/{owner}/{repo}/code-scanning/alerts": { "get": { "summary": "List code scanning alerts for a repository", @@ -140271,6 +140413,164 @@ } } }, + "code-quality-setup": { + "description": "Configuration for code quality setup.", + "type": "object", + "properties": { + "state": { + "description": "Code quality setup has been configured or not.", + "type": "string", + "enum": [ + "configured", + "not-configured" + ] + }, + "languages": { + "description": "Languages to be analyzed.", + "type": "array", + "items": { + "type": "string", + "enum": [ + "csharp", + "go", + "java-kotlin", + "javascript-typescript", + "python", + "ruby", + "rust" + ] + } + }, + "runner_type": { + "description": "Runner type to be used.", + "type": [ + "string", + "null" + ], + "enum": [ + "standard", + "labeled", + null + ] + }, + "runner_label": { + "description": "Runner label to be used if the runner type is labeled.", + "type": [ + "string", + "null" + ], + "examples": [ + "code-scanning" + ] + }, + "updated_at": { + "description": "Timestamp of latest configuration update.", + "type": [ + "string", + "null" + ], + "format": "date-time", + "examples": [ + "2023-12-06T14:20:20.000Z" + ] + }, + "schedule": { + "description": "The frequency of the periodic analysis.", + "type": [ + "string", + "null" + ], + "enum": [ + "weekly", + null + ] + } + } + }, + "code-quality-setup-update": { + "description": "Configuration for code quality setup.", + "type": "object", + "properties": { + "state": { + "description": "The desired state of code quality setup.", + "type": "string", + "enum": [ + "configured", + "not-configured" + ] + }, + "runner_type": { + "description": "Runner type to be used.", + "type": "string", + "enum": [ + "standard", + "labeled" + ] + }, + "runner_label": { + "description": "Runner label to be used if the runner type is labeled.", + "type": [ + "string", + "null" + ], + "examples": [ + "code-scanning" + ] + }, + "languages": { + "description": "Languages to be analyzed.", + "type": "array", + "items": { + "type": "string", + "enum": [ + "csharp", + "go", + "java-kotlin", + "javascript-typescript", + "python", + "ruby" + ] + } + } + }, + "anyOf": [ + { + "required": [ + "state" + ] + }, + { + "required": [ + "runner_type" + ] + }, + { + "required": [ + "runner_label" + ] + }, + { + "required": [ + "languages" + ] + } + ], + "additionalProperties": false + }, + "code-quality-setup-update-response": { + "description": "You can use `run_url` to track the status of the run. This includes a property status and conclusion.\nYou should not rely on this always being an actions workflow run object.", + "type": "object", + "properties": { + "run_id": { + "description": "ID of the corresponding run.", + "type": "integer" + }, + "run_url": { + "description": "URL of the corresponding run.", + "type": "string" + } + } + }, "code-scanning-alert-items": { "type": "object", "properties": { @@ -321125,6 +321425,35 @@ ] } }, + "code-quality-setup": { + "value": { + "state": "configured", + "languages": [ + "javascript-typescript", + "python" + ], + "runner_type": "standard", + "runner_label": null, + "updated_at": "2023-01-01T00:00:00Z", + "schedule": "weekly" + } + }, + "code-quality-setup-update": { + "value": { + "state": "configured", + "languages": [ + "javascript-typescript", + "python", + "ruby" + ] + } + }, + "code-quality-setup-update-response": { + "value": { + "run_id": 42, + "run_url": "https://api.github.com/repos/octocat/hello-world/actions/runs/42" + } + }, "code-scanning-alert-items": { "value": [ { @@ -340222,6 +340551,46 @@ } } }, + "code_quality_forbidden_read": { + "description": "Response if the user is not authorized to access Code quality for this repository.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/basic-error" + } + } + } + }, + "code_quality_forbidden_write": { + "description": "Response if the repository is archived or if Code quality is not enabled for this repository", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/basic-error" + } + } + } + }, + "code_quality_conflict": { + "description": "Response if there is already a code quality setup configuration update in progress", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/basic-error" + } + } + } + }, + "code_quality_invalid_state": { + "description": "Response if the configuration change cannot be made", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/basic-error" + } + } + } + }, "code_scanning_forbidden_read": { "description": "Response if GitHub Advanced Security is not enabled for this repository", "content": { diff --git a/descriptions-next/api.github.com/api.github.com.2022-11-28.yaml b/descriptions-next/api.github.com/api.github.com.2022-11-28.yaml index 06c3e49dc3..2750d75a08 100644 --- a/descriptions-next/api.github.com/api.github.com.2022-11-28.yaml +++ b/descriptions-next/api.github.com/api.github.com.2022-11-28.yaml @@ -36256,6 +36256,101 @@ paths: enabledForGitHubApps: true category: checks subcategory: suites + "/repos/{owner}/{repo}/code-quality/setup": + get: + summary: Get a code quality setup configuration + description: |- + Gets a code quality setup configuration. + + OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with private or public repositories, or the `public_repo` scope to use this endpoint with only public repositories. + tags: + - code-quality + operationId: code-quality/get-setup + externalDocs: + description: API method documentation + url: https://docs.github.com/rest/code-quality/code-quality#get-a-code-quality-setup-configuration + parameters: + - "$ref": "#/components/parameters/owner" + - "$ref": "#/components/parameters/repo" + responses: + '200': + description: Response + content: + application/json: + schema: + "$ref": "#/components/schemas/code-quality-setup" + examples: + default: + "$ref": "#/components/examples/code-quality-setup" + '403': + "$ref": "#/components/responses/code_quality_forbidden_read" + '404': + "$ref": "#/components/responses/not_found" + '503': + "$ref": "#/components/responses/service_unavailable" + x-github: + githubCloudOnly: false + enabledForGitHubApps: true + category: code-quality + subcategory: code-quality + patch: + summary: Update a code quality setup configuration + description: |- + Updates a code quality setup configuration. + + OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with private or public repositories, or the `public_repo` scope to use this endpoint with only public repositories. + tags: + - code-quality + operationId: code-quality/update-setup + externalDocs: + description: API method documentation + url: https://docs.github.com/rest/code-quality/code-quality#update-a-code-quality-setup-configuration + parameters: + - "$ref": "#/components/parameters/owner" + - "$ref": "#/components/parameters/repo" + requestBody: + required: true + content: + application/json: + schema: + "$ref": "#/components/schemas/code-quality-setup-update" + examples: + default: + "$ref": "#/components/examples/code-quality-setup-update" + responses: + '200': + description: Response + content: + application/json: + schema: + "$ref": "#/components/schemas/empty-object" + examples: + default: + value: + '202': + description: Response + content: + application/json: + schema: + "$ref": "#/components/schemas/code-quality-setup-update-response" + examples: + default: + "$ref": "#/components/examples/code-quality-setup-update-response" + '403': + "$ref": "#/components/responses/code_quality_forbidden_write" + '404': + "$ref": "#/components/responses/not_found" + '409': + "$ref": "#/components/responses/code_quality_conflict" + '422': + "$ref": "#/components/responses/code_quality_invalid_state" + '503': + "$ref": "#/components/responses/service_unavailable" + x-github: + githubCloudOnly: false + enabledForGitHubApps: true + category: code-quality + subcategory: code-quality "/repos/{owner}/{repo}/code-scanning/alerts": get: summary: List code scanning alerts for a repository @@ -102323,6 +102418,118 @@ components: - setting repository: "$ref": "#/components/schemas/minimal-repository" + code-quality-setup: + description: Configuration for code quality setup. + type: object + properties: + state: + description: Code quality setup has been configured or not. + type: string + enum: + - configured + - not-configured + languages: + description: Languages to be analyzed. + type: array + items: + type: string + enum: + - csharp + - go + - java-kotlin + - javascript-typescript + - python + - ruby + - rust + runner_type: + description: Runner type to be used. + type: + - string + - 'null' + enum: + - standard + - labeled + - + runner_label: + description: Runner label to be used if the runner type is labeled. + type: + - string + - 'null' + examples: + - code-scanning + updated_at: + description: Timestamp of latest configuration update. + type: + - string + - 'null' + format: date-time + examples: + - '2023-12-06T14:20:20.000Z' + schedule: + description: The frequency of the periodic analysis. + type: + - string + - 'null' + enum: + - weekly + - + code-quality-setup-update: + description: Configuration for code quality setup. + type: object + properties: + state: + description: The desired state of code quality setup. + type: string + enum: + - configured + - not-configured + runner_type: + description: Runner type to be used. + type: string + enum: + - standard + - labeled + runner_label: + description: Runner label to be used if the runner type is labeled. + type: + - string + - 'null' + examples: + - code-scanning + languages: + description: Languages to be analyzed. + type: array + items: + type: string + enum: + - csharp + - go + - java-kotlin + - javascript-typescript + - python + - ruby + anyOf: + - required: + - state + - required: + - runner_type + - required: + - runner_label + - required: + - languages + additionalProperties: false + code-quality-setup-update-response: + description: |- + You can use `run_url` to track the status of the run. This includes a property status and conclusion. + You should not rely on this always being an actions workflow run object. + type: object + properties: + run_id: + description: ID of the corresponding run. + type: integer + run_url: + description: URL of the corresponding run. + type: string code-scanning-alert-items: type: object properties: @@ -238378,6 +238585,27 @@ components: id: 526 url: https://api.github.com/repos/github/hello-world name: hello-world + code-quality-setup: + value: + state: configured + languages: + - javascript-typescript + - python + runner_type: standard + runner_label: + updated_at: '2023-01-01T00:00:00Z' + schedule: weekly + code-quality-setup-update: + value: + state: configured + languages: + - javascript-typescript + - python + - ruby + code-quality-setup-update-response: + value: + run_id: 42 + run_url: https://api.github.com/repos/octocat/hello-world/actions/runs/42 code-scanning-alert-items: value: - number: 4 @@ -254843,6 +255071,33 @@ components: application/json: schema: "$ref": "#/components/schemas/basic-error" + code_quality_forbidden_read: + description: Response if the user is not authorized to access Code quality for + this repository. + content: + application/json: + schema: + "$ref": "#/components/schemas/basic-error" + code_quality_forbidden_write: + description: Response if the repository is archived or if Code quality is not + enabled for this repository + content: + application/json: + schema: + "$ref": "#/components/schemas/basic-error" + code_quality_conflict: + description: Response if there is already a code quality setup configuration + update in progress + content: + application/json: + schema: + "$ref": "#/components/schemas/basic-error" + code_quality_invalid_state: + description: Response if the configuration change cannot be made + content: + application/json: + schema: + "$ref": "#/components/schemas/basic-error" code_scanning_forbidden_read: description: Response if GitHub Advanced Security is not enabled for this repository content: diff --git a/descriptions-next/api.github.com/api.github.com.2026-03-10.json b/descriptions-next/api.github.com/api.github.com.2026-03-10.json index cac52e39f0..aa17411081 100644 --- a/descriptions-next/api.github.com/api.github.com.2026-03-10.json +++ b/descriptions-next/api.github.com/api.github.com.2026-03-10.json @@ -49293,6 +49293,148 @@ } } }, + "/repos/{owner}/{repo}/code-quality/setup": { + "get": { + "summary": "Get a code quality setup configuration", + "description": "Gets a code quality setup configuration.\n\nOAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with private or public repositories, or the `public_repo` scope to use this endpoint with only public repositories.", + "tags": [ + "code-quality" + ], + "operationId": "code-quality/get-setup", + "externalDocs": { + "description": "API method documentation", + "url": "https://docs.github.com/rest/code-quality/code-quality#get-a-code-quality-setup-configuration" + }, + "parameters": [ + { + "$ref": "#/components/parameters/owner" + }, + { + "$ref": "#/components/parameters/repo" + } + ], + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/code-quality-setup" + }, + "examples": { + "default": { + "$ref": "#/components/examples/code-quality-setup" + } + } + } + } + }, + "403": { + "$ref": "#/components/responses/code_quality_forbidden_read" + }, + "404": { + "$ref": "#/components/responses/not_found" + }, + "503": { + "$ref": "#/components/responses/service_unavailable" + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": true, + "category": "code-quality", + "subcategory": "code-quality" + } + }, + "patch": { + "summary": "Update a code quality setup configuration", + "description": "Updates a code quality setup configuration.\n\nOAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with private or public repositories, or the `public_repo` scope to use this endpoint with only public repositories.", + "tags": [ + "code-quality" + ], + "operationId": "code-quality/update-setup", + "externalDocs": { + "description": "API method documentation", + "url": "https://docs.github.com/rest/code-quality/code-quality#update-a-code-quality-setup-configuration" + }, + "parameters": [ + { + "$ref": "#/components/parameters/owner" + }, + { + "$ref": "#/components/parameters/repo" + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/code-quality-setup-update" + }, + "examples": { + "default": { + "$ref": "#/components/examples/code-quality-setup-update" + } + } + } + } + }, + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/empty-object" + }, + "examples": { + "default": { + "value": null + } + } + } + } + }, + "202": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/code-quality-setup-update-response" + }, + "examples": { + "default": { + "$ref": "#/components/examples/code-quality-setup-update-response" + } + } + } + } + }, + "403": { + "$ref": "#/components/responses/code_quality_forbidden_write" + }, + "404": { + "$ref": "#/components/responses/not_found" + }, + "409": { + "$ref": "#/components/responses/code_quality_conflict" + }, + "422": { + "$ref": "#/components/responses/code_quality_invalid_state" + }, + "503": { + "$ref": "#/components/responses/service_unavailable" + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": true, + "category": "code-quality", + "subcategory": "code-quality" + } + } + }, "/repos/{owner}/{repo}/code-scanning/alerts": { "get": { "summary": "List code scanning alerts for a repository", @@ -139631,6 +139773,164 @@ } } }, + "code-quality-setup": { + "description": "Configuration for code quality setup.", + "type": "object", + "properties": { + "state": { + "description": "Code quality setup has been configured or not.", + "type": "string", + "enum": [ + "configured", + "not-configured" + ] + }, + "languages": { + "description": "Languages to be analyzed.", + "type": "array", + "items": { + "type": "string", + "enum": [ + "csharp", + "go", + "java-kotlin", + "javascript-typescript", + "python", + "ruby", + "rust" + ] + } + }, + "runner_type": { + "description": "Runner type to be used.", + "type": [ + "string", + "null" + ], + "enum": [ + "standard", + "labeled", + null + ] + }, + "runner_label": { + "description": "Runner label to be used if the runner type is labeled.", + "type": [ + "string", + "null" + ], + "examples": [ + "code-scanning" + ] + }, + "updated_at": { + "description": "Timestamp of latest configuration update.", + "type": [ + "string", + "null" + ], + "format": "date-time", + "examples": [ + "2023-12-06T14:20:20.000Z" + ] + }, + "schedule": { + "description": "The frequency of the periodic analysis.", + "type": [ + "string", + "null" + ], + "enum": [ + "weekly", + null + ] + } + } + }, + "code-quality-setup-update": { + "description": "Configuration for code quality setup.", + "type": "object", + "properties": { + "state": { + "description": "The desired state of code quality setup.", + "type": "string", + "enum": [ + "configured", + "not-configured" + ] + }, + "runner_type": { + "description": "Runner type to be used.", + "type": "string", + "enum": [ + "standard", + "labeled" + ] + }, + "runner_label": { + "description": "Runner label to be used if the runner type is labeled.", + "type": [ + "string", + "null" + ], + "examples": [ + "code-scanning" + ] + }, + "languages": { + "description": "Languages to be analyzed.", + "type": "array", + "items": { + "type": "string", + "enum": [ + "csharp", + "go", + "java-kotlin", + "javascript-typescript", + "python", + "ruby" + ] + } + } + }, + "anyOf": [ + { + "required": [ + "state" + ] + }, + { + "required": [ + "runner_type" + ] + }, + { + "required": [ + "runner_label" + ] + }, + { + "required": [ + "languages" + ] + } + ], + "additionalProperties": false + }, + "code-quality-setup-update-response": { + "description": "You can use `run_url` to track the status of the run. This includes a property status and conclusion.\nYou should not rely on this always being an actions workflow run object.", + "type": "object", + "properties": { + "run_id": { + "description": "ID of the corresponding run.", + "type": "integer" + }, + "run_url": { + "description": "URL of the corresponding run.", + "type": "string" + } + } + }, "code-scanning-alert-items": { "type": "object", "properties": { @@ -320275,6 +320575,35 @@ ] } }, + "code-quality-setup": { + "value": { + "state": "configured", + "languages": [ + "javascript-typescript", + "python" + ], + "runner_type": "standard", + "runner_label": null, + "updated_at": "2023-01-01T00:00:00Z", + "schedule": "weekly" + } + }, + "code-quality-setup-update": { + "value": { + "state": "configured", + "languages": [ + "javascript-typescript", + "python", + "ruby" + ] + } + }, + "code-quality-setup-update-response": { + "value": { + "run_id": 42, + "run_url": "https://api.github.com/repos/octocat/hello-world/actions/runs/42" + } + }, "code-scanning-alert-items": { "value": [ { @@ -339282,6 +339611,46 @@ } } }, + "code_quality_forbidden_read": { + "description": "Response if the user is not authorized to access Code quality for this repository.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/basic-error" + } + } + } + }, + "code_quality_forbidden_write": { + "description": "Response if the repository is archived or if Code quality is not enabled for this repository", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/basic-error" + } + } + } + }, + "code_quality_conflict": { + "description": "Response if there is already a code quality setup configuration update in progress", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/basic-error" + } + } + } + }, + "code_quality_invalid_state": { + "description": "Response if the configuration change cannot be made", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/basic-error" + } + } + } + }, "code_scanning_forbidden_read": { "description": "Response if GitHub Advanced Security is not enabled for this repository", "content": { diff --git a/descriptions-next/api.github.com/api.github.com.2026-03-10.yaml b/descriptions-next/api.github.com/api.github.com.2026-03-10.yaml index f103db614d..484490df1e 100644 --- a/descriptions-next/api.github.com/api.github.com.2026-03-10.yaml +++ b/descriptions-next/api.github.com/api.github.com.2026-03-10.yaml @@ -36195,6 +36195,101 @@ paths: enabledForGitHubApps: true category: checks subcategory: suites + "/repos/{owner}/{repo}/code-quality/setup": + get: + summary: Get a code quality setup configuration + description: |- + Gets a code quality setup configuration. + + OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with private or public repositories, or the `public_repo` scope to use this endpoint with only public repositories. + tags: + - code-quality + operationId: code-quality/get-setup + externalDocs: + description: API method documentation + url: https://docs.github.com/rest/code-quality/code-quality#get-a-code-quality-setup-configuration + parameters: + - "$ref": "#/components/parameters/owner" + - "$ref": "#/components/parameters/repo" + responses: + '200': + description: Response + content: + application/json: + schema: + "$ref": "#/components/schemas/code-quality-setup" + examples: + default: + "$ref": "#/components/examples/code-quality-setup" + '403': + "$ref": "#/components/responses/code_quality_forbidden_read" + '404': + "$ref": "#/components/responses/not_found" + '503': + "$ref": "#/components/responses/service_unavailable" + x-github: + githubCloudOnly: false + enabledForGitHubApps: true + category: code-quality + subcategory: code-quality + patch: + summary: Update a code quality setup configuration + description: |- + Updates a code quality setup configuration. + + OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with private or public repositories, or the `public_repo` scope to use this endpoint with only public repositories. + tags: + - code-quality + operationId: code-quality/update-setup + externalDocs: + description: API method documentation + url: https://docs.github.com/rest/code-quality/code-quality#update-a-code-quality-setup-configuration + parameters: + - "$ref": "#/components/parameters/owner" + - "$ref": "#/components/parameters/repo" + requestBody: + required: true + content: + application/json: + schema: + "$ref": "#/components/schemas/code-quality-setup-update" + examples: + default: + "$ref": "#/components/examples/code-quality-setup-update" + responses: + '200': + description: Response + content: + application/json: + schema: + "$ref": "#/components/schemas/empty-object" + examples: + default: + value: + '202': + description: Response + content: + application/json: + schema: + "$ref": "#/components/schemas/code-quality-setup-update-response" + examples: + default: + "$ref": "#/components/examples/code-quality-setup-update-response" + '403': + "$ref": "#/components/responses/code_quality_forbidden_write" + '404': + "$ref": "#/components/responses/not_found" + '409': + "$ref": "#/components/responses/code_quality_conflict" + '422': + "$ref": "#/components/responses/code_quality_invalid_state" + '503': + "$ref": "#/components/responses/service_unavailable" + x-github: + githubCloudOnly: false + enabledForGitHubApps: true + category: code-quality + subcategory: code-quality "/repos/{owner}/{repo}/code-scanning/alerts": get: summary: List code scanning alerts for a repository @@ -101852,6 +101947,118 @@ components: - setting repository: "$ref": "#/components/schemas/minimal-repository" + code-quality-setup: + description: Configuration for code quality setup. + type: object + properties: + state: + description: Code quality setup has been configured or not. + type: string + enum: + - configured + - not-configured + languages: + description: Languages to be analyzed. + type: array + items: + type: string + enum: + - csharp + - go + - java-kotlin + - javascript-typescript + - python + - ruby + - rust + runner_type: + description: Runner type to be used. + type: + - string + - 'null' + enum: + - standard + - labeled + - + runner_label: + description: Runner label to be used if the runner type is labeled. + type: + - string + - 'null' + examples: + - code-scanning + updated_at: + description: Timestamp of latest configuration update. + type: + - string + - 'null' + format: date-time + examples: + - '2023-12-06T14:20:20.000Z' + schedule: + description: The frequency of the periodic analysis. + type: + - string + - 'null' + enum: + - weekly + - + code-quality-setup-update: + description: Configuration for code quality setup. + type: object + properties: + state: + description: The desired state of code quality setup. + type: string + enum: + - configured + - not-configured + runner_type: + description: Runner type to be used. + type: string + enum: + - standard + - labeled + runner_label: + description: Runner label to be used if the runner type is labeled. + type: + - string + - 'null' + examples: + - code-scanning + languages: + description: Languages to be analyzed. + type: array + items: + type: string + enum: + - csharp + - go + - java-kotlin + - javascript-typescript + - python + - ruby + anyOf: + - required: + - state + - required: + - runner_type + - required: + - runner_label + - required: + - languages + additionalProperties: false + code-quality-setup-update-response: + description: |- + You can use `run_url` to track the status of the run. This includes a property status and conclusion. + You should not rely on this always being an actions workflow run object. + type: object + properties: + run_id: + description: ID of the corresponding run. + type: integer + run_url: + description: URL of the corresponding run. + type: string code-scanning-alert-items: type: object properties: @@ -237675,6 +237882,27 @@ components: id: 526 url: https://api.github.com/repos/github/hello-world name: hello-world + code-quality-setup: + value: + state: configured + languages: + - javascript-typescript + - python + runner_type: standard + runner_label: + updated_at: '2023-01-01T00:00:00Z' + schedule: weekly + code-quality-setup-update: + value: + state: configured + languages: + - javascript-typescript + - python + - ruby + code-quality-setup-update-response: + value: + run_id: 42 + run_url: https://api.github.com/repos/octocat/hello-world/actions/runs/42 code-scanning-alert-items: value: - number: 4 @@ -254055,6 +254283,33 @@ components: application/json: schema: "$ref": "#/components/schemas/basic-error" + code_quality_forbidden_read: + description: Response if the user is not authorized to access Code quality for + this repository. + content: + application/json: + schema: + "$ref": "#/components/schemas/basic-error" + code_quality_forbidden_write: + description: Response if the repository is archived or if Code quality is not + enabled for this repository + content: + application/json: + schema: + "$ref": "#/components/schemas/basic-error" + code_quality_conflict: + description: Response if there is already a code quality setup configuration + update in progress + content: + application/json: + schema: + "$ref": "#/components/schemas/basic-error" + code_quality_invalid_state: + description: Response if the configuration change cannot be made + content: + application/json: + schema: + "$ref": "#/components/schemas/basic-error" code_scanning_forbidden_read: description: Response if GitHub Advanced Security is not enabled for this repository content: diff --git a/descriptions-next/api.github.com/api.github.com.json b/descriptions-next/api.github.com/api.github.com.json index e44d1d6908..d799dde7a4 100644 --- a/descriptions-next/api.github.com/api.github.com.json +++ b/descriptions-next/api.github.com/api.github.com.json @@ -49628,6 +49628,148 @@ } } }, + "/repos/{owner}/{repo}/code-quality/setup": { + "get": { + "summary": "Get a code quality setup configuration", + "description": "Gets a code quality setup configuration.\n\nOAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with private or public repositories, or the `public_repo` scope to use this endpoint with only public repositories.", + "tags": [ + "code-quality" + ], + "operationId": "code-quality/get-setup", + "externalDocs": { + "description": "API method documentation", + "url": "https://docs.github.com/rest/code-quality/code-quality#get-a-code-quality-setup-configuration" + }, + "parameters": [ + { + "$ref": "#/components/parameters/owner" + }, + { + "$ref": "#/components/parameters/repo" + } + ], + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/code-quality-setup" + }, + "examples": { + "default": { + "$ref": "#/components/examples/code-quality-setup" + } + } + } + } + }, + "403": { + "$ref": "#/components/responses/code_quality_forbidden_read" + }, + "404": { + "$ref": "#/components/responses/not_found" + }, + "503": { + "$ref": "#/components/responses/service_unavailable" + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": true, + "category": "code-quality", + "subcategory": "code-quality" + } + }, + "patch": { + "summary": "Update a code quality setup configuration", + "description": "Updates a code quality setup configuration.\n\nOAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with private or public repositories, or the `public_repo` scope to use this endpoint with only public repositories.", + "tags": [ + "code-quality" + ], + "operationId": "code-quality/update-setup", + "externalDocs": { + "description": "API method documentation", + "url": "https://docs.github.com/rest/code-quality/code-quality#update-a-code-quality-setup-configuration" + }, + "parameters": [ + { + "$ref": "#/components/parameters/owner" + }, + { + "$ref": "#/components/parameters/repo" + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/code-quality-setup-update" + }, + "examples": { + "default": { + "$ref": "#/components/examples/code-quality-setup-update" + } + } + } + } + }, + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/empty-object" + }, + "examples": { + "default": { + "value": null + } + } + } + } + }, + "202": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/code-quality-setup-update-response" + }, + "examples": { + "default": { + "$ref": "#/components/examples/code-quality-setup-update-response" + } + } + } + } + }, + "403": { + "$ref": "#/components/responses/code_quality_forbidden_write" + }, + "404": { + "$ref": "#/components/responses/not_found" + }, + "409": { + "$ref": "#/components/responses/code_quality_conflict" + }, + "422": { + "$ref": "#/components/responses/code_quality_invalid_state" + }, + "503": { + "$ref": "#/components/responses/service_unavailable" + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": true, + "category": "code-quality", + "subcategory": "code-quality" + } + } + }, "/repos/{owner}/{repo}/code-scanning/alerts": { "get": { "summary": "List code scanning alerts for a repository", @@ -141282,6 +141424,164 @@ } } }, + "code-quality-setup": { + "description": "Configuration for code quality setup.", + "type": "object", + "properties": { + "state": { + "description": "Code quality setup has been configured or not.", + "type": "string", + "enum": [ + "configured", + "not-configured" + ] + }, + "languages": { + "description": "Languages to be analyzed.", + "type": "array", + "items": { + "type": "string", + "enum": [ + "csharp", + "go", + "java-kotlin", + "javascript-typescript", + "python", + "ruby", + "rust" + ] + } + }, + "runner_type": { + "description": "Runner type to be used.", + "type": [ + "string", + "null" + ], + "enum": [ + "standard", + "labeled", + null + ] + }, + "runner_label": { + "description": "Runner label to be used if the runner type is labeled.", + "type": [ + "string", + "null" + ], + "examples": [ + "code-scanning" + ] + }, + "updated_at": { + "description": "Timestamp of latest configuration update.", + "type": [ + "string", + "null" + ], + "format": "date-time", + "examples": [ + "2023-12-06T14:20:20.000Z" + ] + }, + "schedule": { + "description": "The frequency of the periodic analysis.", + "type": [ + "string", + "null" + ], + "enum": [ + "weekly", + null + ] + } + } + }, + "code-quality-setup-update": { + "description": "Configuration for code quality setup.", + "type": "object", + "properties": { + "state": { + "description": "The desired state of code quality setup.", + "type": "string", + "enum": [ + "configured", + "not-configured" + ] + }, + "runner_type": { + "description": "Runner type to be used.", + "type": "string", + "enum": [ + "standard", + "labeled" + ] + }, + "runner_label": { + "description": "Runner label to be used if the runner type is labeled.", + "type": [ + "string", + "null" + ], + "examples": [ + "code-scanning" + ] + }, + "languages": { + "description": "Languages to be analyzed.", + "type": "array", + "items": { + "type": "string", + "enum": [ + "csharp", + "go", + "java-kotlin", + "javascript-typescript", + "python", + "ruby" + ] + } + } + }, + "anyOf": [ + { + "required": [ + "state" + ] + }, + { + "required": [ + "runner_type" + ] + }, + { + "required": [ + "runner_label" + ] + }, + { + "required": [ + "languages" + ] + } + ], + "additionalProperties": false + }, + "code-quality-setup-update-response": { + "description": "You can use `run_url` to track the status of the run. This includes a property status and conclusion.\nYou should not rely on this always being an actions workflow run object.", + "type": "object", + "properties": { + "run_id": { + "description": "ID of the corresponding run.", + "type": "integer" + }, + "run_url": { + "description": "URL of the corresponding run.", + "type": "string" + } + } + }, "code-scanning-alert-items": { "type": "object", "properties": { @@ -323109,6 +323409,35 @@ ] } }, + "code-quality-setup": { + "value": { + "state": "configured", + "languages": [ + "javascript-typescript", + "python" + ], + "runner_type": "standard", + "runner_label": null, + "updated_at": "2023-01-01T00:00:00Z", + "schedule": "weekly" + } + }, + "code-quality-setup-update": { + "value": { + "state": "configured", + "languages": [ + "javascript-typescript", + "python", + "ruby" + ] + } + }, + "code-quality-setup-update-response": { + "value": { + "run_id": 42, + "run_url": "https://api.github.com/repos/octocat/hello-world/actions/runs/42" + } + }, "code-scanning-alert-items": { "value": [ { @@ -342334,6 +342663,46 @@ } } }, + "code_quality_forbidden_read": { + "description": "Response if the user is not authorized to access Code quality for this repository.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/basic-error" + } + } + } + }, + "code_quality_forbidden_write": { + "description": "Response if the repository is archived or if Code quality is not enabled for this repository", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/basic-error" + } + } + } + }, + "code_quality_conflict": { + "description": "Response if there is already a code quality setup configuration update in progress", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/basic-error" + } + } + } + }, + "code_quality_invalid_state": { + "description": "Response if the configuration change cannot be made", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/basic-error" + } + } + } + }, "code_scanning_forbidden_read": { "description": "Response if GitHub Advanced Security is not enabled for this repository", "content": { diff --git a/descriptions-next/api.github.com/api.github.com.yaml b/descriptions-next/api.github.com/api.github.com.yaml index afb31a5917..b0e527785f 100644 --- a/descriptions-next/api.github.com/api.github.com.yaml +++ b/descriptions-next/api.github.com/api.github.com.yaml @@ -36394,6 +36394,101 @@ paths: enabledForGitHubApps: true category: checks subcategory: suites + "/repos/{owner}/{repo}/code-quality/setup": + get: + summary: Get a code quality setup configuration + description: |- + Gets a code quality setup configuration. + + OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with private or public repositories, or the `public_repo` scope to use this endpoint with only public repositories. + tags: + - code-quality + operationId: code-quality/get-setup + externalDocs: + description: API method documentation + url: https://docs.github.com/rest/code-quality/code-quality#get-a-code-quality-setup-configuration + parameters: + - "$ref": "#/components/parameters/owner" + - "$ref": "#/components/parameters/repo" + responses: + '200': + description: Response + content: + application/json: + schema: + "$ref": "#/components/schemas/code-quality-setup" + examples: + default: + "$ref": "#/components/examples/code-quality-setup" + '403': + "$ref": "#/components/responses/code_quality_forbidden_read" + '404': + "$ref": "#/components/responses/not_found" + '503': + "$ref": "#/components/responses/service_unavailable" + x-github: + githubCloudOnly: false + enabledForGitHubApps: true + category: code-quality + subcategory: code-quality + patch: + summary: Update a code quality setup configuration + description: |- + Updates a code quality setup configuration. + + OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with private or public repositories, or the `public_repo` scope to use this endpoint with only public repositories. + tags: + - code-quality + operationId: code-quality/update-setup + externalDocs: + description: API method documentation + url: https://docs.github.com/rest/code-quality/code-quality#update-a-code-quality-setup-configuration + parameters: + - "$ref": "#/components/parameters/owner" + - "$ref": "#/components/parameters/repo" + requestBody: + required: true + content: + application/json: + schema: + "$ref": "#/components/schemas/code-quality-setup-update" + examples: + default: + "$ref": "#/components/examples/code-quality-setup-update" + responses: + '200': + description: Response + content: + application/json: + schema: + "$ref": "#/components/schemas/empty-object" + examples: + default: + value: + '202': + description: Response + content: + application/json: + schema: + "$ref": "#/components/schemas/code-quality-setup-update-response" + examples: + default: + "$ref": "#/components/examples/code-quality-setup-update-response" + '403': + "$ref": "#/components/responses/code_quality_forbidden_write" + '404': + "$ref": "#/components/responses/not_found" + '409': + "$ref": "#/components/responses/code_quality_conflict" + '422': + "$ref": "#/components/responses/code_quality_invalid_state" + '503': + "$ref": "#/components/responses/service_unavailable" + x-github: + githubCloudOnly: false + enabledForGitHubApps: true + category: code-quality + subcategory: code-quality "/repos/{owner}/{repo}/code-scanning/alerts": get: summary: List code scanning alerts for a repository @@ -103027,6 +103122,118 @@ components: - setting repository: "$ref": "#/components/schemas/minimal-repository" + code-quality-setup: + description: Configuration for code quality setup. + type: object + properties: + state: + description: Code quality setup has been configured or not. + type: string + enum: + - configured + - not-configured + languages: + description: Languages to be analyzed. + type: array + items: + type: string + enum: + - csharp + - go + - java-kotlin + - javascript-typescript + - python + - ruby + - rust + runner_type: + description: Runner type to be used. + type: + - string + - 'null' + enum: + - standard + - labeled + - + runner_label: + description: Runner label to be used if the runner type is labeled. + type: + - string + - 'null' + examples: + - code-scanning + updated_at: + description: Timestamp of latest configuration update. + type: + - string + - 'null' + format: date-time + examples: + - '2023-12-06T14:20:20.000Z' + schedule: + description: The frequency of the periodic analysis. + type: + - string + - 'null' + enum: + - weekly + - + code-quality-setup-update: + description: Configuration for code quality setup. + type: object + properties: + state: + description: The desired state of code quality setup. + type: string + enum: + - configured + - not-configured + runner_type: + description: Runner type to be used. + type: string + enum: + - standard + - labeled + runner_label: + description: Runner label to be used if the runner type is labeled. + type: + - string + - 'null' + examples: + - code-scanning + languages: + description: Languages to be analyzed. + type: array + items: + type: string + enum: + - csharp + - go + - java-kotlin + - javascript-typescript + - python + - ruby + anyOf: + - required: + - state + - required: + - runner_type + - required: + - runner_label + - required: + - languages + additionalProperties: false + code-quality-setup-update-response: + description: |- + You can use `run_url` to track the status of the run. This includes a property status and conclusion. + You should not rely on this always being an actions workflow run object. + type: object + properties: + run_id: + description: ID of the corresponding run. + type: integer + run_url: + description: URL of the corresponding run. + type: string code-scanning-alert-items: type: object properties: @@ -239652,6 +239859,27 @@ components: id: 526 url: https://api.github.com/repos/github/hello-world name: hello-world + code-quality-setup: + value: + state: configured + languages: + - javascript-typescript + - python + runner_type: standard + runner_label: + updated_at: '2023-01-01T00:00:00Z' + schedule: weekly + code-quality-setup-update: + value: + state: configured + languages: + - javascript-typescript + - python + - ruby + code-quality-setup-update-response: + value: + run_id: 42 + run_url: https://api.github.com/repos/octocat/hello-world/actions/runs/42 code-scanning-alert-items: value: - number: 4 @@ -256181,6 +256409,33 @@ components: application/json: schema: "$ref": "#/components/schemas/basic-error" + code_quality_forbidden_read: + description: Response if the user is not authorized to access Code quality for + this repository. + content: + application/json: + schema: + "$ref": "#/components/schemas/basic-error" + code_quality_forbidden_write: + description: Response if the repository is archived or if Code quality is not + enabled for this repository + content: + application/json: + schema: + "$ref": "#/components/schemas/basic-error" + code_quality_conflict: + description: Response if there is already a code quality setup configuration + update in progress + content: + application/json: + schema: + "$ref": "#/components/schemas/basic-error" + code_quality_invalid_state: + description: Response if the configuration change cannot be made + content: + application/json: + schema: + "$ref": "#/components/schemas/basic-error" code_scanning_forbidden_read: description: Response if GitHub Advanced Security is not enabled for this repository content: diff --git a/descriptions-next/api.github.com/dereferenced/api.github.com.2022-11-28.deref.json b/descriptions-next/api.github.com/dereferenced/api.github.com.2022-11-28.deref.json index 03f35200e1..902d8632bd 100644 --- a/descriptions-next/api.github.com/dereferenced/api.github.com.2022-11-28.deref.json +++ b/descriptions-next/api.github.com/dereferenced/api.github.com.2022-11-28.deref.json @@ -353194,6 +353194,519 @@ } } }, + "/repos/{owner}/{repo}/code-quality/setup": { + "get": { + "summary": "Get a code quality setup configuration", + "description": "Gets a code quality setup configuration.\n\nOAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with private or public repositories, or the `public_repo` scope to use this endpoint with only public repositories.", + "tags": [ + "code-quality" + ], + "operationId": "code-quality/get-setup", + "externalDocs": { + "description": "API method documentation", + "url": "https://docs.github.com/rest/code-quality/code-quality#get-a-code-quality-setup-configuration" + }, + "parameters": [ + { + "name": "owner", + "description": "The account owner of the repository. The name is not case sensitive.", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "The name of the repository without the `.git` extension. The name is not case sensitive.", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "description": "Configuration for code quality setup.", + "type": "object", + "properties": { + "state": { + "description": "Code quality setup has been configured or not.", + "type": "string", + "enum": [ + "configured", + "not-configured" + ] + }, + "languages": { + "description": "Languages to be analyzed.", + "type": "array", + "items": { + "type": "string", + "enum": [ + "csharp", + "go", + "java-kotlin", + "javascript-typescript", + "python", + "ruby", + "rust" + ] + } + }, + "runner_type": { + "description": "Runner type to be used.", + "type": [ + "string", + "null" + ], + "enum": [ + "standard", + "labeled", + null + ] + }, + "runner_label": { + "description": "Runner label to be used if the runner type is labeled.", + "type": [ + "string", + "null" + ], + "examples": [ + "code-scanning" + ] + }, + "updated_at": { + "description": "Timestamp of latest configuration update.", + "type": [ + "string", + "null" + ], + "format": "date-time", + "examples": [ + "2023-12-06T14:20:20.000Z" + ] + }, + "schedule": { + "description": "The frequency of the periodic analysis.", + "type": [ + "string", + "null" + ], + "enum": [ + "weekly", + null + ] + } + } + }, + "examples": { + "default": { + "value": { + "state": "configured", + "languages": [ + "javascript-typescript", + "python" + ], + "runner_type": "standard", + "runner_label": null, + "updated_at": "2023-01-01T00:00:00Z", + "schedule": "weekly" + } + } + } + } + } + }, + "403": { + "description": "Response if the user is not authorized to access Code quality for this repository.", + "content": { + "application/json": { + "schema": { + "title": "Basic Error", + "description": "Basic Error", + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "documentation_url": { + "type": "string" + }, + "url": { + "type": "string" + }, + "status": { + "type": "string" + } + } + } + } + } + }, + "404": { + "description": "Resource not found", + "content": { + "application/json": { + "schema": { + "title": "Basic Error", + "description": "Basic Error", + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "documentation_url": { + "type": "string" + }, + "url": { + "type": "string" + }, + "status": { + "type": "string" + } + } + } + } + } + }, + "503": { + "description": "Service unavailable", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "documentation_url": { + "type": "string" + } + } + } + } + } + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": true, + "category": "code-quality", + "subcategory": "code-quality" + } + }, + "patch": { + "summary": "Update a code quality setup configuration", + "description": "Updates a code quality setup configuration.\n\nOAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with private or public repositories, or the `public_repo` scope to use this endpoint with only public repositories.", + "tags": [ + "code-quality" + ], + "operationId": "code-quality/update-setup", + "externalDocs": { + "description": "API method documentation", + "url": "https://docs.github.com/rest/code-quality/code-quality#update-a-code-quality-setup-configuration" + }, + "parameters": [ + { + "name": "owner", + "description": "The account owner of the repository. The name is not case sensitive.", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "The name of the repository without the `.git` extension. The name is not case sensitive.", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "description": "Configuration for code quality setup.", + "type": "object", + "properties": { + "state": { + "description": "The desired state of code quality setup.", + "type": "string", + "enum": [ + "configured", + "not-configured" + ] + }, + "runner_type": { + "description": "Runner type to be used.", + "type": "string", + "enum": [ + "standard", + "labeled" + ] + }, + "runner_label": { + "description": "Runner label to be used if the runner type is labeled.", + "type": [ + "string", + "null" + ], + "examples": [ + "code-scanning" + ] + }, + "languages": { + "description": "Languages to be analyzed.", + "type": "array", + "items": { + "type": "string", + "enum": [ + "csharp", + "go", + "java-kotlin", + "javascript-typescript", + "python", + "ruby" + ] + } + } + }, + "anyOf": [ + { + "required": [ + "state" + ] + }, + { + "required": [ + "runner_type" + ] + }, + { + "required": [ + "runner_label" + ] + }, + { + "required": [ + "languages" + ] + } + ], + "additionalProperties": false + }, + "examples": { + "default": { + "value": { + "state": "configured", + "languages": [ + "javascript-typescript", + "python", + "ruby" + ] + } + } + } + } + } + }, + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "title": "Empty Object", + "description": "An object without any properties.", + "type": "object", + "properties": {}, + "additionalProperties": false + }, + "examples": { + "default": { + "value": null + } + } + } + } + }, + "202": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "description": "You can use `run_url` to track the status of the run. This includes a property status and conclusion.\nYou should not rely on this always being an actions workflow run object.", + "type": "object", + "properties": { + "run_id": { + "description": "ID of the corresponding run.", + "type": "integer" + }, + "run_url": { + "description": "URL of the corresponding run.", + "type": "string" + } + } + }, + "examples": { + "default": { + "value": { + "run_id": 42, + "run_url": "https://api.github.com/repos/octocat/hello-world/actions/runs/42" + } + } + } + } + } + }, + "403": { + "description": "Response if the repository is archived or if Code quality is not enabled for this repository", + "content": { + "application/json": { + "schema": { + "title": "Basic Error", + "description": "Basic Error", + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "documentation_url": { + "type": "string" + }, + "url": { + "type": "string" + }, + "status": { + "type": "string" + } + } + } + } + } + }, + "404": { + "description": "Resource not found", + "content": { + "application/json": { + "schema": { + "title": "Basic Error", + "description": "Basic Error", + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "documentation_url": { + "type": "string" + }, + "url": { + "type": "string" + }, + "status": { + "type": "string" + } + } + } + } + } + }, + "409": { + "description": "Response if there is already a code quality setup configuration update in progress", + "content": { + "application/json": { + "schema": { + "title": "Basic Error", + "description": "Basic Error", + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "documentation_url": { + "type": "string" + }, + "url": { + "type": "string" + }, + "status": { + "type": "string" + } + } + } + } + } + }, + "422": { + "description": "Response if the configuration change cannot be made", + "content": { + "application/json": { + "schema": { + "title": "Basic Error", + "description": "Basic Error", + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "documentation_url": { + "type": "string" + }, + "url": { + "type": "string" + }, + "status": { + "type": "string" + } + } + } + } + } + }, + "503": { + "description": "Service unavailable", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "documentation_url": { + "type": "string" + } + } + } + } + } + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": true, + "category": "code-quality", + "subcategory": "code-quality" + } + } + }, "/repos/{owner}/{repo}/code-scanning/alerts": { "get": { "summary": "List code scanning alerts for a repository", diff --git a/descriptions-next/api.github.com/dereferenced/api.github.com.2022-11-28.deref.yaml b/descriptions-next/api.github.com/dereferenced/api.github.com.2022-11-28.deref.yaml index 303165b084..3124ee6cc8 100644 --- a/descriptions-next/api.github.com/dereferenced/api.github.com.2022-11-28.deref.yaml +++ b/descriptions-next/api.github.com/dereferenced/api.github.com.2022-11-28.deref.yaml @@ -71245,6 +71245,232 @@ paths: enabledForGitHubApps: true category: checks subcategory: suites + "/repos/{owner}/{repo}/code-quality/setup": + get: + summary: Get a code quality setup configuration + description: |- + Gets a code quality setup configuration. + + OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with private or public repositories, or the `public_repo` scope to use this endpoint with only public repositories. + tags: + - code-quality + operationId: code-quality/get-setup + externalDocs: + description: API method documentation + url: https://docs.github.com/rest/code-quality/code-quality#get-a-code-quality-setup-configuration + parameters: + - *338 + - *339 + responses: + '200': + description: Response + content: + application/json: + schema: + description: Configuration for code quality setup. + type: object + properties: + state: + description: Code quality setup has been configured or not. + type: string + enum: + - configured + - not-configured + languages: + description: Languages to be analyzed. + type: array + items: + type: string + enum: + - csharp + - go + - java-kotlin + - javascript-typescript + - python + - ruby + - rust + runner_type: + description: Runner type to be used. + type: + - string + - 'null' + enum: + - standard + - labeled + - + runner_label: + description: Runner label to be used if the runner type is labeled. + type: + - string + - 'null' + examples: + - code-scanning + updated_at: + description: Timestamp of latest configuration update. + type: + - string + - 'null' + format: date-time + examples: + - '2023-12-06T14:20:20.000Z' + schedule: + description: The frequency of the periodic analysis. + type: + - string + - 'null' + enum: + - weekly + - + examples: + default: + value: + state: configured + languages: + - javascript-typescript + - python + runner_type: standard + runner_label: + updated_at: '2023-01-01T00:00:00Z' + schedule: weekly + '403': + description: Response if the user is not authorized to access Code quality + for this repository. + content: + application/json: + schema: *3 + '404': *6 + '503': *114 + x-github: + githubCloudOnly: false + enabledForGitHubApps: true + category: code-quality + subcategory: code-quality + patch: + summary: Update a code quality setup configuration + description: |- + Updates a code quality setup configuration. + + OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with private or public repositories, or the `public_repo` scope to use this endpoint with only public repositories. + tags: + - code-quality + operationId: code-quality/update-setup + externalDocs: + description: API method documentation + url: https://docs.github.com/rest/code-quality/code-quality#update-a-code-quality-setup-configuration + parameters: + - *338 + - *339 + requestBody: + required: true + content: + application/json: + schema: + description: Configuration for code quality setup. + type: object + properties: + state: + description: The desired state of code quality setup. + type: string + enum: + - configured + - not-configured + runner_type: + description: Runner type to be used. + type: string + enum: + - standard + - labeled + runner_label: + description: Runner label to be used if the runner type is labeled. + type: + - string + - 'null' + examples: + - code-scanning + languages: + description: Languages to be analyzed. + type: array + items: + type: string + enum: + - csharp + - go + - java-kotlin + - javascript-typescript + - python + - ruby + anyOf: + - required: + - state + - required: + - runner_type + - required: + - runner_label + - required: + - languages + additionalProperties: false + examples: + default: + value: + state: configured + languages: + - javascript-typescript + - python + - ruby + responses: + '200': + description: Response + content: + application/json: + schema: *162 + examples: + default: + value: + '202': + description: Response + content: + application/json: + schema: + description: |- + You can use `run_url` to track the status of the run. This includes a property status and conclusion. + You should not rely on this always being an actions workflow run object. + type: object + properties: + run_id: + description: ID of the corresponding run. + type: integer + run_url: + description: URL of the corresponding run. + type: string + examples: + default: + value: + run_id: 42 + run_url: https://api.github.com/repos/octocat/hello-world/actions/runs/42 + '403': + description: Response if the repository is archived or if Code quality is + not enabled for this repository + content: + application/json: + schema: *3 + '404': *6 + '409': + description: Response if there is already a code quality setup configuration + update in progress + content: + application/json: + schema: *3 + '422': + description: Response if the configuration change cannot be made + content: + application/json: + schema: *3 + '503': *114 + x-github: + githubCloudOnly: false + enabledForGitHubApps: true + category: code-quality + subcategory: code-quality "/repos/{owner}/{repo}/code-scanning/alerts": get: summary: List code scanning alerts for a repository diff --git a/descriptions-next/api.github.com/dereferenced/api.github.com.2026-03-10.deref.json b/descriptions-next/api.github.com/dereferenced/api.github.com.2026-03-10.deref.json index 59e9895b10..6e0a77fecd 100644 --- a/descriptions-next/api.github.com/dereferenced/api.github.com.2026-03-10.deref.json +++ b/descriptions-next/api.github.com/dereferenced/api.github.com.2026-03-10.deref.json @@ -345484,6 +345484,519 @@ } } }, + "/repos/{owner}/{repo}/code-quality/setup": { + "get": { + "summary": "Get a code quality setup configuration", + "description": "Gets a code quality setup configuration.\n\nOAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with private or public repositories, or the `public_repo` scope to use this endpoint with only public repositories.", + "tags": [ + "code-quality" + ], + "operationId": "code-quality/get-setup", + "externalDocs": { + "description": "API method documentation", + "url": "https://docs.github.com/rest/code-quality/code-quality#get-a-code-quality-setup-configuration" + }, + "parameters": [ + { + "name": "owner", + "description": "The account owner of the repository. The name is not case sensitive.", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "The name of the repository without the `.git` extension. The name is not case sensitive.", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "description": "Configuration for code quality setup.", + "type": "object", + "properties": { + "state": { + "description": "Code quality setup has been configured or not.", + "type": "string", + "enum": [ + "configured", + "not-configured" + ] + }, + "languages": { + "description": "Languages to be analyzed.", + "type": "array", + "items": { + "type": "string", + "enum": [ + "csharp", + "go", + "java-kotlin", + "javascript-typescript", + "python", + "ruby", + "rust" + ] + } + }, + "runner_type": { + "description": "Runner type to be used.", + "type": [ + "string", + "null" + ], + "enum": [ + "standard", + "labeled", + null + ] + }, + "runner_label": { + "description": "Runner label to be used if the runner type is labeled.", + "type": [ + "string", + "null" + ], + "examples": [ + "code-scanning" + ] + }, + "updated_at": { + "description": "Timestamp of latest configuration update.", + "type": [ + "string", + "null" + ], + "format": "date-time", + "examples": [ + "2023-12-06T14:20:20.000Z" + ] + }, + "schedule": { + "description": "The frequency of the periodic analysis.", + "type": [ + "string", + "null" + ], + "enum": [ + "weekly", + null + ] + } + } + }, + "examples": { + "default": { + "value": { + "state": "configured", + "languages": [ + "javascript-typescript", + "python" + ], + "runner_type": "standard", + "runner_label": null, + "updated_at": "2023-01-01T00:00:00Z", + "schedule": "weekly" + } + } + } + } + } + }, + "403": { + "description": "Response if the user is not authorized to access Code quality for this repository.", + "content": { + "application/json": { + "schema": { + "title": "Basic Error", + "description": "Basic Error", + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "documentation_url": { + "type": "string" + }, + "url": { + "type": "string" + }, + "status": { + "type": "string" + } + } + } + } + } + }, + "404": { + "description": "Resource not found", + "content": { + "application/json": { + "schema": { + "title": "Basic Error", + "description": "Basic Error", + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "documentation_url": { + "type": "string" + }, + "url": { + "type": "string" + }, + "status": { + "type": "string" + } + } + } + } + } + }, + "503": { + "description": "Service unavailable", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "documentation_url": { + "type": "string" + } + } + } + } + } + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": true, + "category": "code-quality", + "subcategory": "code-quality" + } + }, + "patch": { + "summary": "Update a code quality setup configuration", + "description": "Updates a code quality setup configuration.\n\nOAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with private or public repositories, or the `public_repo` scope to use this endpoint with only public repositories.", + "tags": [ + "code-quality" + ], + "operationId": "code-quality/update-setup", + "externalDocs": { + "description": "API method documentation", + "url": "https://docs.github.com/rest/code-quality/code-quality#update-a-code-quality-setup-configuration" + }, + "parameters": [ + { + "name": "owner", + "description": "The account owner of the repository. The name is not case sensitive.", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "The name of the repository without the `.git` extension. The name is not case sensitive.", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "description": "Configuration for code quality setup.", + "type": "object", + "properties": { + "state": { + "description": "The desired state of code quality setup.", + "type": "string", + "enum": [ + "configured", + "not-configured" + ] + }, + "runner_type": { + "description": "Runner type to be used.", + "type": "string", + "enum": [ + "standard", + "labeled" + ] + }, + "runner_label": { + "description": "Runner label to be used if the runner type is labeled.", + "type": [ + "string", + "null" + ], + "examples": [ + "code-scanning" + ] + }, + "languages": { + "description": "Languages to be analyzed.", + "type": "array", + "items": { + "type": "string", + "enum": [ + "csharp", + "go", + "java-kotlin", + "javascript-typescript", + "python", + "ruby" + ] + } + } + }, + "anyOf": [ + { + "required": [ + "state" + ] + }, + { + "required": [ + "runner_type" + ] + }, + { + "required": [ + "runner_label" + ] + }, + { + "required": [ + "languages" + ] + } + ], + "additionalProperties": false + }, + "examples": { + "default": { + "value": { + "state": "configured", + "languages": [ + "javascript-typescript", + "python", + "ruby" + ] + } + } + } + } + } + }, + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "title": "Empty Object", + "description": "An object without any properties.", + "type": "object", + "properties": {}, + "additionalProperties": false + }, + "examples": { + "default": { + "value": null + } + } + } + } + }, + "202": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "description": "You can use `run_url` to track the status of the run. This includes a property status and conclusion.\nYou should not rely on this always being an actions workflow run object.", + "type": "object", + "properties": { + "run_id": { + "description": "ID of the corresponding run.", + "type": "integer" + }, + "run_url": { + "description": "URL of the corresponding run.", + "type": "string" + } + } + }, + "examples": { + "default": { + "value": { + "run_id": 42, + "run_url": "https://api.github.com/repos/octocat/hello-world/actions/runs/42" + } + } + } + } + } + }, + "403": { + "description": "Response if the repository is archived or if Code quality is not enabled for this repository", + "content": { + "application/json": { + "schema": { + "title": "Basic Error", + "description": "Basic Error", + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "documentation_url": { + "type": "string" + }, + "url": { + "type": "string" + }, + "status": { + "type": "string" + } + } + } + } + } + }, + "404": { + "description": "Resource not found", + "content": { + "application/json": { + "schema": { + "title": "Basic Error", + "description": "Basic Error", + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "documentation_url": { + "type": "string" + }, + "url": { + "type": "string" + }, + "status": { + "type": "string" + } + } + } + } + } + }, + "409": { + "description": "Response if there is already a code quality setup configuration update in progress", + "content": { + "application/json": { + "schema": { + "title": "Basic Error", + "description": "Basic Error", + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "documentation_url": { + "type": "string" + }, + "url": { + "type": "string" + }, + "status": { + "type": "string" + } + } + } + } + } + }, + "422": { + "description": "Response if the configuration change cannot be made", + "content": { + "application/json": { + "schema": { + "title": "Basic Error", + "description": "Basic Error", + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "documentation_url": { + "type": "string" + }, + "url": { + "type": "string" + }, + "status": { + "type": "string" + } + } + } + } + } + }, + "503": { + "description": "Service unavailable", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "documentation_url": { + "type": "string" + } + } + } + } + } + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": true, + "category": "code-quality", + "subcategory": "code-quality" + } + } + }, "/repos/{owner}/{repo}/code-scanning/alerts": { "get": { "summary": "List code scanning alerts for a repository", diff --git a/descriptions-next/api.github.com/dereferenced/api.github.com.2026-03-10.deref.yaml b/descriptions-next/api.github.com/dereferenced/api.github.com.2026-03-10.deref.yaml index 146b0ff663..39047d60ed 100644 --- a/descriptions-next/api.github.com/dereferenced/api.github.com.2026-03-10.deref.yaml +++ b/descriptions-next/api.github.com/dereferenced/api.github.com.2026-03-10.deref.yaml @@ -70798,6 +70798,232 @@ paths: enabledForGitHubApps: true category: checks subcategory: suites + "/repos/{owner}/{repo}/code-quality/setup": + get: + summary: Get a code quality setup configuration + description: |- + Gets a code quality setup configuration. + + OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with private or public repositories, or the `public_repo` scope to use this endpoint with only public repositories. + tags: + - code-quality + operationId: code-quality/get-setup + externalDocs: + description: API method documentation + url: https://docs.github.com/rest/code-quality/code-quality#get-a-code-quality-setup-configuration + parameters: + - *338 + - *339 + responses: + '200': + description: Response + content: + application/json: + schema: + description: Configuration for code quality setup. + type: object + properties: + state: + description: Code quality setup has been configured or not. + type: string + enum: + - configured + - not-configured + languages: + description: Languages to be analyzed. + type: array + items: + type: string + enum: + - csharp + - go + - java-kotlin + - javascript-typescript + - python + - ruby + - rust + runner_type: + description: Runner type to be used. + type: + - string + - 'null' + enum: + - standard + - labeled + - + runner_label: + description: Runner label to be used if the runner type is labeled. + type: + - string + - 'null' + examples: + - code-scanning + updated_at: + description: Timestamp of latest configuration update. + type: + - string + - 'null' + format: date-time + examples: + - '2023-12-06T14:20:20.000Z' + schedule: + description: The frequency of the periodic analysis. + type: + - string + - 'null' + enum: + - weekly + - + examples: + default: + value: + state: configured + languages: + - javascript-typescript + - python + runner_type: standard + runner_label: + updated_at: '2023-01-01T00:00:00Z' + schedule: weekly + '403': + description: Response if the user is not authorized to access Code quality + for this repository. + content: + application/json: + schema: *3 + '404': *6 + '503': *114 + x-github: + githubCloudOnly: false + enabledForGitHubApps: true + category: code-quality + subcategory: code-quality + patch: + summary: Update a code quality setup configuration + description: |- + Updates a code quality setup configuration. + + OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with private or public repositories, or the `public_repo` scope to use this endpoint with only public repositories. + tags: + - code-quality + operationId: code-quality/update-setup + externalDocs: + description: API method documentation + url: https://docs.github.com/rest/code-quality/code-quality#update-a-code-quality-setup-configuration + parameters: + - *338 + - *339 + requestBody: + required: true + content: + application/json: + schema: + description: Configuration for code quality setup. + type: object + properties: + state: + description: The desired state of code quality setup. + type: string + enum: + - configured + - not-configured + runner_type: + description: Runner type to be used. + type: string + enum: + - standard + - labeled + runner_label: + description: Runner label to be used if the runner type is labeled. + type: + - string + - 'null' + examples: + - code-scanning + languages: + description: Languages to be analyzed. + type: array + items: + type: string + enum: + - csharp + - go + - java-kotlin + - javascript-typescript + - python + - ruby + anyOf: + - required: + - state + - required: + - runner_type + - required: + - runner_label + - required: + - languages + additionalProperties: false + examples: + default: + value: + state: configured + languages: + - javascript-typescript + - python + - ruby + responses: + '200': + description: Response + content: + application/json: + schema: *162 + examples: + default: + value: + '202': + description: Response + content: + application/json: + schema: + description: |- + You can use `run_url` to track the status of the run. This includes a property status and conclusion. + You should not rely on this always being an actions workflow run object. + type: object + properties: + run_id: + description: ID of the corresponding run. + type: integer + run_url: + description: URL of the corresponding run. + type: string + examples: + default: + value: + run_id: 42 + run_url: https://api.github.com/repos/octocat/hello-world/actions/runs/42 + '403': + description: Response if the repository is archived or if Code quality is + not enabled for this repository + content: + application/json: + schema: *3 + '404': *6 + '409': + description: Response if there is already a code quality setup configuration + update in progress + content: + application/json: + schema: *3 + '422': + description: Response if the configuration change cannot be made + content: + application/json: + schema: *3 + '503': *114 + x-github: + githubCloudOnly: false + enabledForGitHubApps: true + category: code-quality + subcategory: code-quality "/repos/{owner}/{repo}/code-scanning/alerts": get: summary: List code scanning alerts for a repository 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 68dd66cba5..08c33a567f 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 @@ -361371,6 +361371,519 @@ } } }, + "/repos/{owner}/{repo}/code-quality/setup": { + "get": { + "summary": "Get a code quality setup configuration", + "description": "Gets a code quality setup configuration.\n\nOAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with private or public repositories, or the `public_repo` scope to use this endpoint with only public repositories.", + "tags": [ + "code-quality" + ], + "operationId": "code-quality/get-setup", + "externalDocs": { + "description": "API method documentation", + "url": "https://docs.github.com/rest/code-quality/code-quality#get-a-code-quality-setup-configuration" + }, + "parameters": [ + { + "name": "owner", + "description": "The account owner of the repository. The name is not case sensitive.", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "The name of the repository without the `.git` extension. The name is not case sensitive.", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "description": "Configuration for code quality setup.", + "type": "object", + "properties": { + "state": { + "description": "Code quality setup has been configured or not.", + "type": "string", + "enum": [ + "configured", + "not-configured" + ] + }, + "languages": { + "description": "Languages to be analyzed.", + "type": "array", + "items": { + "type": "string", + "enum": [ + "csharp", + "go", + "java-kotlin", + "javascript-typescript", + "python", + "ruby", + "rust" + ] + } + }, + "runner_type": { + "description": "Runner type to be used.", + "type": [ + "string", + "null" + ], + "enum": [ + "standard", + "labeled", + null + ] + }, + "runner_label": { + "description": "Runner label to be used if the runner type is labeled.", + "type": [ + "string", + "null" + ], + "examples": [ + "code-scanning" + ] + }, + "updated_at": { + "description": "Timestamp of latest configuration update.", + "type": [ + "string", + "null" + ], + "format": "date-time", + "examples": [ + "2023-12-06T14:20:20.000Z" + ] + }, + "schedule": { + "description": "The frequency of the periodic analysis.", + "type": [ + "string", + "null" + ], + "enum": [ + "weekly", + null + ] + } + } + }, + "examples": { + "default": { + "value": { + "state": "configured", + "languages": [ + "javascript-typescript", + "python" + ], + "runner_type": "standard", + "runner_label": null, + "updated_at": "2023-01-01T00:00:00Z", + "schedule": "weekly" + } + } + } + } + } + }, + "403": { + "description": "Response if the user is not authorized to access Code quality for this repository.", + "content": { + "application/json": { + "schema": { + "title": "Basic Error", + "description": "Basic Error", + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "documentation_url": { + "type": "string" + }, + "url": { + "type": "string" + }, + "status": { + "type": "string" + } + } + } + } + } + }, + "404": { + "description": "Resource not found", + "content": { + "application/json": { + "schema": { + "title": "Basic Error", + "description": "Basic Error", + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "documentation_url": { + "type": "string" + }, + "url": { + "type": "string" + }, + "status": { + "type": "string" + } + } + } + } + } + }, + "503": { + "description": "Service unavailable", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "documentation_url": { + "type": "string" + } + } + } + } + } + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": true, + "category": "code-quality", + "subcategory": "code-quality" + } + }, + "patch": { + "summary": "Update a code quality setup configuration", + "description": "Updates a code quality setup configuration.\n\nOAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with private or public repositories, or the `public_repo` scope to use this endpoint with only public repositories.", + "tags": [ + "code-quality" + ], + "operationId": "code-quality/update-setup", + "externalDocs": { + "description": "API method documentation", + "url": "https://docs.github.com/rest/code-quality/code-quality#update-a-code-quality-setup-configuration" + }, + "parameters": [ + { + "name": "owner", + "description": "The account owner of the repository. The name is not case sensitive.", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "The name of the repository without the `.git` extension. The name is not case sensitive.", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "description": "Configuration for code quality setup.", + "type": "object", + "properties": { + "state": { + "description": "The desired state of code quality setup.", + "type": "string", + "enum": [ + "configured", + "not-configured" + ] + }, + "runner_type": { + "description": "Runner type to be used.", + "type": "string", + "enum": [ + "standard", + "labeled" + ] + }, + "runner_label": { + "description": "Runner label to be used if the runner type is labeled.", + "type": [ + "string", + "null" + ], + "examples": [ + "code-scanning" + ] + }, + "languages": { + "description": "Languages to be analyzed.", + "type": "array", + "items": { + "type": "string", + "enum": [ + "csharp", + "go", + "java-kotlin", + "javascript-typescript", + "python", + "ruby" + ] + } + } + }, + "anyOf": [ + { + "required": [ + "state" + ] + }, + { + "required": [ + "runner_type" + ] + }, + { + "required": [ + "runner_label" + ] + }, + { + "required": [ + "languages" + ] + } + ], + "additionalProperties": false + }, + "examples": { + "default": { + "value": { + "state": "configured", + "languages": [ + "javascript-typescript", + "python", + "ruby" + ] + } + } + } + } + } + }, + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "title": "Empty Object", + "description": "An object without any properties.", + "type": "object", + "properties": {}, + "additionalProperties": false + }, + "examples": { + "default": { + "value": null + } + } + } + } + }, + "202": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "description": "You can use `run_url` to track the status of the run. This includes a property status and conclusion.\nYou should not rely on this always being an actions workflow run object.", + "type": "object", + "properties": { + "run_id": { + "description": "ID of the corresponding run.", + "type": "integer" + }, + "run_url": { + "description": "URL of the corresponding run.", + "type": "string" + } + } + }, + "examples": { + "default": { + "value": { + "run_id": 42, + "run_url": "https://api.github.com/repos/octocat/hello-world/actions/runs/42" + } + } + } + } + } + }, + "403": { + "description": "Response if the repository is archived or if Code quality is not enabled for this repository", + "content": { + "application/json": { + "schema": { + "title": "Basic Error", + "description": "Basic Error", + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "documentation_url": { + "type": "string" + }, + "url": { + "type": "string" + }, + "status": { + "type": "string" + } + } + } + } + } + }, + "404": { + "description": "Resource not found", + "content": { + "application/json": { + "schema": { + "title": "Basic Error", + "description": "Basic Error", + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "documentation_url": { + "type": "string" + }, + "url": { + "type": "string" + }, + "status": { + "type": "string" + } + } + } + } + } + }, + "409": { + "description": "Response if there is already a code quality setup configuration update in progress", + "content": { + "application/json": { + "schema": { + "title": "Basic Error", + "description": "Basic Error", + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "documentation_url": { + "type": "string" + }, + "url": { + "type": "string" + }, + "status": { + "type": "string" + } + } + } + } + } + }, + "422": { + "description": "Response if the configuration change cannot be made", + "content": { + "application/json": { + "schema": { + "title": "Basic Error", + "description": "Basic Error", + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "documentation_url": { + "type": "string" + }, + "url": { + "type": "string" + }, + "status": { + "type": "string" + } + } + } + } + } + }, + "503": { + "description": "Service unavailable", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "documentation_url": { + "type": "string" + } + } + } + } + } + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": true, + "category": "code-quality", + "subcategory": "code-quality" + } + } + }, "/repos/{owner}/{repo}/code-scanning/alerts": { "get": { "summary": "List code scanning alerts for a repository", 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 18bba1731f..43dd912b8b 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 @@ -71884,6 +71884,232 @@ paths: enabledForGitHubApps: true category: checks subcategory: suites + "/repos/{owner}/{repo}/code-quality/setup": + get: + summary: Get a code quality setup configuration + description: |- + Gets a code quality setup configuration. + + OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with private or public repositories, or the `public_repo` scope to use this endpoint with only public repositories. + tags: + - code-quality + operationId: code-quality/get-setup + externalDocs: + description: API method documentation + url: https://docs.github.com/rest/code-quality/code-quality#get-a-code-quality-setup-configuration + parameters: + - *338 + - *339 + responses: + '200': + description: Response + content: + application/json: + schema: + description: Configuration for code quality setup. + type: object + properties: + state: + description: Code quality setup has been configured or not. + type: string + enum: + - configured + - not-configured + languages: + description: Languages to be analyzed. + type: array + items: + type: string + enum: + - csharp + - go + - java-kotlin + - javascript-typescript + - python + - ruby + - rust + runner_type: + description: Runner type to be used. + type: + - string + - 'null' + enum: + - standard + - labeled + - + runner_label: + description: Runner label to be used if the runner type is labeled. + type: + - string + - 'null' + examples: + - code-scanning + updated_at: + description: Timestamp of latest configuration update. + type: + - string + - 'null' + format: date-time + examples: + - '2023-12-06T14:20:20.000Z' + schedule: + description: The frequency of the periodic analysis. + type: + - string + - 'null' + enum: + - weekly + - + examples: + default: + value: + state: configured + languages: + - javascript-typescript + - python + runner_type: standard + runner_label: + updated_at: '2023-01-01T00:00:00Z' + schedule: weekly + '403': + description: Response if the user is not authorized to access Code quality + for this repository. + content: + application/json: + schema: *3 + '404': *6 + '503': *114 + x-github: + githubCloudOnly: false + enabledForGitHubApps: true + category: code-quality + subcategory: code-quality + patch: + summary: Update a code quality setup configuration + description: |- + Updates a code quality setup configuration. + + OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with private or public repositories, or the `public_repo` scope to use this endpoint with only public repositories. + tags: + - code-quality + operationId: code-quality/update-setup + externalDocs: + description: API method documentation + url: https://docs.github.com/rest/code-quality/code-quality#update-a-code-quality-setup-configuration + parameters: + - *338 + - *339 + requestBody: + required: true + content: + application/json: + schema: + description: Configuration for code quality setup. + type: object + properties: + state: + description: The desired state of code quality setup. + type: string + enum: + - configured + - not-configured + runner_type: + description: Runner type to be used. + type: string + enum: + - standard + - labeled + runner_label: + description: Runner label to be used if the runner type is labeled. + type: + - string + - 'null' + examples: + - code-scanning + languages: + description: Languages to be analyzed. + type: array + items: + type: string + enum: + - csharp + - go + - java-kotlin + - javascript-typescript + - python + - ruby + anyOf: + - required: + - state + - required: + - runner_type + - required: + - runner_label + - required: + - languages + additionalProperties: false + examples: + default: + value: + state: configured + languages: + - javascript-typescript + - python + - ruby + responses: + '200': + description: Response + content: + application/json: + schema: *162 + examples: + default: + value: + '202': + description: Response + content: + application/json: + schema: + description: |- + You can use `run_url` to track the status of the run. This includes a property status and conclusion. + You should not rely on this always being an actions workflow run object. + type: object + properties: + run_id: + description: ID of the corresponding run. + type: integer + run_url: + description: URL of the corresponding run. + type: string + examples: + default: + value: + run_id: 42 + run_url: https://api.github.com/repos/octocat/hello-world/actions/runs/42 + '403': + description: Response if the repository is archived or if Code quality is + not enabled for this repository + content: + application/json: + schema: *3 + '404': *6 + '409': + description: Response if there is already a code quality setup configuration + update in progress + content: + application/json: + schema: *3 + '422': + description: Response if the configuration change cannot be made + content: + application/json: + schema: *3 + '503': *114 + x-github: + githubCloudOnly: false + enabledForGitHubApps: true + category: code-quality + subcategory: code-quality "/repos/{owner}/{repo}/code-scanning/alerts": get: summary: List code scanning alerts for a repository