Skip to content

Instantly share code, notes, and snippets.

Created March 27, 2023 19:44
What would you like to do?
Create PR with Jira task id
function pr(){
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>$task)"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment