Skip to main content

codeql_variant_analysis_repo_tasks

Creates, updates, deletes, gets or lists a codeql_variant_analysis_repo_tasks resource.

Overview

Namecodeql_variant_analysis_repo_tasks
TypeResource
Idgithub.code_scanning.codeql_variant_analysis_repo_tasks

Fields

The following fields are returned by SELECT queries:

Response

NameDatatypeDescription
analysis_statusstringThe new status of the CodeQL variant analysis repository task. (pending, in_progress, succeeded, failed, canceled, timed_out)
artifact_size_in_bytesintegerThe size of the artifact. This is only available for successful analyses.
artifact_urlstringThe URL of the artifact. This is only available for successful analyses.
database_commit_shastringThe SHA of the commit the CodeQL database was built against. This is only available for successful analyses.
failure_messagestringThe reason of the failure of this repo task. This is only available if the repository task has failed.
repositoryobjectA GitHub repository. (title: Simple Repository)
result_countintegerThe number of results in the case of a successful analysis. This is only available for successful analyses.
source_location_prefixstringThe source location prefix to use. This is only available for successful analyses.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_variant_analysis_repo_taskselectowner, repo, codeql_variant_analysis_id, repo_owner, repo_nameGets 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.

NameDatatypeDescription
codeql_variant_analysis_idintegerThe ID of the variant analysis.
ownerstringThe account owner of the repository. The name is not case sensitive.
repostringThe name of the controller repository.
repo_namestringThe name of the variant analysis repository.
repo_ownerstringThe account owner of the variant analysis repository. The name is not case sensitive.

SELECT examples

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
;