Skip to content

Create PR with labels quickly! No need to manually create a new branch to create PR, everything is automatic.

License

Notifications You must be signed in to change notification settings

guangzhengli/gh-qpr

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 

Repository files navigation

How to use gh qpr to create a pull request with labels quickly

Why create this extension

Recently, I had a requirement to use Git to submit a PR to the remote branch with the same name on GitHub, and also add some labels to the PR.

I needed to manually create a new branch, create a PR, add tags, merge the PR, delete temporary branches, return to the original branch and pull code. It was too cumbersome. So I created this extension to simplify the process.

Use

gh qpr

First, it will create a new branch with rondom uuid name and push it to remote.

Then create a PR with labels and auto merge.

Finally, it will delete the local and origin temporary branch, go back to the original branch and pull the latest code.

The default labels are empty. You can change it by setting the environment variable gh_qpr_labels.

1. Install the gh command

brew install gh

2. Login to GitHub with account

gh auth login

3. Download the gh-qpr extension

gh extension install guangzhengli/gh-qpr

4. Add the shell script environment to your path (Optional)

replace the migration,need review with your labels.

vim ~/.zshrc
export gh_qpr_labels="migration,need review"
source ~/.zshrc

5. How to use

gh qpr

About

Create PR with labels quickly! No need to manually create a new branch to create PR, everything is automatic.

Topics

Resources

License

Stars

Watchers

Forks

Languages