Created
March 27, 2023 19:44
-
-
Save brenogcota/873ddc51a9b389b7bc2e09014d6759ee to your computer and use it in GitHub Desktop.
Create PR with Jira task id
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
function pr(){ | |
repo="${PWD##*/}" | |
branch_name=$(git symbolic-ref -q HEAD) | |
task=$(echo $branch_name | awk -F/ '{print $NF}') | |
message=$(echo $(git log -n 1 --pretty=format:%B)) | |
gh pr create --title "$message" --body "## $message [$task](https://<your-org>.atlassian.net/browse/$task)" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment