From bf243c9ae27f97dd6cd108f0aa38afdd0d3a2ab9 Mon Sep 17 00:00:00 2001 From: Tom Coleman Date: Fri, 10 Dec 2021 13:19:52 +1100 Subject: [PATCH 1/4] Send `branch` when skipping --- bin-src/tasks/gitInfo.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bin-src/tasks/gitInfo.js b/bin-src/tasks/gitInfo.js index ae6eb02af..fba2bfc6a 100644 --- a/bin-src/tasks/gitInfo.js +++ b/bin-src/tasks/gitInfo.js @@ -23,8 +23,8 @@ import invalidChangedFiles from '../ui/messages/warnings/invalidChangedFiles'; import isRebuild from '../ui/messages/warnings/isRebuild'; const TesterSkipBuildMutation = ` - mutation TesterSkipBuildMutation($commit: String!) { - skipBuild(commit: $commit) + mutation TesterSkipBuildMutation($commit: String!, $branch: String) { + skipBuild(commit: $commit, branch: $branch) } `; @@ -59,7 +59,7 @@ export const setGitInfo = async (ctx, task) => { if (matchesBranch(ctx.options.skip)) { transitionTo(skippingBuild)(ctx, task); // The SkipBuildMutation ensures the commit is tagged properly. - if (await ctx.client.runQuery(TesterSkipBuildMutation, { commit })) { + if (await ctx.client.runQuery(TesterSkipBuildMutation, { commit, branch })) { ctx.skip = true; transitionTo(skippedForCommit, true)(ctx, task); ctx.exitCode = 0; From 81b56ba6cbe144a43db2212d94a99ab719847ce1 Mon Sep 17 00:00:00 2001 From: Tom Coleman Date: Mon, 20 Dec 2021 17:14:58 +1100 Subject: [PATCH 2/4] Also send slug --- bin-src/tasks/gitInfo.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin-src/tasks/gitInfo.js b/bin-src/tasks/gitInfo.js index fba2bfc6a..70993c463 100644 --- a/bin-src/tasks/gitInfo.js +++ b/bin-src/tasks/gitInfo.js @@ -51,7 +51,7 @@ export const setGitInfo = async (ctx, task) => { ctx.git.slug = ctx.git.slug.replace(/[^/]+/, ctx.options.ownerName); } - const { branch, commit } = ctx.git; + const { branch, commit, slug } = ctx.git; const matchesBranch = (glob) => (glob && glob.length ? picomatch(glob)(branch) : !!glob); ctx.git.matchesBranch = matchesBranch; @@ -59,7 +59,7 @@ export const setGitInfo = async (ctx, task) => { if (matchesBranch(ctx.options.skip)) { transitionTo(skippingBuild)(ctx, task); // The SkipBuildMutation ensures the commit is tagged properly. - if (await ctx.client.runQuery(TesterSkipBuildMutation, { commit, branch })) { + if (await ctx.client.runQuery(TesterSkipBuildMutation, { commit, branch, slug })) { ctx.skip = true; transitionTo(skippedForCommit, true)(ctx, task); ctx.exitCode = 0; From 6345afc18d069161a4403d09707f7e5fa2b2ee3f Mon Sep 17 00:00:00 2001 From: Tom Coleman Date: Thu, 13 Jan 2022 16:36:07 +1100 Subject: [PATCH 3/4] Actually send `slug` --- bin-src/tasks/gitInfo.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin-src/tasks/gitInfo.js b/bin-src/tasks/gitInfo.js index f2bb78f9c..64106db69 100644 --- a/bin-src/tasks/gitInfo.js +++ b/bin-src/tasks/gitInfo.js @@ -23,8 +23,8 @@ import invalidChangedFiles from '../ui/messages/warnings/invalidChangedFiles'; import isRebuild from '../ui/messages/warnings/isRebuild'; const TesterSkipBuildMutation = ` - mutation TesterSkipBuildMutation($commit: String!, $branch: String) { - skipBuild(commit: $commit, branch: $branch) + mutation TesterSkipBuildMutation($commit: String!, $branch: String, $slug: String) { + skipBuild(commit: $commit, branch: $branch, slug: $slug) } `; From 844ddf95dbdfff2385e04a293221c495953b3610 Mon Sep 17 00:00:00 2001 From: Tom Coleman Date: Mon, 17 Jan 2022 11:39:18 +1100 Subject: [PATCH 4/4] 6.4.0-canary.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index c3107d8dc..96cd12d20 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "chromatic", - "version": "6.3.0-canary.0", + "version": "6.4.0-canary.0", "description": "Automate visual testing across browsers. Gather UI feedback. Versioned documentation.", "keywords": [ "storybook-addon",