Skip to content

Commit b7b875e

Browse files
committed
Reuse existing fields in post-init status report
1 parent 118e294 commit b7b875e

File tree

3 files changed

+5
-24
lines changed

3 files changed

+5
-24
lines changed

lib/init-action-post-helper.js

+2-5
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/init-action-post-helper.js.map

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/init-action-post-helper.ts

+2-18
Original file line numberDiff line numberDiff line change
@@ -16,18 +16,7 @@ import {
1616
getWorkflow,
1717
} from "./workflow";
1818

19-
export interface UploadFailedSarifResult {
20-
/**
21-
* If a SARIF file was uploaded for a failed run, this is the size in bytes of the unzipped
22-
* SARIF payload.
23-
*/
24-
upload_failed_run_raw_upload_size_bytes?: number;
25-
/**
26-
* If a SARIF file was uploaded for a failed run, this is the size in bytes of the actual
27-
* zipped payload.
28-
*/
29-
upload_failed_run_zipped_upload_size_bytes?: number;
30-
19+
export interface UploadFailedSarifResult extends uploadLib.UploadStatusReport {
3120
/** If there was an error while uploading a failed run, this is its message. */
3221
upload_failed_run_error?: string;
3322
/** If there was an error while uploading a failed run, this is its stack trace. */
@@ -100,12 +89,7 @@ export async function uploadFailedSarif(
10089
logger,
10190
{ isUnsuccessfulExecution: true }
10291
);
103-
return {
104-
upload_failed_run_raw_upload_size_bytes:
105-
uploadResult?.statusReport?.raw_upload_size_bytes,
106-
upload_failed_run_zipped_upload_size_bytes:
107-
uploadResult?.statusReport?.zipped_upload_size_bytes,
108-
};
92+
return uploadResult?.statusReport ?? {};
10993
}
11094

11195
export async function uploadSarifIfRunFailed(

0 commit comments

Comments
 (0)