Skip to content

Instantly share code, notes, and snippets.

@jimbojsb
Created January 23, 2012 20:20
Show Gist options
  • Select an option

  • Save jimbojsb/1665345 to your computer and use it in GitHub Desktop.

Select an option

Save jimbojsb/1665345 to your computer and use it in GitHub Desktop.
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

pascaldls commented Aug 2, 2018 •

Copy link
Copy Markdown

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