mirror of
https://github.com/github/codeql-action.git
synced 2026-10-03 17:41:28 +00:00
Add log
This commit is contained in:
4
lib/upload-lib.js
generated
4
lib/upload-lib.js
generated
@@ -47,6 +47,7 @@ exports.combineSarifFiles = combineSarifFiles;
|
||||
// Populates the run.automationDetails.id field using the analysis_key and environment
|
||||
// and return an updated sarif file contents.
|
||||
function populateRunAutomationDetails(sarifContents, analysis_key, environment) {
|
||||
console.log("populateRunAutomationDetails");
|
||||
if (analysis_key === undefined) {
|
||||
return sarifContents;
|
||||
}
|
||||
@@ -58,6 +59,8 @@ function populateRunAutomationDetails(sarifContents, analysis_key, environment)
|
||||
automationID += `${entry[0]}:${entry[1]}/`;
|
||||
}
|
||||
}
|
||||
console.log("automationID");
|
||||
console.log(automationID);
|
||||
const sarif = JSON.parse(sarifContents);
|
||||
for (const run of sarif.runs || []) {
|
||||
if (run.automationDetails === undefined) {
|
||||
@@ -238,6 +241,7 @@ async function uploadFiles(sarifFiles, repositoryNwo, commitOid, ref, analysisKe
|
||||
for (const file of sarifFiles) {
|
||||
validateSarifFileSchema(file, logger);
|
||||
}
|
||||
console.log("upload files");
|
||||
let sarifPayload = combineSarifFiles(sarifFiles);
|
||||
sarifPayload = fingerprints.addFingerprints(sarifPayload, checkoutPath, logger);
|
||||
sarifPayload = populateRunAutomationDetails(sarifPayload, analysisKey, environment);
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -47,6 +47,7 @@ export function populateRunAutomationDetails(
|
||||
analysis_key: string | undefined,
|
||||
environment: string | undefined
|
||||
): string {
|
||||
console.log("populateRunAutomationDetails");
|
||||
if (analysis_key === undefined) {
|
||||
return sarifContents;
|
||||
}
|
||||
@@ -60,6 +61,9 @@ export function populateRunAutomationDetails(
|
||||
}
|
||||
}
|
||||
|
||||
console.log("automationID");
|
||||
console.log(automationID);
|
||||
|
||||
const sarif = JSON.parse(sarifContents);
|
||||
for (const run of sarif.runs || []) {
|
||||
if (run.automationDetails === undefined) {
|
||||
@@ -347,6 +351,7 @@ async function uploadFiles(
|
||||
validateSarifFileSchema(file, logger);
|
||||
}
|
||||
|
||||
console.log("upload files");
|
||||
let sarifPayload = combineSarifFiles(sarifFiles);
|
||||
sarifPayload = fingerprints.addFingerprints(
|
||||
sarifPayload,
|
||||
|
||||
Reference in New Issue
Block a user