From eb468341c4fe3599d151a8131f55cffbe5d9eb9a Mon Sep 17 00:00:00 2001 From: Rhys Arkins <rhys@keylocation.sg> Date: Thu, 6 Jul 2017 19:24:09 +0200 Subject: [PATCH] =?UTF-8?q?fix:=20Don=E2=80=99t=20stringify=20options=20bo?= =?UTF-8?q?dy=20for=20PR=20labels=20(#460)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This has been broken since the upgrade to got 7.x Closes #456 --- lib/api/github.js | 2 +- test/api/__snapshots__/github.spec.js.snap | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/api/github.js b/lib/api/github.js index 105a40dfec..23846cc4bd 100644 --- a/lib/api/github.js +++ b/lib/api/github.js @@ -360,7 +360,7 @@ async function addReviewers(issueNo, reviewers) { async function addLabels(issueNo, labels) { logger.debug(`Adding labels ${labels} to #${issueNo}`); await ghGot.post(`repos/${config.repoName}/issues/${issueNo}/labels`, { - body: JSON.stringify(labels), + body: labels, }); } diff --git a/test/api/__snapshots__/github.spec.js.snap b/test/api/__snapshots__/github.spec.js.snap index ed38ce9d2e..bd71293ada 100644 --- a/test/api/__snapshots__/github.spec.js.snap +++ b/test/api/__snapshots__/github.spec.js.snap @@ -21,7 +21,10 @@ Array [ Array [ "repos/some/repo/issues/42/labels", Object { - "body": "[\\"foo\\",\\"bar\\"]", + "body": Array [ + "foo", + "bar", + ], }, ], ] -- GitLab