Last active
August 24, 2022 19:46
-
-
Save mauriciomutte/f1f8a29fcf44adf0f1405a8cc092c3f3 to your computer and use it in GitHub Desktop.
Generate GH CLI alias to improve productivity
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# open repository in browser | |
gh alias set --shell web \ | |
'gh repo view --web' | |
# get the current branch/PR infos | |
gh alias set --shell prinfo \ | |
'gh pr view --json title,number --template "\"$(printf "#%v"){{.number}}\" \"{{.title}}\""' | |
# create a new PR for DEV and QA branches | |
gh alias set --shell prdevqa \ | |
'gh pr create -a @me -B "release/qa" -b $1 -l "release/qa" -t "[QA] $2" && \ | |
gh pr create -a @me -B "develop" -b $1 -l "develop" -t "[DEV] $2" && \ | |
gh pr list --web' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
❤️