-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathlist.rb
More file actions
36 lines (31 loc) · 939 Bytes
/
list.rb
File metadata and controls
36 lines (31 loc) · 939 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# frozen_string_literal: true
require 'semantic_logger'
module Rubyists
# Namespace for Linear
module Linear
M :team, :issue
O 'team/list'
# Namespace for CLI
module CLI
module Team
List = Class.new Dry::CLI::Command
# The List class is a Dry::CLI::Command that lists issues
class List
include SemanticLogger::Loggable
include Rubyists::Linear::CLI::CommonOptions
option :mine, type: :boolean, default: true, desc: 'Only show my issues'
def call(**options)
logger.debug 'Listing teams'
result = Rubyists::Linear::Operations::Team::List.call(params: options)
if result.success?
display result[:teams], options
else
logger.error 'Failed to list teams'
end
end
prepend Rubyists::Linear::CLI::Caller
end
end
end
end
end