Skip to content

Instantly share code, notes, and snippets.

@Fernan2
Created April 17, 2014 15:16
Show Gist options
  • Save Fernan2/10991198 to your computer and use it in GitHub Desktop.
Save Fernan2/10991198 to your computer and use it in GitHub Desktop.
environment = ARGV.first
unless environment
puts 'Usage: ruby ask_ey.rb [EY_ENVIRONMENT]'
puts ''
puts 'You could try:'
puts ''
puts ' ruby ask_ey.rb Rankia003_Large'
puts ''
exit
end
message_resolved_ref = `ey status -e #{ environment } | grep Resolved`
hash_deployed = message_resolved_ref.split.last
puts "SHA1 deployed: #{ hash_deployed }"
puts ''
puts 'Migrations'
puts `git diff #{hash_deployed}..master --name-only | grep db/migrate`
puts ''
puts 'Tasks'
puts `git diff #{hash_deployed}..master --name-only | grep lib/tasks`
puts ''
puts 'Pull Requests'
puts `git log #{hash_deployed}..master --merges --oneline | grep "Merge pull request"`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment