codeql_variant_analysis_repo_tasks
Creates, updates, deletes, gets or lists a codeql_variant_analysis_repo_tasks resource.
Overview
| Name | codeql_variant_analysis_repo_tasks |
| Type | Resource |
| Id | github.code_scanning.codeql_variant_analysis_repo_tasks |
Fields
The following fields are returned by SELECT queries:
- get_variant_analysis_repo_task
Response
| Name | Datatype | Description |
|---|---|---|
analysis_status | string | The new status of the CodeQL variant analysis repository task. (pending, in_progress, succeeded, failed, canceled, timed_out) |
artifact_size_in_bytes | integer | The size of the artifact. This is only available for successful analyses. |
artifact_url | string | The URL of the artifact. This is only available for successful analyses. |
database_commit_sha | string | The SHA of the commit the CodeQL database was built against. This is only available for successful analyses. |
failure_message | string | The reason of the failure of this repo task. This is only available if the repository task has failed. |
repository | object | A GitHub repository. (title: Simple Repository) |
result_count | integer | The number of results in the case of a successful analysis. This is only available for successful analyses. |
source_location_prefix | string | The source location prefix to use. This is only available for successful analyses. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_variant_analysis_repo_task | select | owner, repo, codeql_variant_analysis_id, repo_owner, repo_name | Gets the analysis status of a repository in a CodeQL variant analysis. OAuth app tokens and personal access tokens (classic) need the security_events scope to use this endpoint with private or public repositories, or the public_repo scope to use this endpoint with only public repositories. |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
codeql_variant_analysis_id | integer | The ID of the variant analysis. |
owner | string | The account owner of the repository. The name is not case sensitive. |
repo | string | The name of the controller repository. |
repo_name | string | The name of the variant analysis repository. |
repo_owner | string | The account owner of the variant analysis repository. The name is not case sensitive. |
SELECT examples
- get_variant_analysis_repo_task
Gets the analysis status of a repository in a CodeQL variant analysis.
OAuth app tokens and personal access tokens (classic) need the security_events scope to use this endpoint with private or public repositories, or the public_repo scope to use this endpoint with only public repositories.
SELECT
analysis_status,
artifact_size_in_bytes,
artifact_url,
database_commit_sha,
failure_message,
repository,
result_count,
source_location_prefix
FROM github.code_scanning.codeql_variant_analysis_repo_tasks
WHERE owner = '{{ owner }}' -- required
AND repo = '{{ repo }}' -- required
AND codeql_variant_analysis_id = '{{ codeql_variant_analysis_id }}' -- required
AND repo_owner = '{{ repo_owner }}' -- required
AND repo_name = '{{ repo_name }}' -- required
;