diff --git a/descriptions/api.github.com/api.github.com.2022-11-28.json b/descriptions/api.github.com/api.github.com.2022-11-28.json index f2e8d3667c..a156495e0b 100644 --- a/descriptions/api.github.com/api.github.com.2022-11-28.json +++ b/descriptions/api.github.com/api.github.com.2022-11-28.json @@ -49160,6 +49160,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", @@ -137725,6 +137867,146 @@ } } }, + "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.", + "nullable": true, + "type": "string", + "enum": [ + "standard", + "labeled" + ] + }, + "runner_label": { + "description": "Runner label to be used if the runner type is labeled.", + "nullable": true, + "type": "string", + "example": "code-scanning" + }, + "updated_at": { + "description": "Timestamp of latest configuration update.", + "nullable": true, + "type": "string", + "format": "date-time", + "example": "2023-12-06T14:20:20.000Z" + }, + "schedule": { + "description": "The frequency of the periodic analysis.", + "nullable": true, + "type": "string", + "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": { + "nullable": true, + "description": "Runner label to be used if the runner type is labeled.", + "type": "string", + "example": "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": { @@ -311934,6 +312216,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": [ { @@ -331017,6 +331328,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/api.github.com/api.github.com.2022-11-28.yaml b/descriptions/api.github.com/api.github.com.2022-11-28.yaml index e0eb0a1926..e5d7e4bb51 100644 --- a/descriptions/api.github.com/api.github.com.2022-11-28.yaml +++ b/descriptions/api.github.com/api.github.com.2022-11-28.yaml @@ -36153,6 +36153,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 @@ -101761,6 +101856,108 @@ 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. + nullable: true + type: string + enum: + - standard + - labeled + runner_label: + description: Runner label to be used if the runner type is labeled. + nullable: true + type: string + example: code-scanning + updated_at: + description: Timestamp of latest configuration update. + nullable: true + type: string + format: date-time + example: '2023-12-06T14:20:20.000Z' + schedule: + description: The frequency of the periodic analysis. + nullable: true + type: string + 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: + nullable: true + description: Runner label to be used if the runner type is labeled. + type: string + example: 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: @@ -235086,6 +235283,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 @@ -251544,6 +251762,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/api.github.com/api.github.com.2026-03-10.json b/descriptions/api.github.com/api.github.com.2026-03-10.json index c596029b6a..2e21a17c7e 100644 --- a/descriptions/api.github.com/api.github.com.2026-03-10.json +++ b/descriptions/api.github.com/api.github.com.2026-03-10.json @@ -49087,6 +49087,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", @@ -137156,6 +137298,146 @@ } } }, + "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.", + "nullable": true, + "type": "string", + "enum": [ + "standard", + "labeled" + ] + }, + "runner_label": { + "description": "Runner label to be used if the runner type is labeled.", + "nullable": true, + "type": "string", + "example": "code-scanning" + }, + "updated_at": { + "description": "Timestamp of latest configuration update.", + "nullable": true, + "type": "string", + "format": "date-time", + "example": "2023-12-06T14:20:20.000Z" + }, + "schedule": { + "description": "The frequency of the periodic analysis.", + "nullable": true, + "type": "string", + "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": { + "nullable": true, + "description": "Runner label to be used if the runner type is labeled.", + "type": "string", + "example": "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": { @@ -311179,6 +311461,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": [ { @@ -330172,6 +330483,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/api.github.com/api.github.com.2026-03-10.yaml b/descriptions/api.github.com/api.github.com.2026-03-10.yaml index 930ba1827c..6cec26ea37 100644 --- a/descriptions/api.github.com/api.github.com.2026-03-10.yaml +++ b/descriptions/api.github.com/api.github.com.2026-03-10.yaml @@ -36093,6 +36093,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 @@ -101309,6 +101404,108 @@ 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. + nullable: true + type: string + enum: + - standard + - labeled + runner_label: + description: Runner label to be used if the runner type is labeled. + nullable: true + type: string + example: code-scanning + updated_at: + description: Timestamp of latest configuration update. + nullable: true + type: string + format: date-time + example: '2023-12-06T14:20:20.000Z' + schedule: + description: The frequency of the periodic analysis. + nullable: true + type: string + 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: + nullable: true + description: Runner label to be used if the runner type is labeled. + type: string + example: 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: @@ -234405,6 +234602,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 @@ -250778,6 +250996,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/api.github.com/api.github.com.json b/descriptions/api.github.com/api.github.com.json index ee06f795a7..3990359169 100644 --- a/descriptions/api.github.com/api.github.com.json +++ b/descriptions/api.github.com/api.github.com.json @@ -49420,6 +49420,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", @@ -138850,6 +138992,146 @@ } } }, + "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.", + "nullable": true, + "type": "string", + "enum": [ + "standard", + "labeled" + ] + }, + "runner_label": { + "description": "Runner label to be used if the runner type is labeled.", + "nullable": true, + "type": "string", + "example": "code-scanning" + }, + "updated_at": { + "description": "Timestamp of latest configuration update.", + "nullable": true, + "type": "string", + "format": "date-time", + "example": "2023-12-06T14:20:20.000Z" + }, + "schedule": { + "description": "The frequency of the periodic analysis.", + "nullable": true, + "type": "string", + "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": { + "nullable": true, + "description": "Runner label to be used if the runner type is labeled.", + "type": "string", + "example": "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": { @@ -314117,6 +314399,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": [ { @@ -333328,6 +333639,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/api.github.com/api.github.com.yaml b/descriptions/api.github.com/api.github.com.yaml index ff6e78b57b..afb7029288 100644 --- a/descriptions/api.github.com/api.github.com.yaml +++ b/descriptions/api.github.com/api.github.com.yaml @@ -36291,6 +36291,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 @@ -102560,6 +102655,108 @@ 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. + nullable: true + type: string + enum: + - standard + - labeled + runner_label: + description: Runner label to be used if the runner type is labeled. + nullable: true + type: string + example: code-scanning + updated_at: + description: Timestamp of latest configuration update. + nullable: true + type: string + format: date-time + example: '2023-12-06T14:20:20.000Z' + schedule: + description: The frequency of the periodic analysis. + nullable: true + type: string + 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: + nullable: true + description: Runner label to be used if the runner type is labeled. + type: string + example: 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: @@ -236512,6 +236709,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 @@ -253034,6 +253252,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/api.github.com/dereferenced/api.github.com.2022-11-28.deref.json b/descriptions/api.github.com/dereferenced/api.github.com.2022-11-28.deref.json index 11309a9e8a..3815816900 100644 --- a/descriptions/api.github.com/dereferenced/api.github.com.2022-11-28.deref.json +++ b/descriptions/api.github.com/dereferenced/api.github.com.2022-11-28.deref.json @@ -305426,6 +305426,501 @@ } } }, + "/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.", + "nullable": true, + "type": "string", + "enum": [ + "standard", + "labeled" + ] + }, + "runner_label": { + "description": "Runner label to be used if the runner type is labeled.", + "nullable": true, + "type": "string", + "example": "code-scanning" + }, + "updated_at": { + "description": "Timestamp of latest configuration update.", + "nullable": true, + "type": "string", + "format": "date-time", + "example": "2023-12-06T14:20:20.000Z" + }, + "schedule": { + "description": "The frequency of the periodic analysis.", + "nullable": true, + "type": "string", + "enum": [ + "weekly" + ] + } + } + }, + "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": { + "nullable": true, + "description": "Runner label to be used if the runner type is labeled.", + "type": "string", + "example": "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/api.github.com/dereferenced/api.github.com.2022-11-28.deref.yaml b/descriptions/api.github.com/dereferenced/api.github.com.2022-11-28.deref.yaml index f941236cc8..2d74a30d2e 100644 --- a/descriptions/api.github.com/dereferenced/api.github.com.2022-11-28.deref.yaml +++ b/descriptions/api.github.com/dereferenced/api.github.com.2022-11-28.deref.yaml @@ -69484,6 +69484,222 @@ 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: + - *355 + - *356 + 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. + nullable: true + type: string + enum: + - standard + - labeled + runner_label: + description: Runner label to be used if the runner type is labeled. + nullable: true + type: string + example: code-scanning + updated_at: + description: Timestamp of latest configuration update. + nullable: true + type: string + format: date-time + example: '2023-12-06T14:20:20.000Z' + schedule: + description: The frequency of the periodic analysis. + nullable: true + type: string + 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': *122 + 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: + - *355 + - *356 + 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: + nullable: true + description: Runner label to be used if the runner type is labeled. + type: string + example: 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: *170 + 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': *122 + 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/api.github.com/dereferenced/api.github.com.2026-03-10.deref.json b/descriptions/api.github.com/dereferenced/api.github.com.2026-03-10.deref.json index 47e4de0412..3fb5c9fe84 100644 --- a/descriptions/api.github.com/dereferenced/api.github.com.2026-03-10.deref.json +++ b/descriptions/api.github.com/dereferenced/api.github.com.2026-03-10.deref.json @@ -299294,6 +299294,501 @@ } } }, + "/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.", + "nullable": true, + "type": "string", + "enum": [ + "standard", + "labeled" + ] + }, + "runner_label": { + "description": "Runner label to be used if the runner type is labeled.", + "nullable": true, + "type": "string", + "example": "code-scanning" + }, + "updated_at": { + "description": "Timestamp of latest configuration update.", + "nullable": true, + "type": "string", + "format": "date-time", + "example": "2023-12-06T14:20:20.000Z" + }, + "schedule": { + "description": "The frequency of the periodic analysis.", + "nullable": true, + "type": "string", + "enum": [ + "weekly" + ] + } + } + }, + "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": { + "nullable": true, + "description": "Runner label to be used if the runner type is labeled.", + "type": "string", + "example": "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/api.github.com/dereferenced/api.github.com.2026-03-10.deref.yaml b/descriptions/api.github.com/dereferenced/api.github.com.2026-03-10.deref.yaml index 846111007d..6b8cd6ed46 100644 --- a/descriptions/api.github.com/dereferenced/api.github.com.2026-03-10.deref.yaml +++ b/descriptions/api.github.com/dereferenced/api.github.com.2026-03-10.deref.yaml @@ -69052,6 +69052,222 @@ 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: + - *355 + - *356 + 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. + nullable: true + type: string + enum: + - standard + - labeled + runner_label: + description: Runner label to be used if the runner type is labeled. + nullable: true + type: string + example: code-scanning + updated_at: + description: Timestamp of latest configuration update. + nullable: true + type: string + format: date-time + example: '2023-12-06T14:20:20.000Z' + schedule: + description: The frequency of the periodic analysis. + nullable: true + type: string + 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': *122 + 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: + - *355 + - *356 + 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: + nullable: true + description: Runner label to be used if the runner type is labeled. + type: string + example: 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: *170 + 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': *122 + 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/api.github.com/dereferenced/api.github.com.deref.json b/descriptions/api.github.com/dereferenced/api.github.com.deref.json index f081bf330c..da39584682 100644 --- a/descriptions/api.github.com/dereferenced/api.github.com.deref.json +++ b/descriptions/api.github.com/dereferenced/api.github.com.deref.json @@ -313051,6 +313051,501 @@ } } }, + "/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.", + "nullable": true, + "type": "string", + "enum": [ + "standard", + "labeled" + ] + }, + "runner_label": { + "description": "Runner label to be used if the runner type is labeled.", + "nullable": true, + "type": "string", + "example": "code-scanning" + }, + "updated_at": { + "description": "Timestamp of latest configuration update.", + "nullable": true, + "type": "string", + "format": "date-time", + "example": "2023-12-06T14:20:20.000Z" + }, + "schedule": { + "description": "The frequency of the periodic analysis.", + "nullable": true, + "type": "string", + "enum": [ + "weekly" + ] + } + } + }, + "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": { + "nullable": true, + "description": "Runner label to be used if the runner type is labeled.", + "type": "string", + "example": "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/api.github.com/dereferenced/api.github.com.deref.yaml b/descriptions/api.github.com/dereferenced/api.github.com.deref.yaml index 91ebc766d7..9e073ecd34 100644 --- a/descriptions/api.github.com/dereferenced/api.github.com.deref.yaml +++ b/descriptions/api.github.com/dereferenced/api.github.com.deref.yaml @@ -70125,6 +70125,222 @@ 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: + - *357 + - *358 + 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. + nullable: true + type: string + enum: + - standard + - labeled + runner_label: + description: Runner label to be used if the runner type is labeled. + nullable: true + type: string + example: code-scanning + updated_at: + description: Timestamp of latest configuration update. + nullable: true + type: string + format: date-time + example: '2023-12-06T14:20:20.000Z' + schedule: + description: The frequency of the periodic analysis. + nullable: true + type: string + 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': *122 + 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: + - *357 + - *358 + 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: + nullable: true + description: Runner label to be used if the runner type is labeled. + type: string + example: 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: *170 + 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': *122 + 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