octokit-plugin-create-pull-request icon indicating copy to clipboard operation
octokit-plugin-create-pull-request copied to clipboard

Pull request showing big difference

Open meera1002 opened this issue 3 years ago • 1 comments

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"

image

Pull request screenshot

image image

How do I create a pull request with the new changes only ?

meera1002 avatar Jan 05 '23 19:01 meera1002

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.

gr2m avatar Jan 10 '23 01:01 gr2m