Skip to content

Instantly share code, notes, and snippets.

@jimbojsb
Created January 23, 2012 20:20
Delete resolved jira ticket branches
#!/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
@pascaldls
Copy link

pascaldls commented Aug 2, 2018

Hi,
Where should this code be used
Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment