From b1bbac7215fecbde5409ab5d05c1f6a4490fa252 Mon Sep 17 00:00:00 2001 From: Alan Johnson Date: Wed, 1 Feb 2023 08:21:02 -0500 Subject: [PATCH 1/2] Add --upload to diff-all command --- src/action.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/action.ts b/src/action.ts index 375c62b..40ea02b 100644 --- a/src/action.ts +++ b/src/action.ts @@ -168,7 +168,7 @@ async function diffAll(token: string, from: string): Promise { return execCommand( "optic", - ["diff-all", "--compare-from", from, "--check"], + ["diff-all", "--compare-from", from, "--check", "--upload"], { env: { ...process.env, From ac260d373e4f963ddc81557a0824a0599d415767 Mon Sep 17 00:00:00 2001 From: Alan Johnson Date: Wed, 1 Feb 2023 08:21:50 -0500 Subject: [PATCH 2/2] Fix test --- src/__tests__/action.test.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/__tests__/action.test.ts b/src/__tests__/action.test.ts index 94f96eb..94dd960 100644 --- a/src/__tests__/action.test.ts +++ b/src/__tests__/action.test.ts @@ -177,7 +177,7 @@ function mockDiffAll(token: string, from: string, error = false): () => void { return () => expect(jest.mocked(exec.exec)).toHaveBeenCalledWith( "optic", - ["diff-all", "--compare-from", from, "--check"], + ["diff-all", "--compare-from", from, "--check", "--upload"], expect.objectContaining({ env: expect.objectContaining({ OPTIC_TOKEN: "optic-token" }), })