octokit-create-pull-request
Octokit plugin to create a pull request with multiple file changes
Features
- Retrieves the repository’s default branch unless
base
branch is set - Makes multiple file changes using a single commit
- Creates a fork if the authenticated user does not have write access to the repository
- See Todos for more cool feature ideas! Pull requests welcome!
Usage
Update or create two files with a single commit
const Octokit = ;const createPullRequest = ; const MyOctokit = Octokit; const TOKEN = "secret123"; // token needs "repo" scopeconst octokit = auth: TOKEN; // Returns a normal Octokit PR response// See https://octokit.github.io/rest.js/#octokit-routes-pulls-createoctokit ;
You can create a personal access token with the repo
scope at
https://github.com/settings/tokens/new?scopes=repo
Todos
- Editing files based on current content
Addsupporttopassafunctionasfilecontent,thefunctionwillbecalledwiththecurrentfilecontent,ifpresent. - Multiple commits
Splitupchangesamongmultipleedits