1 unstable release
0.1.0 | Nov 30, 2019 |
---|
#19 in #pr
14KB
103 lines
prf (Pull Request Fetch)
I was troubled by fpr
or prf
but I decided to use 'prf' for ease of typing.
Overview
A tool for easily fetching submitted PR into a local repository For example, I tried to get a PR branch locally by typing the following command a while ago.
git fetch upstream pull / 503 / head: random_merge
However, two pieces of information are needed to execute this command. One is the PR number and the second is the branch name. It's a little cumbersome to check and enter this. So I made a tool that can get PR branch locally only with PR number.
Example
Use it like this. Just enter the PR number.
prf 55
Also, by default it gets from origin, but you may want to change the remote. In that case, it is like this.
prf 55 upstream
Installation
Pre-compiled executables
Get them here
using homebrew
brew install k-nasa/tap/prf
using cargo
cargo install prf
Installation of cargo itself.
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
Usage
prf 0.1.0
k-nasa <htilcs1115@gmail.com>
Tool to fetch PR branch to local repository
USAGE:
prf [OPTIONS] <pr_no> [remote]
FLAGS:
-h, --help Prints help information
-V, --version Prints version information
OPTIONS:
-o, --owner <owner> repository owner (By default it uses the local repository's remote url)
-r, --repository <repository> repository name (By default it uses the local repository's remote url)
ARGS:
<pr_no> pull request number fetching to local
<remote> [default: origin]
Contribution
- Fork it ( http://github.com/k-nasa/prf)
- Create your feature branch (git checkout -b my-new-feature)
- Commit your changes (git commit -am 'Add some feature')
- Push to the branch (git push origin my-new-feature)
- Create new Pull Request
Licence
Author
Dependencies
~9–22MB
~300K SLoC