Skip to content

Commit 1f07e28

Browse files
author
Simon Engledew
committed
Do not report warning: undefined
1 parent 6408d72 commit 1f07e28

6 files changed

Lines changed: 15 additions & 4 deletions

File tree

lib/actions-util.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/actions-util.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/actions-util.test.js

Lines changed: 4 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/actions-util.test.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/actions-util.test.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -403,6 +403,13 @@ test("formatWorkflowErrors() when there are multiple errors", (t) => {
403403
t.true(message.startsWith("2 issues were detected with this workflow:"));
404404
});
405405

406+
test("formatWorkflowCause() with no errors", (t) => {
407+
const message = actionsutil.formatWorkflowCause([
408+
]);
409+
410+
t.deepEqual(message, undefined);
411+
});
412+
406413
test("formatWorkflowCause()", (t) => {
407414
const message = actionsutil.formatWorkflowCause([
408415
actionsutil.WorkflowErrors.CheckoutWrongHead,

src/actions-util.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -320,7 +320,7 @@ export async function validateWorkflow(): Promise<undefined | string> {
320320
core.warning(message);
321321
}
322322

323-
return `warning: ${formatWorkflowCause(workflowErrors)}`;
323+
return formatWorkflowCause(workflowErrors);
324324
}
325325

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

0 commit comments

Comments
 (0)