zz-export-pull-requests 0.3.6 → 0.3.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/epr +8 -3
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: be7b000b9a74af6fdd565e31d64fd3f2b052e369578dbcd01876c8bf4cc88a4f
|
4
|
+
data.tar.gz: 178f6ca624aa7403a60dc1281bdb933215656e6ce57d29f2367e7d25e9de287d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 64c90071b5df93136716ea5b1c5752f2658efe3e14472059dd6f465eef8a65ec5d03c82cb8958d1498e5706f1c079297ae9d9ffb3cb6260ec50f14194648d717
|
7
|
+
data.tar.gz: 666a29249a87ca270e211527c60d8dc1ad557c36d7de14a3f51af97f20f70fdebb16c82648bd5dbe67a22aded505daab198c0407c166ec542c4e6f9808afb74a
|
data/bin/epr
CHANGED
@@ -9,7 +9,7 @@ require "github_api"
|
|
9
9
|
require "gitlab"
|
10
10
|
require "bitbucket_rest_api"
|
11
11
|
|
12
|
-
VERSION = "0.3.
|
12
|
+
VERSION = "0.3.7"
|
13
13
|
SERVICES = %w[github gitlab bitbucket]
|
14
14
|
GIT_CONFIGS = %w[epr.token github.oauth-token]
|
15
15
|
|
@@ -55,6 +55,11 @@ def lookup_token
|
|
55
55
|
end
|
56
56
|
end
|
57
57
|
|
58
|
+
def get_full_hash(user, repo, short_hash)
|
59
|
+
result = $bitbucket.repos.commit.get_one(user, repo, short_hash)
|
60
|
+
return result["hash"]
|
61
|
+
end
|
62
|
+
|
58
63
|
def bitbucket(user, repo)
|
59
64
|
# TODO: make sure no need to translate any states
|
60
65
|
# https://developer.atlassian.com/bitbucket/api/2/reference/resource/repositories/%7Busername%7D/%7Brepo_slug%7D/pullrequests
|
@@ -90,8 +95,8 @@ def bitbucket(user, repo)
|
|
90
95
|
pr["links"].html.href,
|
91
96
|
pr.summary.raw,
|
92
97
|
pr.summary.html,
|
93
|
-
!pr.source.commit.nil? ? pr.source.commit["hash"] : "",
|
94
|
-
!pr.destination.commit.nil? ? pr.destination.commit["hash"] : "",
|
98
|
+
!pr.source.commit.nil? ? get_full_hash(user, repo, pr.source.commit["hash"]) : "",
|
99
|
+
!pr.destination.commit.nil? ? get_full_hash(user, repo, pr.destination.commit["hash"]) : "",
|
95
100
|
!pr.source.branch.nil? ? pr.source.branch.name : "",
|
96
101
|
!pr.destination.branch.nil? ? pr.destination.branch.name : "",
|
97
102
|
!pr.reason.nil? ? pr.reason : "",
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: zz-export-pull-requests
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Zulhilmi Zainudin
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-12-
|
11
|
+
date: 2019-12-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: github_api
|
@@ -44,14 +44,14 @@ dependencies:
|
|
44
44
|
requirements:
|
45
45
|
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: 0.1.
|
47
|
+
version: 0.1.11
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: 0.1.
|
54
|
+
version: 0.1.11
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: rake
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|