Skip to content

Instantly share code, notes, and snippets.

@chsh
Created October 11, 2013 03:35
Show Gist options
  • Save chsh/6929213 to your computer and use it in GitHub Desktop.
Save chsh/6929213 to your computer and use it in GitHub Desktop.
Open Pivotal Tracker url from feature/nnnnnnn.
#!/usr/bin/env ruby
branch = `git rev-parse --abbrev-ref HEAD`.chomp
if branch =~ /^feature\/(\d+)$/
url = "http://www.pivotaltracker.com/story/show/#{$1}"
puts "Open #{url}"
exec "open #{url}"
else
puts "Ignore. Tracker branch should be feature/nnnnnnn."
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment