Created
October 8, 2018 08:26
-
-
Save kenglxn/baf9617536fd3bca7e4e5ece26d2a355 to your computer and use it in GitHub Desktop.
list_fb_jira_status
This file contains 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
function list_fb_jira_status | |
set issues (ls ~/dev/git/sirius | grep utv-feature-sh- | grep -e '[a-zA-Z]\\+-[0-9]\\+' -o) | |
read -l -P 'jira username? ' username | |
read -l -i -P 'jira password? ' password | |
for issue in $issues | |
set -x json (curl -s -u $username:$password -X GET -H "Content-Type: application/json" "https://jira.sits.no/rest/api/2/issue/$issue?fields=status") | |
set issue_status (python -c 'import os,json;obj=json.loads(os.environ["json"]);status=obj["fields"]["status"]["name"];print status.encode("utf-8");') | |
echo $issue "(https://jira.sits.no/browse/$issue)" status: $issue_status | |
end | |
end |
Author
kenglxn
commented
Oct 8, 2018
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment