Skip to content

Commit de611b2

Browse files
committed
Prevent the automationDetails to be regenerated if it already exists
1 parent 47755f0 commit de611b2

3 files changed

Lines changed: 11 additions & 7 deletions

File tree

lib/upload-lib.js

Lines changed: 5 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/upload-lib.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/upload-lib.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,9 +63,11 @@ export function populateRunAutomationDetails(
6363

6464
const sarif = JSON.parse(sarifContents);
6565
for (const run of sarif.runs || []) {
66-
run.automationDetails = {
67-
id: automationID,
68-
};
66+
if (run.automationDetails === undefined) {
67+
run.automationDetails = {
68+
id: automationID,
69+
};
70+
}
6971
}
7072

7173
return JSON.stringify(sarif);

0 commit comments

Comments
 (0)