Last active
April 11, 2023 05:34
-
-
Save zph/9fc03790c0146f4d181bdfc28db8b799 to your computer and use it in GitHub Desktop.
Pull request helper script
This file contains 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
#!/usr/bin/env bash | |
set -eou pipefail | |
main() { | |
local branch_name | |
branch_name="$(git rev-parse --abbrev-ref HEAD)" | |
local base_branch="${1:-master}" | |
\git push origin "$branch_name" | |
hub pull-request -b "$base_branch" | |
} | |
main "$@" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment