Created
January 23, 2012 20:20
-
-
Save jimbojsb/1665345 to your computer and use it in GitHub Desktop.
Delete resolved jira ticket branches
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
#!/bin/bash | |
for i in $(git branch | grep "OFR-"); do | |
xml="`wget -qO- http://jira.office.vertive.com/si/jira.issueviews:issue-xml/$i/$i.xml`" | |
closed=`echo $xml | grep ">Closed</status"` | |
strlen=${#closed} | |
if [ ! $strlen == "0" ] | |
then | |
echo "Deleting $i" | |
git branch -D $i | |
fi | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi,
Where should this code be used
Thanks