export-pull-requests 0.2.2 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Changes +7 -0
- data/README.md +8 -1
- data/bin/epr +22 -3
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 016a62a2e3de917954ac3d80513c491938d48b50
|
4
|
+
data.tar.gz: 9ae66c248e9221b8cc00abdcdf34caf66ba72e0c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0fff380fb343736b01c1af4ff0e77fb788d6eaa76f3f59ddc9be2da0074ebfe66d296aca68d8c178f0e24bcf2143c04d3cb99e97d7cd68c0517fe49b498bd050
|
7
|
+
data.tar.gz: fcdb405a3e51b4210019c9a9c343d173f5d72823968ecdc9a860ff6e32b882f868300e9aaef8a677592904c0ecbd7ff2da5b05a136ab6079d54f7e0c766af950
|
data/Changes
CHANGED
@@ -1,3 +1,10 @@
|
|
1
|
+
--------------------
|
2
|
+
v0.3.0 2019-01-10
|
3
|
+
--------------------
|
4
|
+
Enhancements:
|
5
|
+
* Add support for filtering on milestones and labels (GitHub only)
|
6
|
+
* Add support for filtering on assignees (GitHub only, thanks Caroline Boyden)
|
7
|
+
|
1
8
|
--------------------
|
2
9
|
v0.2.2 2018-11-30
|
3
10
|
--------------------
|
data/README.md
CHANGED
@@ -16,10 +16,13 @@ This installs the `epr` executable.
|
|
16
16
|
|
17
17
|
## Usage
|
18
18
|
|
19
|
-
usage: epr [
|
19
|
+
usage: epr [options] user/repo1 [user/repo2...]
|
20
20
|
-b, --body Include the issue/pr body description in the output (GitHub only)
|
21
21
|
-c, --creator=USER1,USER2,... Export PRs created by given username(s); prepend `!' to exclude user
|
22
22
|
-e, --endpoint=URL Endpoint URL for 'enterprise', etc... repositories
|
23
|
+
-m, --milestone=WHAT Export items assigned to the given milestone (GitHub only)
|
24
|
+
-a, --assignee=USER Export items assigned to the given user (GitHub only)
|
25
|
+
-l, --labels=LABEL(S) Export items with the given label(s) (GitHub only)
|
23
26
|
-h, --help Show this message
|
24
27
|
-p, --provider=NAME Service provider: bitbucket, github, or gitlab; defaults to github
|
25
28
|
-s, --state=STATE Export items in the given state, defaults to open
|
@@ -76,6 +79,10 @@ Authentication can be done via a [personal access token](https://gitlab.com/prof
|
|
76
79
|
|
77
80
|
Enterprise editions of GitLab have an [issue export feature](https://docs.gitlab.com/ee/user/project/issues/csv_export.html).
|
78
81
|
|
82
|
+
## See Also
|
83
|
+
|
84
|
+
- [Batch Labels](https://github.com/sshaw/batchlabels) - Add/remove labels in batches to/from GitHub issues and pull requests.
|
85
|
+
|
79
86
|
## Author
|
80
87
|
|
81
88
|
Skye Shaw [skye.shaw AT gmail]
|
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.
|
12
|
+
VERSION = "0.3.0"
|
13
13
|
SERVICES = %w[github gitlab bitbucket]
|
14
14
|
GIT_CONFIGS = %w[epr.token github.oauth-token]
|
15
15
|
|
@@ -138,7 +138,13 @@ def github(user, repo)
|
|
138
138
|
options[:endpoint] = $endpoint if $endpoint
|
139
139
|
|
140
140
|
$gh ||= Github.new(options)
|
141
|
-
$gh.public_send(method).list(:user => user,
|
141
|
+
$gh.public_send(method).list(:user => user,
|
142
|
+
:repo => repo,
|
143
|
+
:state => $filter,
|
144
|
+
:milestone => $milestone,
|
145
|
+
:assignee => $assignee,
|
146
|
+
:labels => $labels).each_page do |page|
|
147
|
+
|
142
148
|
next if page.size.zero? # Needed for auto_pagination
|
143
149
|
|
144
150
|
page.each do |item|
|
@@ -239,13 +245,14 @@ $exclude_users = []
|
|
239
245
|
$include_users = []
|
240
246
|
$export = "all"
|
241
247
|
$endpoint = nil
|
248
|
+
$milestone = $labels = $assignee = nil
|
242
249
|
$filter = "open"
|
243
250
|
$provider = ENV["EPR_SERVICE"] || SERVICES[0]
|
244
251
|
$token = lookup_token
|
245
252
|
$body = false
|
246
253
|
|
247
254
|
parser = OptionParser.new do |opts|
|
248
|
-
opts.banner = "usage: #{File.basename($0)} [
|
255
|
+
opts.banner = "usage: #{File.basename($0)} [options] user/repo1 [user/repo2...]"
|
249
256
|
|
250
257
|
opts.on "-b", "--body", "Include the issue/pr body description in the output (GitHub only)" do
|
251
258
|
$body = true
|
@@ -260,6 +267,18 @@ parser = OptionParser.new do |opts|
|
|
260
267
|
$endpoint = url
|
261
268
|
end
|
262
269
|
|
270
|
+
opts.on "-m", "--milestone=WHAT", "Export items assigned to the given milestone (GitHub only)" do |m|
|
271
|
+
$milestone = m
|
272
|
+
end
|
273
|
+
|
274
|
+
opts.on "-a", "--assignee=USER", "Export items assigned to the given user (GitHub only)" do |a|
|
275
|
+
$assignee = a
|
276
|
+
end
|
277
|
+
|
278
|
+
opts.on "-l", "--labels=LABEL(S)", "Export items with the given label(s) (GitHub only)" do |l|
|
279
|
+
$labels = l
|
280
|
+
end
|
281
|
+
|
263
282
|
opts.on "-h", "--help", "Show this message" do
|
264
283
|
puts opts
|
265
284
|
exit
|
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.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Skye Shaw
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2019-01-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: github_api
|