Last active
March 3, 2023 16:37
-
-
Save kagarlickij/7a506a27c66203fd077643f6e111a6d7 to your computer and use it in GitHub Desktop.
This one is to get current Jira sprint number
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# This one is to be executed once to figure out rapidBoardId | |
#curl -u kagarlickij:Password -X GET -H "Content-Type: application/json" 'https://kagarlickij.atlassian.net/rest/greenhopper/1.0/rapidviews/list' | |
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
If others would like to use the same thing by vanilla api