octokit-plugin-create-pull-request
octokit-plugin-create-pull-request copied to clipboard
Pull request showing big difference
I am using this API to create a pull request. But whenever I make a pull request, the pull request shows me a big difference.
octokit.createPullRequest({
owner: "meera",
repo: "tech-zone",
title: $("#branchcommit").val(),
body: "Creating pull request from API",
head: userName + '_' + timestamp,
base: "wip" /* optional: defaults to default branch */ ,
update: false /* optional: set to `true` to enable updating existing pull requests */ ,
forceFork: false /* optional: force creating fork even when user has write rights */ ,
changes: [{
/* optional: if `files` is not passed, an empty commit is created instead */
files: {
[urlValue]: {
content: content
}
},
commit: 'Creating pull request from API',
}, ],
}).then((pr) => {})
In the below example, I have added "test test"
Pull request screenshot
How do I create a pull request with the new changes only ?
Hm maybe it's something with the line breaks? I don't think this is a problem with octokit-plugin-create-pull-request I'm afraid.