Add test mode
This commit is contained in:
parent
baa9c9e0df
commit
c979850d28
3 changed files with 16 additions and 2 deletions
5
lib/upload-lib.js
generated
5
lib/upload-lib.js
generated
|
|
@ -58,6 +58,11 @@ exports.combineSarifFiles = combineSarifFiles;
|
|||
// If the request fails then this will retry a small number of times.
|
||||
async function uploadPayload(payload) {
|
||||
core.info('Uploading results');
|
||||
// If in test mode we don't want to upload the results
|
||||
const testMode = process.env['TEST_MODE'] === 'true' || false;
|
||||
if (testMode) {
|
||||
return true;
|
||||
}
|
||||
const githubToken = core.getInput('token');
|
||||
const ph = new auth.BearerCredentialHandler(githubToken);
|
||||
const client = new http.HttpClient('Code Scanning : Upload SARIF', [ph]);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue