diff --git a/src/helpers/github.js b/src/helpers/github.js index 61a06c961458b10a01f159447347117117a63f8d..5907d748122b465fd2def1e1cbb864a329e721c5 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, }); }