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.
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
.
brew install gh
gh auth login
gh extension install guangzhengli/gh-qpr
replace the migration,need review
with your labels.
vim ~/.zshrc
export gh_qpr_labels="migration,need review"
source ~/.zshrc
gh qpr