Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Do not report warning: undefined
Simon Engledew committed Feb 1, 2021

Unverified

No user is associated with the committer email.
1 parent 6408d72 commit 1f07e28
Showing 6 changed files with 15 additions and 4 deletions.
2 changes: 1 addition & 1 deletion lib/actions-util.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/actions-util.js.map

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions lib/actions-util.test.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/actions-util.test.js.map

Large diffs are not rendered by default.

7 changes: 7 additions & 0 deletions src/actions-util.test.ts
@@ -403,6 +403,13 @@ test("formatWorkflowErrors() when there are multiple errors", (t) => {
t.true(message.startsWith("2 issues were detected with this workflow:"));
});

test("formatWorkflowCause() with no errors", (t) => {
const message = actionsutil.formatWorkflowCause([
]);

t.deepEqual(message, undefined);
});

test("formatWorkflowCause()", (t) => {
const message = actionsutil.formatWorkflowCause([
actionsutil.WorkflowErrors.CheckoutWrongHead,
2 changes: 1 addition & 1 deletion src/actions-util.ts
@@ -320,7 +320,7 @@ export async function validateWorkflow(): Promise<undefined | string> {
core.warning(message);
}

return `warning: ${formatWorkflowCause(workflowErrors)}`;
return formatWorkflowCause(workflowErrors);
}

export function formatWorkflowErrors(errors: CodedError[]): string {

0 comments on commit 1f07e28

Please sign in to comment.