gr2m / gr2m/octokit-plugin-create-pull-request

Pull request showing big difference

Open
#112 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
116
Forks
31
PR merge metrics
No merged PRs in 30d

Description

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 ?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.