mirror of
https://github.com/github/codeql-action.git
synced 2025-12-11 02:04:31 +08:00
Compare commits
2 Commits
v2.26.0
...
angelapwen
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c432b64d5f | ||
|
|
ae671fc041 |
6
lib/actions-util.js
generated
6
lib/actions-util.js
generated
@@ -295,6 +295,11 @@ async function createStatusReportBase(actionName, status, actionStartedAt, cause
|
|||||||
if (workflowRunIDStr) {
|
if (workflowRunIDStr) {
|
||||||
workflowRunID = parseInt(workflowRunIDStr, 10);
|
workflowRunID = parseInt(workflowRunIDStr, 10);
|
||||||
}
|
}
|
||||||
|
const workflowRunAttemptStr = process.env["GITHUB_RUN_ATTEMPT"];
|
||||||
|
let workflowRunAttempt = -1;
|
||||||
|
if (workflowRunAttemptStr) {
|
||||||
|
workflowRunAttempt = parseInt(workflowRunAttemptStr, 10);
|
||||||
|
}
|
||||||
const workflowName = process.env["GITHUB_WORKFLOW"] || "";
|
const workflowName = process.env["GITHUB_WORKFLOW"] || "";
|
||||||
const jobName = process.env["GITHUB_JOB"] || "";
|
const jobName = process.env["GITHUB_JOB"] || "";
|
||||||
const analysis_key = await getAnalysisKey();
|
const analysis_key = await getAnalysisKey();
|
||||||
@@ -314,6 +319,7 @@ async function createStatusReportBase(actionName, status, actionStartedAt, cause
|
|||||||
}
|
}
|
||||||
const statusReport = {
|
const statusReport = {
|
||||||
workflow_run_id: workflowRunID,
|
workflow_run_id: workflowRunID,
|
||||||
|
workflow_run_attempt: workflowRunAttempt,
|
||||||
workflow_name: workflowName,
|
workflow_name: workflowName,
|
||||||
job_name: jobName,
|
job_name: jobName,
|
||||||
analysis_key,
|
analysis_key,
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
6
lib/util.js
generated
6
lib/util.js
generated
@@ -337,9 +337,9 @@ exports.assertNever = assertNever;
|
|||||||
* knowing what version of CodeQL we're running.
|
* knowing what version of CodeQL we're running.
|
||||||
*/
|
*/
|
||||||
function initializeEnvironment(version) {
|
function initializeEnvironment(version) {
|
||||||
core.exportVariable(shared_environment_1.EnvVar.VERSION, version);
|
core.exportVariable(String(shared_environment_1.EnvVar.VERSION), version);
|
||||||
core.exportVariable(shared_environment_1.EnvVar.FEATURE_SARIF_COMBINE, "true");
|
core.exportVariable(String(shared_environment_1.EnvVar.FEATURE_SARIF_COMBINE), "true");
|
||||||
core.exportVariable(shared_environment_1.EnvVar.FEATURE_WILL_UPLOAD, "true");
|
core.exportVariable(String(shared_environment_1.EnvVar.FEATURE_WILL_UPLOAD), "true");
|
||||||
}
|
}
|
||||||
exports.initializeEnvironment = initializeEnvironment;
|
exports.initializeEnvironment = initializeEnvironment;
|
||||||
/**
|
/**
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
@@ -313,6 +313,8 @@ export type ActionStatus =
|
|||||||
export interface StatusReportBase {
|
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_run_id: number;
|
||||||
|
/** Attempt number of the run containing the action run. */
|
||||||
|
workflow_run_attempt: number;
|
||||||
/** Workflow name. Converted to analysis_name further down the pipeline.. */
|
/** Workflow name. Converted to analysis_name further down the pipeline.. */
|
||||||
workflow_name: string;
|
workflow_name: string;
|
||||||
/** Job name from the workflow. */
|
/** Job name from the workflow. */
|
||||||
@@ -410,6 +412,11 @@ export async function createStatusReportBase(
|
|||||||
if (workflowRunIDStr) {
|
if (workflowRunIDStr) {
|
||||||
workflowRunID = parseInt(workflowRunIDStr, 10);
|
workflowRunID = parseInt(workflowRunIDStr, 10);
|
||||||
}
|
}
|
||||||
|
const workflowRunAttemptStr = process.env["GITHUB_RUN_ATTEMPT"];
|
||||||
|
let workflowRunAttempt = -1;
|
||||||
|
if (workflowRunAttemptStr) {
|
||||||
|
workflowRunAttempt = parseInt(workflowRunAttemptStr, 10);
|
||||||
|
}
|
||||||
const workflowName = process.env["GITHUB_WORKFLOW"] || "";
|
const workflowName = process.env["GITHUB_WORKFLOW"] || "";
|
||||||
const jobName = process.env["GITHUB_JOB"] || "";
|
const jobName = process.env["GITHUB_JOB"] || "";
|
||||||
const analysis_key = await getAnalysisKey();
|
const analysis_key = await getAnalysisKey();
|
||||||
@@ -437,6 +444,7 @@ export async function createStatusReportBase(
|
|||||||
|
|
||||||
const statusReport: StatusReportBase = {
|
const statusReport: StatusReportBase = {
|
||||||
workflow_run_id: workflowRunID,
|
workflow_run_id: workflowRunID,
|
||||||
|
workflow_run_attempt: workflowRunAttempt,
|
||||||
workflow_name: workflowName,
|
workflow_name: workflowName,
|
||||||
job_name: jobName,
|
job_name: jobName,
|
||||||
analysis_key,
|
analysis_key,
|
||||||
|
|||||||
@@ -438,9 +438,9 @@ export function assertNever(value: never): never {
|
|||||||
* knowing what version of CodeQL we're running.
|
* knowing what version of CodeQL we're running.
|
||||||
*/
|
*/
|
||||||
export function initializeEnvironment(version: string) {
|
export function initializeEnvironment(version: string) {
|
||||||
core.exportVariable(EnvVar.VERSION, version);
|
core.exportVariable(String(EnvVar.VERSION), version);
|
||||||
core.exportVariable(EnvVar.FEATURE_SARIF_COMBINE, "true");
|
core.exportVariable(String(EnvVar.FEATURE_SARIF_COMBINE), "true");
|
||||||
core.exportVariable(EnvVar.FEATURE_WILL_UPLOAD, "true");
|
core.exportVariable(String(EnvVar.FEATURE_WILL_UPLOAD), "true");
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user