Rebuild
This commit is contained in:
parent
1895b29ac8
commit
9cf3243b0b
59 changed files with 233 additions and 248 deletions
18
lib/workflow.js
generated
18
lib/workflow.js
generated
|
|
@ -26,7 +26,15 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|||
return (mod && mod.__esModule) ? mod : { "default": mod };
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.getCheckoutPathInputOrThrow = exports.getUploadInputOrThrow = exports.getCategoryInputOrThrow = exports.getWorkflow = exports.formatWorkflowCause = exports.formatWorkflowErrors = exports.validateWorkflow = exports.getWorkflowErrors = exports.WorkflowErrors = void 0;
|
||||
exports.WorkflowErrors = void 0;
|
||||
exports.getWorkflowErrors = getWorkflowErrors;
|
||||
exports.validateWorkflow = validateWorkflow;
|
||||
exports.formatWorkflowErrors = formatWorkflowErrors;
|
||||
exports.formatWorkflowCause = formatWorkflowCause;
|
||||
exports.getWorkflow = getWorkflow;
|
||||
exports.getCategoryInputOrThrow = getCategoryInputOrThrow;
|
||||
exports.getUploadInputOrThrow = getUploadInputOrThrow;
|
||||
exports.getCheckoutPathInputOrThrow = getCheckoutPathInputOrThrow;
|
||||
const fs = __importStar(require("fs"));
|
||||
const path = __importStar(require("path"));
|
||||
const zlib_1 = __importDefault(require("zlib"));
|
||||
|
|
@ -125,7 +133,6 @@ async function getWorkflowErrors(doc, codeql) {
|
|||
}
|
||||
return errors;
|
||||
}
|
||||
exports.getWorkflowErrors = getWorkflowErrors;
|
||||
function hasWorkflowTrigger(triggerName, doc) {
|
||||
if (!doc.on) {
|
||||
return false;
|
||||
|
|
@ -165,20 +172,17 @@ async function validateWorkflow(codeql, logger) {
|
|||
}
|
||||
return formatWorkflowCause(workflowErrors);
|
||||
}
|
||||
exports.validateWorkflow = validateWorkflow;
|
||||
function formatWorkflowErrors(errors) {
|
||||
const issuesWere = errors.length === 1 ? "issue was" : "issues were";
|
||||
const errorsList = errors.map((e) => e.message).join(" ");
|
||||
return `${errors.length} ${issuesWere} detected with this workflow: ${errorsList}`;
|
||||
}
|
||||
exports.formatWorkflowErrors = formatWorkflowErrors;
|
||||
function formatWorkflowCause(errors) {
|
||||
if (errors.length === 0) {
|
||||
return undefined;
|
||||
}
|
||||
return errors.map((e) => e.code).join(",");
|
||||
}
|
||||
exports.formatWorkflowCause = formatWorkflowCause;
|
||||
async function getWorkflow(logger) {
|
||||
// In default setup, the currently executing workflow is not checked into the repository.
|
||||
// Instead, a gzipped then base64 encoded version of the workflow file is provided via the
|
||||
|
|
@ -191,7 +195,6 @@ async function getWorkflow(logger) {
|
|||
const workflowPath = await getWorkflowAbsolutePath(logger);
|
||||
return yaml.load(fs.readFileSync(workflowPath, "utf-8"));
|
||||
}
|
||||
exports.getWorkflow = getWorkflow;
|
||||
/**
|
||||
* Get the absolute path of the currently executing workflow.
|
||||
*/
|
||||
|
|
@ -281,7 +284,6 @@ function getAnalyzeActionName() {
|
|||
function getCategoryInputOrThrow(workflow, jobName, matrixVars) {
|
||||
return getInputOrThrow(workflow, jobName, getAnalyzeActionName(), "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.
|
||||
|
|
@ -294,7 +296,6 @@ exports.getCategoryInputOrThrow = getCategoryInputOrThrow;
|
|||
function getUploadInputOrThrow(workflow, jobName, matrixVars) {
|
||||
return getInputOrThrow(workflow, jobName, getAnalyzeActionName(), "upload", matrixVars);
|
||||
}
|
||||
exports.getUploadInputOrThrow = getUploadInputOrThrow;
|
||||
/**
|
||||
* Makes a best effort attempt to retrieve the checkout_path input for the
|
||||
* particular job, given a set of matrix variables.
|
||||
|
|
@ -308,5 +309,4 @@ function getCheckoutPathInputOrThrow(workflow, jobName, matrixVars) {
|
|||
return (getInputOrThrow(workflow, jobName, getAnalyzeActionName(), "checkout_path", matrixVars) || (0, util_1.getRequiredEnvParam)("GITHUB_WORKSPACE") // if unspecified, checkout_path defaults to ${{ github.workspace }}
|
||||
);
|
||||
}
|
||||
exports.getCheckoutPathInputOrThrow = getCheckoutPathInputOrThrow;
|
||||
//# sourceMappingURL=workflow.js.map
|
||||
Loading…
Add table
Add a link
Reference in a new issue