Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Prevent the automationDetails to be regenerated if it already exists
David Verdeguer committed Apr 16, 2021

Unverified

No user is associated with the committer email.
1 parent 47755f0 commit de611b2
Showing 3 changed files with 11 additions and 7 deletions.
8 changes: 5 additions & 3 deletions lib/upload-lib.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/upload-lib.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 5 additions & 3 deletions src/upload-lib.ts
@@ -63,9 +63,11 @@ export function populateRunAutomationDetails(

const sarif = JSON.parse(sarifContents);
for (const run of sarif.runs || []) {
run.automationDetails = {
id: automationID,
};
if (run.automationDetails === undefined) {
run.automationDetails = {
id: automationID,
};
}
}

return JSON.stringify(sarif);

0 comments on commit de611b2

Please sign in to comment.