git_pr 0.0.14.beta5 → 0.0.14.beta6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/git-pr +5 -5
- data/lib/git_pr/github.rb +1 -1
- data/lib/git_pr/merge.rb +1 -0
- data/lib/git_pr/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cb208f68843fc8f6d4c49dd94d21c0f0c578f3cd
|
4
|
+
data.tar.gz: d3da8529e1b679bd2f332d8951982e8518247783
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b97805df16a6150b8012077a130cea578d2bc82fdf98a3e88c8947a923f37032edf9301e724afbba28ef8f6fabf11bf51ae017648a3a8b8294947ce7457b666a
|
7
|
+
data.tar.gz: b674b6cf148703f32a5f38fc0a05494f20d6b9a7c8edefba571e97550502f1a7d55d6453997e3f9e565f7af2c88a412aeebf41f43cce309b09cf9436324c197e
|
data/bin/git-pr
CHANGED
@@ -256,7 +256,7 @@ when "merge"
|
|
256
256
|
when "list"
|
257
257
|
pulls = Octokit.pulls("#{github_project}").map { |p| GitPr::PullRequest.new(p) }
|
258
258
|
if options.list.user
|
259
|
-
pulls = pulls.select { |p| p
|
259
|
+
pulls = pulls.select { |p| p.user.login == options.list.user }
|
260
260
|
end
|
261
261
|
include_status = false
|
262
262
|
if options.list.to_h.has_key?(:status)
|
@@ -343,11 +343,11 @@ when "diff", "difftool"
|
|
343
343
|
end
|
344
344
|
true
|
345
345
|
end
|
346
|
-
source_remote.fetch unless have_commit_locally git, pull
|
347
|
-
target_remote.fetch unless have_commit_locally git, pull
|
346
|
+
source_remote.fetch unless have_commit_locally git, pull.head.sha
|
347
|
+
target_remote.fetch unless have_commit_locally git, pull.base.sha
|
348
348
|
|
349
|
-
source_branch = pull
|
350
|
-
target_branch = pull
|
349
|
+
source_branch = pull.head.ref
|
350
|
+
target_branch = pull.base.ref
|
351
351
|
merge_base = `git merge-base #{source_remote}/#{source_branch} #{target_remote}/#{target_branch}`.strip!
|
352
352
|
diff_command = "git #{command} #{options[command].additional_arguments.join " "} #{merge_base} #{source_remote}/#{source_branch}".gsub /\s* /, " "
|
353
353
|
puts "Executing #{diff_command}"
|
data/lib/git_pr/github.rb
CHANGED
@@ -148,7 +148,7 @@ module GitPr
|
|
148
148
|
end
|
149
149
|
if pull_request
|
150
150
|
pull_request = pull_request
|
151
|
-
pull = pulls.find { |p| p
|
151
|
+
pull = pulls.find { |p| p.number == pull_request }
|
152
152
|
unless pull
|
153
153
|
puts "Pull request #{pull_request} not found in project '#{github_project}'!".red
|
154
154
|
exit -1
|
data/lib/git_pr/merge.rb
CHANGED
@@ -24,6 +24,7 @@ module GitPr
|
|
24
24
|
max_context = failed_statuses.map { |s| s.context.length }.max
|
25
25
|
puts <<EOS
|
26
26
|
#{"ERROR".red}: One or more status checks have failed on this pull request!
|
27
|
+
You should fix these before merging.
|
27
28
|
|
28
29
|
#{" " * (max_context + 5)}(cmd-double-click to open links)
|
29
30
|
EOS
|
data/lib/git_pr/version.rb
CHANGED