Class: Rubyists::Linear::CLI::Issue::List
- Inherits:
-
Object
- Object
- Rubyists::Linear::CLI::Issue::List
- Includes:
- CommonOptions, Projects, SubCommands, SemanticLogger::Loggable
- Defined in:
- lib/linear/commands/issue/list.rb
Overview
The List class is a Dry::CLI::Command that lists issues
Constant Summary
Constants included from WhatFor
WhatFor::ALLOWED_PR_TYPES, WhatFor::PR_TYPES, WhatFor::PR_TYPE_SELECTIONS
Instance Method Summary collapse
Methods included from Projects
#ask_for_projects, #project_for, #project_scores
Methods included from SubCommands
#ask_for_team, #branch_for, #choose_a_team!, #current_branch, #default_branch, #git, included, #prompt, #pull_or_push_new_branch!
Methods included from WhatFor
#ask_or_edit, #cancelled_state_for, #comment_for, #completed_state_for, #description_for, #editor_for, #labels_for, #pr_description_for, #pr_scope_for, #pr_title_for, #pr_type_for, #reason_for, #team_for, #title_for
Methods included from CommonOptions
Instance Method Details
#call(ids:, **options) ⇒ Object
38 39 40 41 42 43 |
# File 'lib/linear/commands/issue/list.rb', line 38 def call(ids:, **) logger.debug 'Listing issues' return display(issues_for(), ) if ids.empty? display issues_for(.merge(ids:)), end |
#filters_for(options) ⇒ Object
45 46 47 48 49 50 51 52 53 54 55 56 57 58 |
# File 'lib/linear/commands/issue/list.rb', line 45 def filters_for() filter = {} filter[:assignee] = { isMe: { eq: true } } if [:mine] filter[:assignee] = { null: true } if [:unassigned] filter[:team] = { key: { eq: [:team] } } if [:team] if [:project] project = project_for([:project]) logger.debug('Found project', project:) filter[:project] = { id: { eq: project.id } } if project end filter end |