export-pull-requests 0.3.0 → 0.3.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (5) hide show
  1. checksums.yaml +5 -5
  2. data/Changes +6 -0
  3. data/README.md +3 -3
  4. data/bin/epr +13 -5
  5. metadata +3 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 016a62a2e3de917954ac3d80513c491938d48b50
4
- data.tar.gz: 9ae66c248e9221b8cc00abdcdf34caf66ba72e0c
2
+ SHA256:
3
+ metadata.gz: aa3cfb134a324a1a09daa690b431a5092b2265c757fadaecd0f87bc0275fcddb
4
+ data.tar.gz: 3e85340c807d3a9f8a9a07a11d707f171d19d0322e67f741badc84cdca3806ee
5
5
  SHA512:
6
- metadata.gz: 0fff380fb343736b01c1af4ff0e77fb788d6eaa76f3f59ddc9be2da0074ebfe66d296aca68d8c178f0e24bcf2143c04d3cb99e97d7cd68c0517fe49b498bd050
7
- data.tar.gz: fcdb405a3e51b4210019c9a9c343d173f5d72823968ecdc9a860ff6e32b882f868300e9aaef8a677592904c0ecbd7ff2da5b05a136ab6079d54f7e0c766af950
6
+ metadata.gz: f92e17537078e7f6d7a160c44ad1144538fb999c0eb2689d15801f81f498eeeb8305031d378ffce99821aa48dafdae5e4a74fa7c03efc060ad19ec2d38d1aa33
7
+ data.tar.gz: cbe3d1a3ef7a14fd40192ce1574fba71ad2d3f7076d67a652c4b6c9ab0dd0c2321abae4ef20b9ff79460ca40922fce540e48363c08b5728c75fc8e4a597948df
data/Changes CHANGED
@@ -1,3 +1,9 @@
1
+ --------------------
2
+ v0.3.1 2019-01-28
3
+ --------------------
4
+ Enhancements:
5
+ * Add support for filtering on milestones and labels to GitLab
6
+
1
7
  --------------------
2
8
  v0.3.0 2019-01-10
3
9
  --------------------
data/README.md CHANGED
@@ -20,9 +20,9 @@ This installs the `epr` executable.
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
+ -m, --milestone=WHAT Export items assigned to the given milestone (GitHub/GitLab only)
24
+ -a, --assignee=USER Export items assigned to the given user (GitHub/GitLab only)
25
+ -l, --labels=LABEL(S) Export items with the given label(s) (GitHub/GitLab only)
26
26
  -h, --help Show this message
27
27
  -p, --provider=NAME Service provider: bitbucket, github, or gitlab; defaults to github
28
28
  -s, --state=STATE Export items in the given state, defaults to open
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.0"
12
+ VERSION = "0.3.1"
13
13
  SERVICES = %w[github gitlab bitbucket]
14
14
  GIT_CONFIGS = %w[epr.token github.oauth-token]
15
15
 
@@ -190,10 +190,18 @@ def gitlab(user, repo)
190
190
 
191
191
  # Do we care about this differing in output?
192
192
  state = $filter == "open" ? "opened" : $filter
193
+ options = {
194
+ :milestone => $milestone,
195
+ :labels => $labels,
196
+ :state => state
197
+ }
198
+
199
+ # If assignee_id is nil an error is raised
200
+ options[:assignee_id] = $assignee if $assignee
193
201
 
194
202
  $gitlab ||= Gitlab.client(:auth_token => $token, :endpoint => $endpoint || "https://gitlab.com/api/v4")
195
203
  methods.each do |method|
196
- $gitlab.public_send(method, "#{user}/#{repo}", :state => state).auto_paginate do |item|
204
+ $gitlab.public_send(method, "#{user}/#{repo}", options).auto_paginate do |item|
197
205
  next if skip_user?(item.author.username)
198
206
 
199
207
  rows << [
@@ -267,15 +275,15 @@ parser = OptionParser.new do |opts|
267
275
  $endpoint = url
268
276
  end
269
277
 
270
- opts.on "-m", "--milestone=WHAT", "Export items assigned to the given milestone (GitHub only)" do |m|
278
+ opts.on "-m", "--milestone=WHAT", "Export items assigned to the given milestone (GitHub/GitLab only)" do |m|
271
279
  $milestone = m
272
280
  end
273
281
 
274
- opts.on "-a", "--assignee=USER", "Export items assigned to the given user (GitHub only)" do |a|
282
+ opts.on "-a", "--assignee=USER", "Export items assigned to the given user (GitHub/GitLab only)" do |a|
275
283
  $assignee = a
276
284
  end
277
285
 
278
- opts.on "-l", "--labels=LABEL(S)", "Export items with the given label(s) (GitHub only)" do |l|
286
+ opts.on "-l", "--labels=LABEL(S)", "Export items with the given label(s) (GitHub/GitLab only)" do |l|
279
287
  $labels = l
280
288
  end
281
289
 
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.0
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Skye Shaw
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-01-10 00:00:00.000000000 Z
11
+ date: 2019-01-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: github_api
@@ -99,7 +99,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
99
99
  version: '0'
100
100
  requirements: []
101
101
  rubyforge_project:
102
- rubygems_version: 2.6.14
102
+ rubygems_version: 2.7.3
103
103
  signing_key:
104
104
  specification_version: 4
105
105
  summary: Export pull requests and issues to a CSV file.