Guest User

Untitled

a guest
Feb 18th, 2018
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.26 KB | None | 0 0
  1. #!/usr/bin/env ruby
  2.  
  3. if match = `git symbolic-ref HEAD 2> /dev/null`.split('/').last.to_s.match(/^(?:t|s)-?(\d+)$/)
  4. message = File.read(ARGV.first)
  5. message.gsub!("STORYID", "[##{ match[1] }]")
  6. File.open(ARGV.first, 'w') do |f|
  7. f.puts(message)
  8. end
  9. end
Add Comment
Please, Sign In to add comment