Swap method naming to account for new functionality
This commit is contained in:
parent
28e2860afb
commit
795b1923ec
9 changed files with 141 additions and 141 deletions
10
lib/actions-util.js
generated
10
lib/actions-util.js
generated
|
|
@ -164,7 +164,7 @@ exports.WorkflowErrors = toCodedErrors({
|
|||
PathsIgnoreSpecified: `Using on.push.paths-ignore can prevent Code Scanning annotating new alerts in your pull requests.`,
|
||||
CheckoutWrongHead: `git checkout HEAD^2 is no longer necessary. Please remove this step as Code Scanning recommends analyzing the merge commit for best results.`,
|
||||
});
|
||||
function validateWorkflow(doc) {
|
||||
function getWorkflowErrors(doc) {
|
||||
var _a, _b, _c, _d, _e, _f, _g, _h;
|
||||
const errors = [];
|
||||
const jobName = process.env.GITHUB_JOB;
|
||||
|
|
@ -261,12 +261,12 @@ function validateWorkflow(doc) {
|
|||
}
|
||||
return errors;
|
||||
}
|
||||
exports.validateWorkflow = validateWorkflow;
|
||||
async function getWorkflowErrors() {
|
||||
exports.getWorkflowErrors = getWorkflowErrors;
|
||||
async function validateWorkflow() {
|
||||
try {
|
||||
const workflow = await getWorkflow();
|
||||
try {
|
||||
const workflowErrors = validateWorkflow(workflow);
|
||||
const workflowErrors = getWorkflowErrors(workflow);
|
||||
if (workflowErrors.length > 0) {
|
||||
core.warning(formatWorkflowErrors(workflowErrors));
|
||||
}
|
||||
|
|
@ -280,7 +280,7 @@ async function getWorkflowErrors() {
|
|||
return `getWorkflow() failed: ${e.toString()}`;
|
||||
}
|
||||
}
|
||||
exports.getWorkflowErrors = getWorkflowErrors;
|
||||
exports.validateWorkflow = validateWorkflow;
|
||||
function formatWorkflowErrors(errors) {
|
||||
const issuesWere = errors.length === 1 ? "issue was" : "issues were";
|
||||
const errorsList = errors.map((e) => e.message).join(" ");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue