diff --git a/bin-src/tasks/gitInfo.js b/bin-src/tasks/gitInfo.js index c539b491d..09e120b88 100644 --- a/bin-src/tasks/gitInfo.js +++ b/bin-src/tasks/gitInfo.js @@ -25,8 +25,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, $slug: String) { + skipBuild(commit: $commit, branch: $branch, slug: $slug) } `; @@ -54,7 +54,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; @@ -62,7 +62,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, slug })) { ctx.skip = true; transitionTo(skippedForCommit, true)(ctx, task); setExitCode(ctx, exitCodes.OK);