zz-export-pull-requests 0.3.6 → 0.3.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/bin/epr +8 -3
  3. metadata +4 -4
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1bcbc5858a831bb7f50953a659eea6800e843aad238205d1f1bdd4ca45e2deb7
4
- data.tar.gz: 93469b0eaa9bf4791779906e2dc6aecd4aa29d5956769ee5181430b9ee6014a6
3
+ metadata.gz: be7b000b9a74af6fdd565e31d64fd3f2b052e369578dbcd01876c8bf4cc88a4f
4
+ data.tar.gz: 178f6ca624aa7403a60dc1281bdb933215656e6ce57d29f2367e7d25e9de287d
5
5
  SHA512:
6
- metadata.gz: 5e37eff10c88699a30e532c9b39d807c1187c6474922055b673d307b58543752652ddf6cd6d30dac1dcda0f56f332296b79651921b41aa79250290c8311150fd
7
- data.tar.gz: 99b821c8ca3c1d5812ed8c207d1ec0707565a380dcfa6cd53870aac3feb5ec10535f528a19ed5f8efeb819208229ce58872c678fb96ffa7d9cbd3aca959a5283
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.6"
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.6
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-17 00:00:00.000000000 Z
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.8
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.8
54
+ version: 0.1.11
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: rake
57
57
  requirement: !ruby/object:Gem::Requirement