Skip to content

Conversation

@chrisgavin
Copy link
Contributor

This pull request makes two changes designed to assist debugging the upload action. Firstly it increases the log level of the message listing which SARIF files are being uploaded, which is a very useful piece of information.

Secondly it fails the action if an attempt is made to upload a folder with no SARIF files in, since this is very likely to be a mistake.

Merge / deployment checklist

@chrisgavin chrisgavin requested a review from robertbrignull May 1, 2020 10:25
@chrisgavin chrisgavin changed the title Better feedback folder uploads Improve feedback about what files are being uploaded in the upload-sarif Action. May 1, 2020
@chrisgavin chrisgavin force-pushed the better-feedback-folder-uploads branch from 2cb9dd9 to b6a0306 Compare May 1, 2020 10:26
.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 + "\".");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

core.setFailed doesn't abort, so we'd still try to upload the emptyset of files.
I think it would be better to return here, but it's perhaps not essential.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But to clarify, this PR is a strict improvement as it is, so I have no opposition to merging as it is.

@chrisgavin chrisgavin merged commit 3d3dccf into master May 1, 2020
@chrisgavin chrisgavin deleted the better-feedback-folder-uploads branch May 1, 2020 14:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants