hubmerge 0.0.4 → 0.0.5

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: 55737cf494265c5702e9643b8a61f5cdb263c3397e291c6e2a62b7928a075513
4
- data.tar.gz: 1db2d7c3003a7fab2c590e5a6d1e664e0d588e144e99c9457ce5968f026e9dbd
3
+ metadata.gz: 290a97c12478f1bebd232d212a558d95ac28f46ef9e363368e05c6926eb9c02f
4
+ data.tar.gz: 2bd11b8b3745d210243e26e22fb66b64f45f56aafb4f5e427f704df9fa16f44c
5
5
  SHA512:
6
- metadata.gz: 421109e14a81bd8e10e531827c27cda86379308cc20e96ec9c99dd38eaf92e0d149b9dc8d764c713bfc21963a2bde0d4a193a3064ff59c32428f2a3d8d685b95
7
- data.tar.gz: 6a82cbf9d4443a9baa5f4303f7a15ffb7134ec61de784debefc03bc29c82cc5686729001f7b6bfe9b74243632647fdcf5371b0f7f325aa69e816794047374dd9
6
+ metadata.gz: a0e883bea5eadc3a74b919572b2688aea2fc1e4a6915ad4a9f890c3125837ce877161471ac0e5661ef0bf92785bfcb71150b7253b20a787152f5efceaed7f8b7
7
+ data.tar.gz: 1d5c3241c74bfd0046d4cc37eaa3b0440ef3d638486695ca3ff86e7e92e5aee7124c2650e162ef4d134423cda6723c1174506fb3806dfbf0ce6a722c81ac9f2d
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- hubmerge (0.0.4)
4
+ hubmerge (0.0.5)
5
5
  octokit (~> 4.0)
6
6
  tty-prompt (~> 0.18)
7
7
  tty-spinner (~> 0.9)
@@ -26,7 +26,7 @@ module HubMerge
26
26
  def self.pull_requests_to_merge(pull_requests)
27
27
  choices = pull_requests.map { |pr|
28
28
  {
29
- name: "##{pr.number} - #{pr.title}",
29
+ name: "#{self.repo_from_pr(pr)}##{pr.number} - #{pr.title}",
30
30
  value: pr,
31
31
  }
32
32
  }
@@ -40,6 +40,12 @@ module HubMerge
40
40
  )
41
41
  end
42
42
 
43
+ def self.repo_from_pr(pr)
44
+ # GitHub doesn't return a full repository name in the response, only way
45
+ # to avoid an extra API call is to parse the `repository_url` string
46
+ pr.repository_url.sub("https://api.github.com/repos/", "")
47
+ end
48
+
43
49
  def self.say(text)
44
50
  puts text
45
51
  end
@@ -1,3 +1,3 @@
1
1
  module HubMerge
2
- VERSION = "0.0.4"
2
+ VERSION = "0.0.5"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hubmerge
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Paul Kuruvilla
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-04-26 00:00:00.000000000 Z
11
+ date: 2019-05-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler