export-pull-requests 0.3.4 → 0.3.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Changes +6 -0
- data/bin/epr +24 -6
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9aa3a32a54b67ebcc317255f9575cd1cb92eabef
|
4
|
+
data.tar.gz: e614ed2ff03d1d3571513fe0923bf0162bc45c38
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d584c1f5406cba8733a910513a8079f37d2544cc07656f0484a856d4d38b0121892e9ef49cd809bca61a614ec75f27d2491f1af4a02dad7ac65685224013061a
|
7
|
+
data.tar.gz: 53b26f30445b60c26955e2212396cd069ab262374a50876938f40b7c131d91472bd3aebf43093738428d8181e298a3020b167aac23df7b5018e8dc1768507ce1
|
data/Changes
CHANGED
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.5"
|
13
13
|
SERVICES = %w[github gitlab bitbucket]
|
14
14
|
GIT_CONFIGS = %w[epr.token github.oauth-token]
|
15
15
|
|
@@ -163,10 +163,20 @@ def github(user, repo)
|
|
163
163
|
item.title,
|
164
164
|
item.state,
|
165
165
|
localtime(item.created_at),
|
166
|
-
localtime(item.updated_at)
|
167
|
-
item.html_url,
|
166
|
+
localtime(item.updated_at)
|
168
167
|
]
|
169
168
|
|
169
|
+
# GitHub issues API returns PRs but not their merged_at time. To get that we need to specifically export PRs
|
170
|
+
if item.pull_request && $export != EXPORT_ISSUES
|
171
|
+
rows[-1] << "(use `-x pr` option)"
|
172
|
+
elsif $export != EXPORT_PRS
|
173
|
+
rows[-1] << "N/A"
|
174
|
+
else
|
175
|
+
rows[-1] << (item.merged_at ? localtime(item.merged_at) : nil)
|
176
|
+
end
|
177
|
+
|
178
|
+
rows[-1] << item.html_url
|
179
|
+
|
170
180
|
if $body
|
171
181
|
body = item.body
|
172
182
|
# -3 for "..."
|
@@ -216,9 +226,16 @@ def gitlab(user, repo)
|
|
216
226
|
item.title,
|
217
227
|
item.state,
|
218
228
|
localtime(item.created_at),
|
219
|
-
localtime(item.updated_at)
|
220
|
-
item.web_url
|
229
|
+
localtime(item.updated_at)
|
221
230
|
]
|
231
|
+
|
232
|
+
if method == :issues
|
233
|
+
rows[-1] << "N/A"
|
234
|
+
else
|
235
|
+
rows[-1] << (item.merged_at ? localtime(item.merged_at) : nil)
|
236
|
+
end
|
237
|
+
|
238
|
+
rows[-1] << item.web_url
|
222
239
|
end
|
223
240
|
end
|
224
241
|
|
@@ -227,13 +244,14 @@ end
|
|
227
244
|
|
228
245
|
def export_repos(argv)
|
229
246
|
rows = []
|
230
|
-
rows << %w[Repository Type # User Title State Created Updated URL]
|
247
|
+
rows << %w[Repository Type # User Title State Created Updated Merged URL]
|
231
248
|
rows[-1].insert(4, "Body") if $body
|
232
249
|
|
233
250
|
repos = parse_repos(argv)
|
234
251
|
repos.each do |user, repo|
|
235
252
|
case $provider
|
236
253
|
when "github"
|
254
|
+
abort "milestone filtering can only be used with issues" if $milestone && $export == EXPORT_PRS
|
237
255
|
rows.concat(github(user, repo))
|
238
256
|
when "gitlab"
|
239
257
|
rows.concat(gitlab(user, repo))
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: export-pull-requests
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Skye Shaw
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-03-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: github_api
|
@@ -56,16 +56,16 @@ dependencies:
|
|
56
56
|
name: rake
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
|
-
- - "
|
59
|
+
- - ">="
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version:
|
61
|
+
version: 12.3.3
|
62
62
|
type: :development
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
|
-
- - "
|
66
|
+
- - ">="
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version:
|
68
|
+
version: 12.3.3
|
69
69
|
description: Program to export GitHub, GitLab, or Bitbucket pull requests/merge requests
|
70
70
|
and issues to CSV a file.
|
71
71
|
email: skye.shaw@gmail.com
|