git-daily 0.0.2 → 0.0.3

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
  SHA1:
3
- metadata.gz: 33c7143c4b0caf5b1301db3913c282c45f056da3
4
- data.tar.gz: c68f7e44f3b492f22abc221c92273c5ed5eaccc9
3
+ metadata.gz: 8c990336cfefd9a8641946f49aad32167c3fb0f1
4
+ data.tar.gz: ffb1e6ace7348238c539d6fb5dcd7cd1536a86cd
5
5
  SHA512:
6
- metadata.gz: a4facd683775812ca91846037cc84f43a8c8f7e3bed143a5163d9b926ce1c02246d158bb90695af7604644cc21b6bf866a5fc7a692651e86d4694d714135d5bc
7
- data.tar.gz: 38cce6cace7e9f9e9bc94844e3d1493aaffcea5ddb6ee0017465d5a06ebabe5454af5bb53545d67cc2841b2180a0dc744baabe1b07a68e10d5cdd5f7a2db86c6
6
+ metadata.gz: f162af0467ca37f280b43ca33e8e9f260e6c696d76564164d389abd46ce8fecd5e8efd632c9701f39d12409f0fd08e1f8743d481a5cf7689da6b3d3946ab9ae7
7
+ data.tar.gz: 652ec86f72470ea4c2c7ba46327864c4782a3738272af6ba318eba025230f8cd0603afb07ad424b617432c2c7c8d02d1cd13d72800e57e93003cc0c29bba6b60
@@ -59,6 +59,20 @@ module Git
59
59
  def self.pull_request_url
60
60
  r = `git config gitdaily.pullRequestUrl`
61
61
  r.chomp!
62
+
63
+ return r unless r.empty?
64
+
65
+ remote = self.remote
66
+ if remote
67
+ url_format = "https://github.com/%s/%s/pull/%s"
68
+ github = `git config remote.#{remote}.url`
69
+ github.chomp!
70
+
71
+ github.match(/^git@github\.com:(?<org>.+)\/(?<repo>.+)\.git$/) do |match|
72
+ r = sprintf(url_format, match[:org], match[:repo], "%d")
73
+ end
74
+ end
75
+
62
76
  r.empty? ? nil : r
63
77
  end
64
78
 
@@ -1,5 +1,5 @@
1
1
  module Git
2
2
  module Daily
3
- VERSION = "0.0.2"
3
+ VERSION = "0.0.3"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: git-daily
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Koichiro Ohba
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-02-26 00:00:00.000000000 Z
11
+ date: 2018-02-28 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: 'git-daily on Ruby is a tool which helps you to do daily workflow easier
14
14
  on Git. This is the Ruby version. The original PHP version is here: https://github.com/sotarok/git-daily'