Skip to content

Commit

Permalink
(node-gh#645) Support sending draft PRs
Browse files Browse the repository at this point in the history
  • Loading branch information
mdelapenya committed Oct 2, 2019
1 parent a50dec5 commit aabc553
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -384,6 +384,7 @@ gh pr 1 --fetch --merge
| `-R`, `--rebase` | **Required** | `Boolean` |
| `-n`, `--number` | _Optional_ | `Number` |
| `-b`, `--branch` | _Optional_ | `String` |
| `--draft` | _Optional_ | `Boolean` |
| `--remote` | _Optional_ | `String` |
| `-r`, `--repo` | _Optional_ | `String` |
| `-u`, `--user` | _Optional_ | `String` |
Expand Down Expand Up @@ -526,6 +527,12 @@ gh pr --submit eduardolundgren --branch dev
gh pr --submit eduardolundgren --issue 150
```

- Submit a pull request in draft state.

```
gh pr --submit eduardolundgren --draft
```

### 9. Open in Browser

| Option | Usage | Type |
Expand Down
2 changes: 2 additions & 0 deletions src/cmds/pull-request.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ export const DETAILS = {
description: String,
detailed: Boolean,
direction: String,
draft: Boolean,
fetch: Boolean,
fwd: String,
issue: Number,
Expand Down Expand Up @@ -297,6 +298,7 @@ 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

0 comments on commit aabc553

Please sign in to comment.