linear-cli 0.3.5 → 0.3.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/linear/cli/version.rb +1 -1
- data/lib/linear/commands/issue/list.rb +5 -2
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5e03219a11f43a3e19a52634daa643b177be7a473750feced88ab50e6cf81c94
|
4
|
+
data.tar.gz: c3d9379842883bac0db022fa88f466402585735a1d7eed5fdaddc5f09c1cf803
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: caafef161a97eb9ac34cfbc1fe792bb2d34cf996474d03437fc361ad6b390b4deadc88c782e874b81fc2145c50964be376203eb4ebf77a5b0d73bf4b0956c682
|
7
|
+
data.tar.gz: 481f7c72a9569d713e5eaaae72c5de3e77220178fb7f424cdd89c6db99d5bae728fb9487ae5658467d2e7d6d4db92a74ec5c40342bec7aaec55d6177d971b2e2
|
data/lib/linear/cli/version.rb
CHANGED
@@ -16,18 +16,21 @@ module Rubyists
|
|
16
16
|
include SemanticLogger::Loggable
|
17
17
|
include Rubyists::Linear::CLI::CommonOptions
|
18
18
|
|
19
|
+
argument :ids, type: :array, default: [], desc: 'Issue IDs to list'
|
19
20
|
option :mine, type: :boolean, default: true, desc: 'Only show my issues'
|
20
21
|
option :unassigned, aliases: ['-u'], type: :boolean, default: false, desc: 'Show unassigned issues only'
|
21
22
|
option :full, type: :boolean, aliases: ['-f'], default: false, desc: 'Show full issue details'
|
22
23
|
|
23
|
-
def call(**options)
|
24
|
+
def call(ids:, **options)
|
24
25
|
logger.debug 'Listing issues'
|
26
|
+
return display(issues_for(options), options) if ids.empty?
|
25
27
|
|
26
|
-
display issues_for(options), options
|
28
|
+
display issues_for(options.merge(ids:)), options
|
27
29
|
end
|
28
30
|
|
29
31
|
def issues_for(options)
|
30
32
|
logger.debug('Fetching issues', options:)
|
33
|
+
return options[:ids].map { |id| Rubyists::Linear::Issue.find(id) } if options[:ids]
|
31
34
|
return Rubyists::Linear::Issue.all(filter: { assignee: { null: true } }) if options[:unassigned]
|
32
35
|
return Rubyists::Linear::User.me.issues if options[:mine]
|
33
36
|
|