Add a default value for wait-for-processing.
This commit is contained in:
parent
49fc4c9b40
commit
823bb21bbb
4 changed files with 7 additions and 5 deletions
|
|
@ -54,7 +54,8 @@ inputs:
|
||||||
default: "true"
|
default: "true"
|
||||||
wait-for-processing:
|
wait-for-processing:
|
||||||
description: If true, the Action will wait for the uploaded SARIF to be processed before completing.
|
description: If true, the Action will wait for the uploaded SARIF to be processed before completing.
|
||||||
required: false
|
required: true
|
||||||
|
default: "false"
|
||||||
token:
|
token:
|
||||||
default: ${{ github.token }}
|
default: ${{ github.token }}
|
||||||
matrix:
|
matrix:
|
||||||
|
|
|
||||||
2
lib/upload-lib.js
generated
2
lib/upload-lib.js
generated
|
|
@ -130,7 +130,7 @@ exports.findSarifFilesInDir = findSarifFilesInDir;
|
||||||
// depending on what the path happens to refer to.
|
// depending on what the path happens to refer to.
|
||||||
// Returns true iff the upload occurred and succeeded
|
// Returns true iff the upload occurred and succeeded
|
||||||
async function uploadFromActions(sarifPath, gitHubVersion, apiDetails, logger) {
|
async function uploadFromActions(sarifPath, gitHubVersion, apiDetails, logger) {
|
||||||
return await uploadFiles(getSarifFilePaths(sarifPath), (0, repository_1.parseRepositoryNwo)(util.getRequiredEnvParam("GITHUB_REPOSITORY")), await actionsUtil.getCommitOid(), await actionsUtil.getRef(), await actionsUtil.getAnalysisKey(), actionsUtil.getOptionalInput("category"), util.getRequiredEnvParam("GITHUB_WORKFLOW"), actionsUtil.getWorkflowRunID(), actionsUtil.getRequiredInput("checkout_path"), actionsUtil.getRequiredInput("matrix"), actionsUtil.getOptionalInput("wait-for-processing") === "true", gitHubVersion, apiDetails, logger);
|
return await uploadFiles(getSarifFilePaths(sarifPath), (0, repository_1.parseRepositoryNwo)(util.getRequiredEnvParam("GITHUB_REPOSITORY")), await actionsUtil.getCommitOid(), await actionsUtil.getRef(), await actionsUtil.getAnalysisKey(), actionsUtil.getOptionalInput("category"), util.getRequiredEnvParam("GITHUB_WORKFLOW"), actionsUtil.getWorkflowRunID(), actionsUtil.getRequiredInput("checkout_path"), actionsUtil.getRequiredInput("matrix"), actionsUtil.getRequiredInput("wait-for-processing") === "true", gitHubVersion, apiDetails, logger);
|
||||||
}
|
}
|
||||||
exports.uploadFromActions = uploadFromActions;
|
exports.uploadFromActions = uploadFromActions;
|
||||||
// Uploads a single sarif file or a directory of sarif files
|
// Uploads a single sarif file or a directory of sarif files
|
||||||
|
|
|
||||||
|
|
@ -161,7 +161,7 @@ export async function uploadFromActions(
|
||||||
actionsUtil.getWorkflowRunID(),
|
actionsUtil.getWorkflowRunID(),
|
||||||
actionsUtil.getRequiredInput("checkout_path"),
|
actionsUtil.getRequiredInput("checkout_path"),
|
||||||
actionsUtil.getRequiredInput("matrix"),
|
actionsUtil.getRequiredInput("matrix"),
|
||||||
actionsUtil.getOptionalInput("wait-for-processing") === "true",
|
actionsUtil.getRequiredInput("wait-for-processing") === "true",
|
||||||
gitHubVersion,
|
gitHubVersion,
|
||||||
apiDetails,
|
apiDetails,
|
||||||
logger
|
logger
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@ inputs:
|
||||||
description: |
|
description: |
|
||||||
The SARIF file or directory of SARIF files to be uploaded to GitHub code scanning.
|
The SARIF file or directory of SARIF files to be uploaded to GitHub code scanning.
|
||||||
See https://docs.github.com/en/code-security/code-scanning/integrating-with-code-scanning/uploading-a-sarif-file-to-github#uploading-a-code-scanning-analysis-with-github-actions
|
See https://docs.github.com/en/code-security/code-scanning/integrating-with-code-scanning/uploading-a-sarif-file-to-github#uploading-a-code-scanning-analysis-with-github-actions
|
||||||
for information on the maximum number of results and maximum file size supported by code scanning.
|
for information on the maximum number of results and maximum file size supported by code scanning.
|
||||||
required: false
|
required: false
|
||||||
default: '../results'
|
default: '../results'
|
||||||
checkout_path:
|
checkout_path:
|
||||||
|
|
@ -22,7 +22,8 @@ inputs:
|
||||||
required: false
|
required: false
|
||||||
wait-for-processing:
|
wait-for-processing:
|
||||||
description: If true, the Action will wait for the uploaded SARIF to be processed before completing.
|
description: If true, the Action will wait for the uploaded SARIF to be processed before completing.
|
||||||
required: false
|
required: true
|
||||||
|
default: "false"
|
||||||
runs:
|
runs:
|
||||||
using: 'node12'
|
using: 'node12'
|
||||||
main: '../lib/upload-sarif-action.js'
|
main: '../lib/upload-sarif-action.js'
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue