Skip to content

Commit

Permalink
Prevent the automationDetails to be regenerated if it already exists
Browse files Browse the repository at this point in the history
  • Loading branch information
David Verdeguer committed Apr 16, 2021
1 parent 47755f0 commit de611b2
Show file tree
Hide file tree
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
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit de611b2

Please sign in to comment.