Skip to content

Commit

Permalink
Reuse existing fields in post-init status report
Browse files Browse the repository at this point in the history
  • Loading branch information
henrymercer committed Dec 12, 2022
1 parent 118e294 commit b7b875e
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 24 deletions.
7 changes: 2 additions & 5 deletions lib/init-action-post-helper.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/init-action-post-helper.js.map

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

20 changes: 2 additions & 18 deletions src/init-action-post-helper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,7 @@ import {
getWorkflow,
} from "./workflow";

export interface UploadFailedSarifResult {
/**
* If a SARIF file was uploaded for a failed run, this is the size in bytes of the unzipped
* SARIF payload.
*/
upload_failed_run_raw_upload_size_bytes?: number;
/**
* If a SARIF file was uploaded for a failed run, this is the size in bytes of the actual
* zipped payload.
*/
upload_failed_run_zipped_upload_size_bytes?: number;

export interface UploadFailedSarifResult extends uploadLib.UploadStatusReport {
/** If there was an error while uploading a failed run, this is its message. */
upload_failed_run_error?: string;
/** If there was an error while uploading a failed run, this is its stack trace. */
Expand Down Expand Up @@ -100,12 +89,7 @@ export async function uploadFailedSarif(
logger,
{ isUnsuccessfulExecution: true }
);
return {
upload_failed_run_raw_upload_size_bytes:
uploadResult?.statusReport?.raw_upload_size_bytes,
upload_failed_run_zipped_upload_size_bytes:
uploadResult?.statusReport?.zipped_upload_size_bytes,
};
return uploadResult?.statusReport ?? {};
}

export async function uploadSarifIfRunFailed(
Expand Down

0 comments on commit b7b875e

Please sign in to comment.