gr2m / octokit-plugin-create-pull-request

Octokit plugin to create a pull request with multiple file changes
MIT License
104 stars 28 forks source link

#41 allow draft pr configuration #57

Closed benmangold closed 4 years ago

benmangold commented 4 years ago

Issue #41

Hello!

Loving this plugin, thanks for making it.

This change allows for a draft boolean to be passed to octokit to make a draft pull request. I've tested it on a private repo and it did indeed file a draft.

Here's what my working code looks like:

  const response = await octokit.createPullRequest({
    owner,
    repo,
    title,
    body,
    head,
    changes,
    draft: true
  });

I copied the happy path test pretty much verbatim, except for switching the new draft boolean to true and including a test to verify it has a valid default as well. Please let me know if this warrants generating a new fixture, I'm not sure. right now the new tests use the happy-path fixture

benmangold commented 4 years ago

@gr2m I think I've got this all cleaned up now, please let me know if there's anything else you're looking for in the pr.

github-actions[bot] commented 4 years ago

:tada: This PR is included in version 3.9.0 :tada:

The release is available on:

Your semantic-release bot :package::rocket: