Skip to content
This repository has been archived by the owner on Nov 4, 2022. It is now read-only.

Commit

Permalink
feat(pull-request): allow drafts when opening new PRs
Browse files Browse the repository at this point in the history
This enables the new PR draft feature recently released by GitHub
https://help.github.com/en/articles/about-pull-requests\#draft-pull-requests

re #645
  • Loading branch information
Ryan Garant committed Oct 3, 2019
1 parent df2a6f0 commit c6a7e09
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/cmds/pull-request.ts
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,6 @@ async function comment(options) {
issue_number: options.number,
repo: options.repo,
owner: options.user,
draft: options.draft,
}

return options.GitHub.issues.createComment(payload)
Expand Down Expand Up @@ -829,6 +828,10 @@ async function submit(options, user) {
base: options.branch,
head: `${options.user}:${pullBranch}`,
repo: options.repo,
mediaType: {
previews: ['shadow-cat'],
},
...(options.draft ? { draft: options.draft } : {}),
}

try {
Expand Down

0 comments on commit c6a7e09

Please sign in to comment.