Skip to content

Instantly share code, notes, and snippets.

@9ete
Created May 5, 2025 18:28
Show Gist options
  • Save 9ete/982d54502a97e1bc871ff8c756d03943 to your computer and use it in GitHub Desktop.
Save 9ete/982d54502a97e1bc871ff8c756d03943 to your computer and use it in GitHub Desktop.
# requires gh cli
git config --global alias.pr '!f() { \
DRAFT=""; \
while getopts "d" opt; do \
case "$opt" in \
d) DRAFT="--draft" ;; \
esac \
done; \
shift $((OPTIND -1)); \
BASE="${1:-develop}"; \
REVIEWER="${2:-null}"; \
gh pr create -f -B "$BASE" -a "@me" -r "$REVIEWER" $DRAFT; \
}; f'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment