From 19a4dc1b2dae374ee8a3f8f5227ef4614739e886 Mon Sep 17 00:00:00 2001 From: Rhys Arkins <rhys@keylocation.sg> Date: Wed, 11 Jan 2017 07:54:27 +0100 Subject: [PATCH] Fix lint --- src/helpers/github.js | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/src/helpers/github.js b/src/helpers/github.js index 61a06c9614..5907d74812 100644 --- a/src/helpers/github.js +++ b/src/helpers/github.js @@ -91,12 +91,10 @@ function createBranch(branchName) { function checkForClosedPr(branchName, prTitle) { return ghGot( `repos/${config.repoName}/pulls?state=closed&head=${config.owner}:${branchName}`, - { - token: config.token - }).then(res => res.body.some( - pr => pr.title === prTitle && - pr.head.label === `${config.owner}:${branchName}`) - ).catch((error) => { + { token: config.token }) + .then(res => + res.body.some(pr => pr.title === prTitle && pr.head.label === `${config.owner}:${branchName}`)) + .catch((error) => { console.error(`Error checking if PR already existed: ${error}`); }); } @@ -132,7 +130,7 @@ function updatePr(prNo, title, body) { function getFile(filePath, branchName = config.defaultBranch) { return ghGot(`repos/${config.repoName}/contents/${filePath}?ref=${branchName}`, { - token: config.token + token: config.token, }); } -- GitLab