Skip to content
Snippets Groups Projects
Commit 19a4dc1b authored by Rhys Arkins's avatar Rhys Arkins
Browse files

Fix lint

parent 238f32ac
No related branches found
No related tags found
No related merge requests found
...@@ -91,12 +91,10 @@ function createBranch(branchName) { ...@@ -91,12 +91,10 @@ function createBranch(branchName) {
function checkForClosedPr(branchName, prTitle) { function checkForClosedPr(branchName, prTitle) {
return ghGot( return ghGot(
`repos/${config.repoName}/pulls?state=closed&head=${config.owner}:${branchName}`, `repos/${config.repoName}/pulls?state=closed&head=${config.owner}:${branchName}`,
{ { token: config.token })
token: config.token .then(res =>
}).then(res => res.body.some( res.body.some(pr => pr.title === prTitle && pr.head.label === `${config.owner}:${branchName}`))
pr => pr.title === prTitle && .catch((error) => {
pr.head.label === `${config.owner}:${branchName}`)
).catch((error) => {
console.error(`Error checking if PR already existed: ${error}`); console.error(`Error checking if PR already existed: ${error}`);
}); });
} }
...@@ -132,7 +130,7 @@ function updatePr(prNo, title, body) { ...@@ -132,7 +130,7 @@ function updatePr(prNo, title, body) {
function getFile(filePath, branchName = config.defaultBranch) { function getFile(filePath, branchName = config.defaultBranch) {
return ghGot(`repos/${config.repoName}/contents/${filePath}?ref=${branchName}`, return ghGot(`repos/${config.repoName}/contents/${filePath}?ref=${branchName}`,
{ {
token: config.token token: config.token,
}); });
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment