Created
March 18, 2019 10:31
-
-
Save tszumowski/71d06390cf001a8c540bc7b6d5935281 to your computer and use it in GitHub Desktop.
dadjoke bash profile
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
dadjoke () { | |
echo $(curl -s https://icanhazdadjoke.com/) | |
} | |
pr () { | |
# No args: defaults to default reviewers, opens file for edit with template and dad joke | |
# 1 arg: Argument is string of the reviewers to place | |
dj=$(dadjoke) | |
if [ "$#" == "0" ]; then | |
hub pull-request -b <OWNER>:<BRANCH> --reviewer=alice,bob --assign=alice,bob --browse -F <(echo -e "<TITLE>\n\n# What\n* \n\n# Why\n* \n\n# Random Dad Joke\n$(curl -s https://icanhazdadjoke.com/)") --edit | |
elif [ "$#" == "1" ]; then | |
hub pull-request -b <OWNER>:<BRANCH> --reviewer=$1 --assign=$1 --browse -F <(echo -e "<TITLE>\n\n# What\n* \n\n# Why\n* \n\n# Random Dad Joke\n$(curl -s https://icanhazdadjoke.com/)") --edit | |
else | |
echo "Invalid call" | |
fi | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment