Skip to content

Instantly share code, notes, and snippets.

@brenogcota
Created March 27, 2023 19:44
Embed
What would you like to do?
Create PR with Jira task id
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