Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
#!/usr/bin/env bash
# Usage: ./extract-jira-issues.sh <git revision/tag/branch> <git revision/tag/branch>
START_REV=$1
END_REV=$2
JIRA_STATUSES="Done,\"Ready for QA\""
JIRA_URL="https://my-jira-url.atlassian.net"
ISSUES=$(
git log ${START_REV}..${END_REV} --pretty=oneline |
perl -ne '{ /(\w+)-(\d+)/ && print "$1-$2\n" }' |
sort | uniq | xargs |
sed -e 's/ /%2C/g'
)
echo "${JIRA_URL}/issues/?jql=issue in (${ISSUES}) and status in (${JIRA_STATUSES})" | sed -e 's/ /%20/g'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.