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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8c34c38abfb06374e7dc3b2e502de3e5dd401878751e08cdb4b273cbeaf8591c
4
- data.tar.gz: b6328447b86b5806ffa7f223875311c1204aee098f2fcb5ccca1efce3a483de2
3
+ metadata.gz: 4c853adc8c1d858bddef31b2647734187a94e36c48fe94acb177b8cbb0b30da7
4
+ data.tar.gz: ccbae6127fcfbf95abcb8cc038e65a506bd7637cfe4cd5436b991a2a32bc7a6e
5
5
  SHA512:
6
- metadata.gz: aebb8606d432369a6fce8fe4691e612f13c677c7b8ee5558d30c146799235ffc1a5c1dfe8077f402c53790eb1af27ce16c58baad56c7e83daaeb65a5ff4d61d6
7
- data.tar.gz: d15ce96dffe4dc70cdf513a7c3a9b17f3c71894c89c09b39f671554cbb090434425d785b4f877e6930b1874c9af0b35305fa05e38b6f4ed1fe68e25991a8b6ad
6
+ metadata.gz: 9ae716c50031fc39fcfbec55d38a49ce1b2b97268e40713e142d0aca7e0cd6275c65ac7fefa454f102f07fca096ddb41d797572ea71f20e8d36badf1f091ae93
7
+ data.tar.gz: 869e7cc8bf5d3a23356dea49e85eb4014a0c2d465e0f00382f349dac4533e89a9cac241c4537d70845fa406e996fd70110f63afa4e0cd98ece38bbe69c5b9059
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- hubmerge (0.0.11)
4
+ hubmerge (0.0.12)
5
5
  octokit (~> 4.0)
6
6
  tty-prompt (~> 0.18)
7
7
  tty-spinner (~> 0.9)
@@ -1,3 +1,3 @@
1
1
  module HubMerge
2
- VERSION = "0.0.11"
2
+ VERSION = "0.0.12"
3
3
  end
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
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hubmerge
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.11
4
+ version: 0.0.12
5
5
  platform: ruby
6
6
  authors:
7
7
  - Paul Kuruvilla