mirror of
https://github.com/github/codeql-action.git
synced 2025-12-07 00:08:06 +08:00
Compare commits
2 Commits
codeql-bun
...
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) {
|
||||
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 jobName = process.env["GITHUB_JOB"] || "";
|
||||
const analysis_key = await getAnalysisKey();
|
||||
@@ -314,6 +319,7 @@ async function createStatusReportBase(actionName, status, actionStartedAt, cause
|
||||
}
|
||||
const statusReport = {
|
||||
workflow_run_id: workflowRunID,
|
||||
workflow_run_attempt: workflowRunAttempt,
|
||||
workflow_name: workflowName,
|
||||
job_name: jobName,
|
||||
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.
|
||||
*/
|
||||
function initializeEnvironment(version) {
|
||||
core.exportVariable(shared_environment_1.EnvVar.VERSION, version);
|
||||
core.exportVariable(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.VERSION), version);
|
||||
core.exportVariable(String(shared_environment_1.EnvVar.FEATURE_SARIF_COMBINE), "true");
|
||||
core.exportVariable(String(shared_environment_1.EnvVar.FEATURE_WILL_UPLOAD), "true");
|
||||
}
|
||||
exports.initializeEnvironment = initializeEnvironment;
|
||||
/**
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -313,6 +313,8 @@ export type ActionStatus =
|
||||
export interface StatusReportBase {
|
||||
/** ID of the workflow run containing the action run. */
|
||||
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: string;
|
||||
/** Job name from the workflow. */
|
||||
@@ -410,6 +412,11 @@ export async function createStatusReportBase(
|
||||
if (workflowRunIDStr) {
|
||||
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 jobName = process.env["GITHUB_JOB"] || "";
|
||||
const analysis_key = await getAnalysisKey();
|
||||
@@ -437,6 +444,7 @@ export async function createStatusReportBase(
|
||||
|
||||
const statusReport: StatusReportBase = {
|
||||
workflow_run_id: workflowRunID,
|
||||
workflow_run_attempt: workflowRunAttempt,
|
||||
workflow_name: workflowName,
|
||||
job_name: jobName,
|
||||
analysis_key,
|
||||
|
||||
@@ -438,9 +438,9 @@ export function assertNever(value: never): never {
|
||||
* knowing what version of CodeQL we're running.
|
||||
*/
|
||||
export function initializeEnvironment(version: string) {
|
||||
core.exportVariable(EnvVar.VERSION, version);
|
||||
core.exportVariable(EnvVar.FEATURE_SARIF_COMBINE, "true");
|
||||
core.exportVariable(EnvVar.FEATURE_WILL_UPLOAD, "true");
|
||||
core.exportVariable(String(EnvVar.VERSION), version);
|
||||
core.exportVariable(String(EnvVar.FEATURE_SARIF_COMBINE), "true");
|
||||
core.exportVariable(String(EnvVar.FEATURE_WILL_UPLOAD), "true");
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user