mirror of
https://github.com/github/codeql-action.git
synced 2025-12-24 08:10:06 +08:00
Fix populateRunAutomationDetails for null environments
This commit is contained in:
5
lib/upload-lib.js
generated
5
lib/upload-lib.js
generated
@@ -52,11 +52,10 @@ function populateRunAutomationDetails(sarifContents, analysis_key, environment)
|
||||
}
|
||||
let automationID = `${analysis_key}/`;
|
||||
// the id has to be deterministic so we sort the fields
|
||||
if (environment !== undefined) {
|
||||
console.log(environment);
|
||||
if (environment !== undefined && environment !== "null") {
|
||||
const environmentObject = JSON.parse(environment);
|
||||
for (const entry of Object.entries(environmentObject).sort()) {
|
||||
automationID += `${entry[0]}:${entry[1]}/`; //automationID + entry[0] + ':' + entry[1] + '/';
|
||||
automationID += `${entry[0]}:${entry[1]}/`;
|
||||
}
|
||||
}
|
||||
const sarif = JSON.parse(sarifContents);
|
||||
|
||||
Reference in New Issue
Block a user