Skip to content

Commit

Permalink
Merge branch 'master' into report-upload-failures
Browse files Browse the repository at this point in the history
  • Loading branch information
Joshua Hale committed May 1, 2020
2 parents d68eb11 + 3d3dccf commit 43e2701
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
6 changes: 5 additions & 1 deletion lib/upload-lib.js

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

6 changes: 5 additions & 1 deletion src/upload-lib.ts
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,10 @@ export async function upload(input: string): Promise<boolean> {
const sarifFiles = fs.readdirSync(input)
.filter(f => f.endsWith(".sarif"))
.map(f => path.resolve(input, f));
if (sarifFiles.length === 0) {
core.setFailed("No SARIF files found to upload in \"" + input + "\".");
return false;
}
return await uploadFiles(sarifFiles);
} else {
return await uploadFiles([input]);
Expand Down Expand Up @@ -139,7 +143,7 @@ async function uploadFiles(sarifFiles: string[]): Promise<boolean> {
const analysisName = util.getRequiredEnvParam('GITHUB_WORKFLOW');
const startedAt = process.env[sharedEnv.CODEQL_ACTION_STARTED_AT];

core.debug("Uploading sarif files: " + JSON.stringify(sarifFiles));
core.info("Uploading sarif files: " + JSON.stringify(sarifFiles));
let sarifPayload = combineSarifFiles(sarifFiles);
sarifPayload = fingerprints.addFingerprints(sarifPayload);

Expand Down

0 comments on commit 43e2701

Please sign in to comment.