https://github.com/itspriddle/gh-prq
Open GitHub Pull Requests with your $EDITOR
https://github.com/itspriddle/gh-prq
gh-extension
Last synced: 10 months ago
JSON representation
Open GitHub Pull Requests with your $EDITOR
- Host: GitHub
- URL: https://github.com/itspriddle/gh-prq
- Owner: itspriddle
- License: mit
- Created: 2023-03-18T04:39:58.000Z (about 3 years ago)
- Default Branch: master
- Last Pushed: 2025-03-09T06:14:38.000Z (over 1 year ago)
- Last Synced: 2025-03-29T22:16:52.137Z (about 1 year ago)
- Topics: gh-extension
- Language: Shell
- Homepage:
- Size: 27.3 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# gh-prq
Open GitHub Pull Requests with your `$EDITOR` (like `hub pull-request`).
## Installation
First, install `gh` from (`brew
install gh` on a Mac using Homebrew).
Install gh-prq via `gh extension install`:
```sh
gh extension install itspriddle/gh-prq
```
## Usage
When you're ready to submit a new Pull Request:
```sh
cd project
gh prq
```
Behind the scenes, `gh prq` uses `gh pr create --editor -H BRANCH
--fill-first`. This opens your `$EDITOR` using the contents of the current
branch's first commit message as the Pull Request title. If there's a
`.github/pull_request_template.md` file at the root of the repository, its
contents will be added as the `--body` argument, ready to edit in your
`$EDITOR`.
Pass `--copy` to copy the Pull Request URL to your clipboard.
Pass `--open` to open the Pull Request in your web browser.
Pass `--push` to push your branch upstream first.
Configure a `git prq` alias:
```sh
git config --global --add alias.prq '!gh prq --copy --open --push'
```
## Editor Examples
By default, `gh prq` will use the same editor that `gh pr create --editor`
would use. `gh` determines that by checking for one of:
- `gh config editor`
- `$GIT_EDITOR`
- `git config core.editor`
- `$EDITOR`
If you want to configure one, `gh config set editor ` is your best
bet. Run one of the following:
Vim:
```sh
gh config set editor vim
```
MacVim:
```sh
gh config set editor mvim
```
Emacs:
```sh
gh config set editor emacs
```
VSCode:
```sh
gh config set editor "code --wait"
```
Sublime Text:
```sh
gh config set editor "subl --wait"
```
## Bug Reports
Issues can be reported on GitHub:
## License
MIT License - see [`LICENSE`](./LICENSE) in this repository.