bin/git-merge-pr in git-merge-pr-0.4.0 vs bin/git-merge-pr in git-merge-pr-0.5.0
- old
+ new
@@ -19,10 +19,10 @@
abort "Provide a PR number (no '#' tho)" if ARGV.empty?
pr_num = ARGV.first
remote_name = ENV.fetch("REMOTE_NAME", "origin")
-remotes = Rugged::Repository.new(Rugged::Repository.discover(Dir.pwd)).remotes
+remotes = Rugged::Repository.discover(Dir.pwd).remotes
remote = remotes.find{ |r| r.name.eql?(remote_name) }.url
remote.sub!("git@github.com:", "https://github.com/")
remote.sub!(/\.git$/, "")
client = Octokit::Client.new(netrc: true)