hubmerge 0.0.11 → 0.0.12
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/hubmerge/version.rb +1 -1
- data/lib/hubmerge.rb +7 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4c853adc8c1d858bddef31b2647734187a94e36c48fe94acb177b8cbb0b30da7
|
4
|
+
data.tar.gz: ccbae6127fcfbf95abcb8cc038e65a506bd7637cfe4cd5436b991a2a32bc7a6e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9ae716c50031fc39fcfbec55d38a49ce1b2b97268e40713e142d0aca7e0cd6275c65ac7fefa454f102f07fca096ddb41d797572ea71f20e8d36badf1f091ae93
|
7
|
+
data.tar.gz: 869e7cc8bf5d3a23356dea49e85eb4014a0c2d465e0f00382f349dac4533e89a9cac241c4537d70845fa406e996fd70110f63afa4e0cd98ece38bbe69c5b9059
|
data/Gemfile.lock
CHANGED
data/lib/hubmerge/version.rb
CHANGED
data/lib/hubmerge.rb
CHANGED
@@ -56,7 +56,7 @@ module HubMerge
|
|
56
56
|
total = prs_to_merge.count
|
57
57
|
prs_to_merge.each_with_index do |pr, index|
|
58
58
|
mergeable = false
|
59
|
-
@spinner.with_parent("[:spinner] PR ##{pr.number} (#{index + 1}/#{total})") do
|
59
|
+
@spinner.with_parent("[:spinner] PR #{repo_from_pr(pr)}##{pr.number} (#{index + 1}/#{total})") do
|
60
60
|
mergeable = @spinner.with_child("[:spinner] Checking mergeability") {
|
61
61
|
begin
|
62
62
|
@merger.check_mergeability(github_client, pr)
|
@@ -111,5 +111,11 @@ module HubMerge
|
|
111
111
|
def github_client
|
112
112
|
@github_client ||= Octokit::Client.new(access_token: @github_token)
|
113
113
|
end
|
114
|
+
|
115
|
+
def repo_from_pr(pr)
|
116
|
+
# GitHub doesn't return a full repository name in the response, only way
|
117
|
+
# to avoid an extra API call is to parse the `repository_url` string
|
118
|
+
pr.repository_url.sub("https://api.github.com/repos/", "")
|
119
|
+
end
|
114
120
|
end
|
115
121
|
end
|