Convert status report comments to documentation
This commit is contained in:
parent
ff33f031e8
commit
a005206838
7 changed files with 64 additions and 61 deletions
4
lib/init-action.js
generated
4
lib/init-action.js
generated
|
|
@ -54,14 +54,14 @@ async function sendSuccessStatusReport(startedAt, config, toolsVersion) {
|
|||
}
|
||||
const statusReport = {
|
||||
...statusReportBase,
|
||||
disable_default_queries: disableDefaultQueries,
|
||||
languages,
|
||||
workflow_languages: workflowLanguages || "",
|
||||
paths,
|
||||
paths_ignore: pathsIgnore,
|
||||
disable_default_queries: disableDefaultQueries,
|
||||
queries: queries.join(","),
|
||||
tools_input: (0, actions_util_1.getOptionalInput)("tools") || "",
|
||||
tools_resolved_version: toolsVersion,
|
||||
workflow_languages: workflowLanguages || "",
|
||||
};
|
||||
await (0, actions_util_1.sendStatusReport)(statusReport);
|
||||
}
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -488,37 +488,37 @@ type ActionName = "init" | "autobuild" | "finish" | "upload-sarif";
|
|||
type ActionStatus = "starting" | "aborted" | "success" | "failure";
|
||||
|
||||
export interface StatusReportBase {
|
||||
// ID of the workflow run containing the action run
|
||||
/** ID of the workflow run containing the action run. */
|
||||
workflow_run_id: number;
|
||||
// Workflow name. Converted to analysis_name further down the pipeline.
|
||||
/** Workflow name. Converted to analysis_name further down the pipeline.. */
|
||||
workflow_name: string;
|
||||
// Job name from the workflow
|
||||
/** Job name from the workflow. */
|
||||
job_name: string;
|
||||
// Analysis key, normally composed from the workflow path and job name
|
||||
/** Analysis key, normally composed from the workflow path and job name. */
|
||||
analysis_key: string;
|
||||
// Value of the matrix for this instantiation of the job
|
||||
/** Value of the matrix for this instantiation of the job. */
|
||||
matrix_vars?: string;
|
||||
// Commit oid that the workflow was triggered on
|
||||
/** Commit oid that the workflow was triggered on. */
|
||||
commit_oid: string;
|
||||
// Ref that the workflow was triggered on
|
||||
/** Ref that the workflow was triggered on. */
|
||||
ref: string;
|
||||
// Name of the action being executed
|
||||
/** Name of the action being executed. */
|
||||
action_name: ActionName;
|
||||
// Version of the action being executed, as a ref
|
||||
/** Version of the action being executed, as a ref. */
|
||||
action_ref?: string;
|
||||
// Version of the action being executed, as a commit oid
|
||||
/** Version of the action being executed, as a commit oid. */
|
||||
action_oid: string;
|
||||
// Time the first action started. Normally the init action
|
||||
/** Time the first action started. Normally the init action. */
|
||||
started_at: string;
|
||||
// Time this action started
|
||||
/** Time this action started. */
|
||||
action_started_at: string;
|
||||
// Time this action completed, or undefined if not yet completed
|
||||
/** Time this action completed, or undefined if not yet completed. */
|
||||
completed_at?: string;
|
||||
// State this action is currently in
|
||||
/** State this action is currently in. */
|
||||
status: ActionStatus;
|
||||
// Cause of the failure (or undefined if status is not failure)
|
||||
/** Cause of the failure (or undefined if status is not failure). */
|
||||
cause?: string;
|
||||
// Stack trace of the failure (or undefined if status is not failure)
|
||||
/** Stack trace of the failure (or undefined if status is not failure). */
|
||||
exception?: string;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -25,49 +25,49 @@ export class CodeQLAnalysisError extends Error {
|
|||
}
|
||||
|
||||
export interface QueriesStatusReport {
|
||||
// Time taken in ms to run builtin queries for cpp (or undefined if this language was not analyzed)
|
||||
/** Time taken in ms to run builtin queries for cpp (or undefined if this language was not analyzed). */
|
||||
analyze_builtin_queries_cpp_duration_ms?: number;
|
||||
// Time taken in ms to run builtin queries for csharp (or undefined if this language was not analyzed)
|
||||
/** Time taken in ms to run builtin queries for csharp (or undefined if this language was not analyzed). */
|
||||
analyze_builtin_queries_csharp_duration_ms?: number;
|
||||
// Time taken in ms to run builtin queries for go (or undefined if this language was not analyzed)
|
||||
/** Time taken in ms to run builtin queries for go (or undefined if this language was not analyzed). */
|
||||
analyze_builtin_queries_go_duration_ms?: number;
|
||||
// Time taken in ms to run builtin queries for java (or undefined if this language was not analyzed)
|
||||
/** Time taken in ms to run builtin queries for java (or undefined if this language was not analyzed). */
|
||||
analyze_builtin_queries_java_duration_ms?: number;
|
||||
// Time taken in ms to run builtin queries for javascript (or undefined if this language was not analyzed)
|
||||
/** Time taken in ms to run builtin queries for javascript (or undefined if this language was not analyzed). */
|
||||
analyze_builtin_queries_javascript_duration_ms?: number;
|
||||
// Time taken in ms to run builtin queries for python (or undefined if this language was not analyzed)
|
||||
/** Time taken in ms to run builtin queries for python (or undefined if this language was not analyzed). */
|
||||
analyze_builtin_queries_python_duration_ms?: number;
|
||||
// Time taken in ms to run builtin queries for ruby (or undefined if this language was not analyzed)
|
||||
/** Time taken in ms to run builtin queries for ruby (or undefined if this language was not analyzed). */
|
||||
analyze_builtin_queries_ruby_duration_ms?: number;
|
||||
// Time taken in ms to run custom queries for cpp (or undefined if this language was not analyzed)
|
||||
/** Time taken in ms to run custom queries for cpp (or undefined if this language was not analyzed). */
|
||||
analyze_custom_queries_cpp_duration_ms?: number;
|
||||
// Time taken in ms to run custom queries for csharp (or undefined if this language was not analyzed)
|
||||
/** Time taken in ms to run custom queries for csharp (or undefined if this language was not analyzed). */
|
||||
analyze_custom_queries_csharp_duration_ms?: number;
|
||||
// Time taken in ms to run custom queries for go (or undefined if this language was not analyzed)
|
||||
/** Time taken in ms to run custom queries for go (or undefined if this language was not analyzed). */
|
||||
analyze_custom_queries_go_duration_ms?: number;
|
||||
// Time taken in ms to run custom queries for java (or undefined if this language was not analyzed)
|
||||
/** Time taken in ms to run custom queries for java (or undefined if this language was not analyzed). */
|
||||
analyze_custom_queries_java_duration_ms?: number;
|
||||
// Time taken in ms to run custom queries for javascript (or undefined if this language was not analyzed)
|
||||
/** Time taken in ms to run custom queries for javascript (or undefined if this language was not analyzed). */
|
||||
analyze_custom_queries_javascript_duration_ms?: number;
|
||||
// Time taken in ms to run custom queries for python (or undefined if this language was not analyzed)
|
||||
/** Time taken in ms to run custom queries for python (or undefined if this language was not analyzed). */
|
||||
analyze_custom_queries_python_duration_ms?: number;
|
||||
// Time taken in ms to run custom queries for ruby (or undefined if this language was not analyzed)
|
||||
/** Time taken in ms to run custom queries for ruby (or undefined if this language was not analyzed). */
|
||||
analyze_custom_queries_ruby_duration_ms?: number;
|
||||
// Time taken in ms to interpret results for cpp (or undefined if this language was not analyzed)
|
||||
/** Time taken in ms to interpret results for cpp (or undefined if this language was not analyzed). */
|
||||
interpret_results_cpp_duration_ms?: number;
|
||||
// Time taken in ms to interpret results for csharp (or undefined if this language was not analyzed)
|
||||
/** Time taken in ms to interpret results for csharp (or undefined if this language was not analyzed). */
|
||||
interpret_results_csharp_duration_ms?: number;
|
||||
// Time taken in ms to interpret results for go (or undefined if this language was not analyzed)
|
||||
/** Time taken in ms to interpret results for go (or undefined if this language was not analyzed). */
|
||||
interpret_results_go_duration_ms?: number;
|
||||
// Time taken in ms to interpret results for java (or undefined if this language was not analyzed)
|
||||
/** Time taken in ms to interpret results for java (or undefined if this language was not analyzed). */
|
||||
interpret_results_java_duration_ms?: number;
|
||||
// Time taken in ms to interpret results for javascript (or undefined if this language was not analyzed)
|
||||
/** Time taken in ms to interpret results for javascript (or undefined if this language was not analyzed). */
|
||||
interpret_results_javascript_duration_ms?: number;
|
||||
// Time taken in ms to interpret results for python (or undefined if this language was not analyzed)
|
||||
/** Time taken in ms to interpret results for python (or undefined if this language was not analyzed). */
|
||||
interpret_results_python_duration_ms?: number;
|
||||
// Time taken in ms to interpret results for ruby (or undefined if this language was not analyzed)
|
||||
/** Time taken in ms to interpret results for ruby (or undefined if this language was not analyzed). */
|
||||
interpret_results_ruby_duration_ms?: number;
|
||||
// Name of language that errored during analysis (or undefined if no language failed)
|
||||
/** Name of language that errored during analysis (or undefined if no language failed). */
|
||||
analyze_failure_language?: string;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -16,9 +16,9 @@ import { initializeEnvironment, Mode } from "./util";
|
|||
const pkg = require("../package.json");
|
||||
|
||||
interface AutobuildStatusReport extends StatusReportBase {
|
||||
// Comma-separated set of languages being auto-built
|
||||
/** Comma-separated set of languages being auto-built. */
|
||||
autobuild_languages: string;
|
||||
// Language that failed autobuilding (or undefined if all languages succeeded).
|
||||
/** Language that failed autobuilding (or undefined if all languages succeeded). */
|
||||
autobuild_failure?: string;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -44,23 +44,26 @@ import {
|
|||
const pkg = require("../package.json");
|
||||
|
||||
interface InitSuccessStatusReport extends StatusReportBase {
|
||||
// Comma-separated list of languages that analysis was run for
|
||||
// This may be from the workflow file or may be calculated from repository contents
|
||||
languages: string;
|
||||
// Comma-separated list of languages specified explicitly in the workflow file
|
||||
workflow_languages: string;
|
||||
// Comma-separated list of paths, from the 'paths' config field
|
||||
paths: string;
|
||||
// Comma-separated list of paths, from the 'paths-ignore' config field
|
||||
paths_ignore: string;
|
||||
// Commas-separated list of languages where the default queries are disabled
|
||||
/** Comma-separated list of languages where the default queries are disabled. */
|
||||
disable_default_queries: string;
|
||||
// Comma-separated list of queries sources, from the 'queries' config field or workflow input
|
||||
/**
|
||||
* Comma-separated list of languages that analysis was run for.
|
||||
*
|
||||
* This may be from the workflow file or may be calculated from repository contents
|
||||
*/
|
||||
languages: string;
|
||||
/** Comma-separated list of paths, from the 'paths' config field. */
|
||||
paths: string;
|
||||
/** Comma-separated list of paths, from the 'paths-ignore' config field. */
|
||||
paths_ignore: string;
|
||||
/** Comma-separated list of queries sources, from the 'queries' config field or workflow input. */
|
||||
queries: string;
|
||||
// Value given by the user as the "tools" input
|
||||
/** Value given by the user as the "tools" input. */
|
||||
tools_input: string;
|
||||
// Version of the bundle used
|
||||
/** Version of the bundle used. */
|
||||
tools_resolved_version: string;
|
||||
/** Comma-separated list of languages specified explicitly in the workflow file. */
|
||||
workflow_languages: string;
|
||||
}
|
||||
|
||||
async function sendSuccessStatusReport(
|
||||
|
|
@ -102,14 +105,14 @@ async function sendSuccessStatusReport(
|
|||
|
||||
const statusReport: InitSuccessStatusReport = {
|
||||
...statusReportBase,
|
||||
disable_default_queries: disableDefaultQueries,
|
||||
languages,
|
||||
workflow_languages: workflowLanguages || "",
|
||||
paths,
|
||||
paths_ignore: pathsIgnore,
|
||||
disable_default_queries: disableDefaultQueries,
|
||||
queries: queries.join(","),
|
||||
tools_input: getOptionalInput("tools") || "",
|
||||
tools_resolved_version: toolsVersion,
|
||||
workflow_languages: workflowLanguages || "",
|
||||
};
|
||||
|
||||
await sendStatusReport(statusReport);
|
||||
|
|
|
|||
|
|
@ -122,11 +122,11 @@ async function uploadPayload(
|
|||
}
|
||||
|
||||
export interface UploadStatusReport {
|
||||
// Size in bytes of unzipped SARIF upload
|
||||
/** Size in bytes of unzipped SARIF upload. */
|
||||
raw_upload_size_bytes?: number;
|
||||
// Size in bytes of actual SARIF upload
|
||||
/** Size in bytes of actual SARIF upload. */
|
||||
zipped_upload_size_bytes?: number;
|
||||
// Number of results in the SARIF upload
|
||||
/** Number of results in the SARIF upload. */
|
||||
num_results_in_sarif?: number;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue