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

Refactor out writeUpdates

parent 84198801
Branches
Tags
No related merge requests found
......@@ -65,11 +65,6 @@ function updateDependency(depType, depName, currentVersion, nextVersion) {
console.log(`${depName}: Skipping due to existing PR found.`);
return;
}
return writeUpdates(depType, depName, branchName, prTitle, currentVersion, nextVersion);
});
}
function writeUpdates(depType, depName, branchName, prTitle, currentVersion, nextVersion) {
const prBody = config.templates.prBody({ depName, currentVersion, nextVersion });
return github.createBranch(branchName).catch(error => {
if (error.response.body.message !== 'Reference already exists') {
......@@ -107,6 +102,7 @@ function writeUpdates(depType, depName, branchName, prTitle, currentVersion, nex
.catch(error => {
console.log('Promise catch');
});
});
}
function createOrUpdatePullRequest(branchName, prTitle, prBody) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment