Add function for retrieving the "upload" input
This commit is contained in:
parent
4d4e25083a
commit
3cf2a1ba2e
4 changed files with 38 additions and 2 deletions
14
lib/workflow.js
generated
14
lib/workflow.js
generated
|
|
@ -19,7 +19,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|||
return result;
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.getCategoryInputOrThrow = exports.getStepsCallingAction = exports.getWorkflowRunID = exports.getWorkflowPath = exports.getWorkflow = exports.formatWorkflowCause = exports.formatWorkflowErrors = exports.validateWorkflow = exports.getWorkflowErrors = exports.WorkflowErrors = exports.patternIsSuperset = void 0;
|
||||
exports.getUploadInputOrThrow = exports.getCategoryInputOrThrow = exports.getStepsCallingAction = exports.getWorkflowRunID = exports.getWorkflowPath = exports.getWorkflow = exports.formatWorkflowCause = exports.formatWorkflowErrors = exports.validateWorkflow = exports.getWorkflowErrors = exports.WorkflowErrors = exports.patternIsSuperset = void 0;
|
||||
const fs = __importStar(require("fs"));
|
||||
const path = __importStar(require("path"));
|
||||
const core = __importStar(require("@actions/core"));
|
||||
|
|
@ -302,4 +302,16 @@ function getCategoryInputOrThrow(workflow, jobName, matrixVars) {
|
|||
return getInputOrThrow(workflow, jobName, "github/codeql-action/analyze", "category", matrixVars);
|
||||
}
|
||||
exports.getCategoryInputOrThrow = getCategoryInputOrThrow;
|
||||
/**
|
||||
* Makes a best effort attempt to retrieve the upload input for the particular job,
|
||||
* given a set of matrix variables.
|
||||
*
|
||||
* @returns the upload input
|
||||
* @throws an error if the upload input could not be determined
|
||||
*/
|
||||
function getUploadInputOrThrow(workflow, jobName, matrixVars) {
|
||||
return (getInputOrThrow(workflow, jobName, "github/codeql-action/analyze", "upload", matrixVars) || "true" // if unspecified, upload defaults to true
|
||||
);
|
||||
}
|
||||
exports.getUploadInputOrThrow = getUploadInputOrThrow;
|
||||
//# sourceMappingURL=workflow.js.map
|
||||
File diff suppressed because one or more lines are too long
Loading…
Add table
Add a link
Reference in a new issue