Skip to content

Commit c4084e1

Browse files
author
Simon Engledew
authored
Merge pull request #386 from github/simon-engledew/warning-undefined
Do not report warning: undefined
2 parents 3d8b1cb + f3f5dfd commit c4084e1

File tree

6 files changed

+14
-4
lines changed

6 files changed

+14
-4
lines changed

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: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -403,6 +403,12 @@ 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+
t.deepEqual(message, undefined);
410+
});
411+
406412
test("formatWorkflowCause()", (t) => {
407413
const message = actionsutil.formatWorkflowCause([
408414
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)