Fixes #324 Use branch name from config when creating PR

This commit is contained in:
Joseph Earl
2017-04-12 22:58:23 +01:00
committed by David Calavera
parent 8520e046cd
commit bfe46a8e13
6 changed files with 419 additions and 538 deletions

View File

@ -393,7 +393,7 @@ export default class API {
return this.deleteRef("heads", branchName);
}
createPR(title, head, base = "master") {
createPR(title, head, base = this.branch) {
const body = "Automatically generated by Netlify CMS";
return this.request(`${ this.repoURL }/pulls`, {
method: "POST",
@ -518,5 +518,4 @@ export default class API {
body: JSON.stringify({ message, tree, parents }),
});
}
}