Skip to content

Instantly share code, notes, and snippets.

@gregbell
Forked from pcreux/batch_review.rb
Created November 23, 2011 17:20
Show Gist options
  • Save gregbell/1389267 to your computer and use it in GitHub Desktop.
Save gregbell/1389267 to your computer and use it in GitHub Desktop.
Batch gitmine review a bunch of tickets.
#!/user/env ruby
#
# Batch gitmine review a bunch of tickets.
#
# Usage: ruby batch_review.rb 7585 7603 7623 7640 7663 7665
#
ARGV.each do |issue_id|
system("gitmine checkout #{issue_id} && git pull && git diff master...HEAD")
puts "Merge into master?"
if STDIN.gets.chomp =~ /^y/i
system("gitmine review #{issue_id}")
end
end
#!/bin/bash
for issue_id in $@; do
# gitmine checkout $issue_id && git pull && git diff master...HEAD
echo "Merge into master? (y/n)"
read y_or_n
if [ "$y_or_n" = "y" ]; then
# gitmine review $issue_id
echo $issue_id
fi
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment