diff --git a/packages/core/src/__tests__/auto-canary-local.test.ts b/packages/core/src/__tests__/auto-canary-local.test.ts index a66718c30..ab5ac0e04 100644 --- a/packages/core/src/__tests__/auto-canary-local.test.ts +++ b/packages/core/src/__tests__/auto-canary-local.test.ts @@ -39,7 +39,7 @@ test("shipit should publish canary in locally when not on master", async () => { await auto.loadConfig(); auto.git!.getLatestRelease = () => Promise.resolve("1.2.3"); - auto.git!.getSha = () => Promise.resolve("abc"); + auto.git!.getSha = () => Promise.resolve("abcdefghijklmnop"); jest.spyOn(auto.git!, "createComment").mockImplementation(); auto.release!.getCommitsInRelease = () => Promise.resolve([]); auto.release!.getCommits = () => Promise.resolve([]); @@ -50,7 +50,7 @@ test("shipit should publish canary in locally when not on master", async () => { expect(canary).toHaveBeenCalledWith( expect.objectContaining({ bump: SEMVER.patch, - canaryIdentifier: "canary.abc", + canaryIdentifier: "canary.abcdefg", }) ); }); diff --git a/packages/core/src/auto.ts b/packages/core/src/auto.ts index 1c10bdb1f..bd3d9b32a 100644 --- a/packages/core/src/auto.ts +++ b/packages/core/src/auto.ts @@ -1194,7 +1194,9 @@ export default class Auto { } if (!pr || !build) { - canaryIdentifier = `${canaryIdentifier}.${await this.git.getSha(true)}`; + canaryIdentifier = `${canaryIdentifier}.${( + await this.git.getSha(true) + ).slice(0, 7)}`; } canaryIdentifier = `canary${canaryIdentifier}`;