Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
63 changes: 38 additions & 25 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,45 +64,58 @@ Usage: patch2pr [options] [patch]

Override the commit message by using the -message flag.

With the -fork and -fork-repository flags, the command can submit the pull
request from a fork repository. If an existing fork does not exist, the
command creates a new fork, which may take up to five minutes.

Options:

-base-branch=branch The branch to target with the pull request. If unset,
use the repository's default branch.
-base-branch=branch The branch to target with the pull request. If unset,
use the repository's default branch.

-draft Create a draft pull request.

-force Update the head branch even if it exists and is not a
fast-forward.

-draft Create a draft pull request.
-fork Submit the pull request from a fork instead of pushing
directly to the repository. With no other flags, use a
fork in the current account with the same name as the
target repository, creating the fork if it does not exist.

-force Update the head branch even if it exists and is not a
fast-forward.
-fork-repository=repo Submit the pull request from the named fork instead of
pushing directly to the repository, creating the fork
if it does not exist. Implies the -fork flag.

-head-branch=branch The branch to create or update with the new commit. If
unset, use 'patch2pr'.
-head-branch=branch The branch to create or update with the new commit. If
unset, use 'patch2pr'.

-json Output information about the new commit and pull request
in JSON format.
-json Output information about the new commit and pull request
in JSON format.

-message=message Message for the commit. Overrides the patch header.
-message=message Message for the commit. Overrides the patch header.

-no-pull-request Do not create a pull request after creating a commit.
-no-pull-request Do not create a pull request after creating a commit.

-patch-base=base Base commit to apply the patch to. Can be a SHA1, a
branch, or a tag. Branches and tags must start with
'refs/heads/' or 'refs/tags/' respectively. If unset,
use the repository's default branch.
-patch-base=base Base commit to apply the patch to. Can be a SHA1, a
branch, or a tag. Branches and tags must start with
'refs/heads/' or 'refs/tags/' respectively. If unset,
use the repository's default branch.

-pull-body=body The body for the pull request. If unset, use the body of
the commit message.
-pull-body=body The body for the pull request. If unset, use the body of
the commit message.

-pull-title=title The title for the pull request. If unset, use the title
of the commit message.
-pull-title=title The title for the pull request. If unset, use the title
of the commit message.

-repository=repo Repository to apply the patch to in 'owner/name' format.
Required.
-repository=repo Repository to apply the patch to in 'owner/name' format.
Required.

-token=token GitHub API token with 'repo' scope for authentication.
If unset, use the value of the GITHUB_TOKEN environment
variable.
-token=token GitHub API token with 'repo' scope for authentication.
If unset, use the value of the GITHUB_TOKEN environment
variable.

-url=url GitHub API URL. If unset, use https://api.github.com.
-url=url GitHub API URL. If unset, use https://api.github.com.
```

## Usage: Library
Expand Down
Loading