Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
executable file 9 lines (8 sloc) 375 Bytes
#!/usr/bin/env ruby
commit = `git log -1 --format=format:%H`.chomp
if commit.chars.each_slice(20).map{ |part| part.inject(0){ |sum, ch| sum + ch.hex } }.uniq.count == 1
puts '**************************************'
puts '* Congratulations! Lucky commit! *'
puts '**************************************'
system "twitter tweet \"Yay! Lucky commit! #{commit}\""
end
You can’t perform that action at this time.