Skip to content

Instantly share code, notes, and snippets.

@phroggyy
Created September 24, 2018 12:25
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save phroggyy/2edca26ced0637b550e2e265937cb2bc to your computer and use it in GitHub Desktop.
Save phroggyy/2edca26ced0637b550e2e265937cb2bc to your computer and use it in GitHub Desktop.
git log --pretty='format:%B' master..
| egrep -o "PROJ-[[:digit:]]{1,}"
| sort
| uniq
| xargs -I % sh -c 'curl -u $JIRA_AUTH -H "Content-Type: application/json" https://yourjira.atlassian.net/rest/api/2/issue/%'
| jq -r '[.key, .fields.issuetype.name, .fields.assignee.displayName, .fields.status.name, .fields.summary] | "\(.[0]): (\(.[1]), \(.[3])) \(.[4]) | \(.[2])"'
# output:
#
# PROJ-1234: (Story, Done) The summary of the ticket | Assignee Name
# PROJ-4321: (Bug, Done) The summary of the ticket | Assignee Name
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment