Upload failed SARIF files to Code Scanning

This commit is contained in:
Henry Mercer 2022-11-23 13:27:16 +00:00
parent 3afc2b194c
commit 5296a763b1
28 changed files with 319 additions and 63 deletions

8
lib/actions-util.js generated
View file

@ -173,10 +173,10 @@ async function getAutomationID() {
exports.getAutomationID = getAutomationID;
function computeAutomationID(analysis_key, environment) {
let automationID = `${analysis_key}/`;
// the id has to be deterministic so we sort the fields
if (environment !== undefined && environment !== "null") {
const environmentObject = JSON.parse(environment);
for (const entry of Object.entries(environmentObject).sort()) {
const matrix = (0, util_1.parseMatrixInput)(environment);
if (matrix !== undefined) {
// the id has to be deterministic so we sort the fields
for (const entry of Object.entries(matrix).sort()) {
if (typeof entry[1] === "string") {
automationID += `${entry[0]}:${entry[1]}/`;
}