Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
This one is to get current Jira sprint number
# This one is to be executed once to figure out rapidBoardId
#curl -u kagarlickij:Password -X GET -H "Content-Type: application/json" ''
curl -u USER:PASSWORD -X GET -H "Content-Type: application/json" \
'https://JIRA.DOMAIN.NAME/rest/greenhopper/1.0/sprintquery/17?includeFutureSprints=true&includeHistoricSprints=false' \
| /usr/local/bin/jq '.sprints[] | select(.name | contains("PROJECTNAME")) | select(.state == "ACTIVE") | .name' | sed 's/[^0-9]*//g' > currentSprint.txt
echo "Current Sprint number in Jira is $(cat currentSprint.txt)"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment