The name of the branch you want the changes pulled into. This should be an existing branch on the current repository. You cannot submit a pull request to one repository that requests a merge to a base of another repository.
The name of the branch where your changes are implemented. For cross-repository pull requests in the same network, namespace head with a user like this: username:branch.
The title of the new pull request.
Name of repository owner.
Name of repository.
async
(params, auths) => {
}
//See the API docs here: https://developer.github.com/v3/pulls/#create-a-pull-request
const data = {
base: params.base,
body: params.body,
head: params.head,
title: params.title,
maintainer_can_modify: params.maintainer_can_modify,
draft: params.draft
}
return await require("axios")({
method: "post",
url: `https://api.github.com/repos/${params.owner}/${params.repo}/pulls`,
headers: {
Authorization: `Bearer ${auths.github.oauth_access_token}`,
"Content-Type": "application/json"
},
data
});