Class: Rubyists::Linear::CLI::Issue::Update
- Inherits:
-
Object
- Object
- Rubyists::Linear::CLI::Issue::Update
- Includes:
- CommonOptions, Rubyists::Linear::CLI::Issue, SemanticLogger::Loggable
- Defined in:
- lib/linear/commands/issue/update.rb
Overview
The Update class is a Dry::CLI::Command to update an issue
Constant Summary
Constants included from Rubyists::Linear::CLI::Issue
Constants included from WhatFor
WhatFor::ALLOWED_PR_TYPES, WhatFor::PR_TYPES, WhatFor::PR_TYPE_SELECTIONS
Instance Method Summary collapse
Methods included from Rubyists::Linear::CLI::Issue
#attach_project, #cancel_issue, #close_issue, #create_pr!, #gimme_da_issue!, #issue_comment, #issue_pr, #make_da_issue!, #update_issue
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_for_projects, #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, #project_for, #project_scores, #reason_for, #team_for, #title_for
Methods included from CommonOptions
Instance Method Details
#call(issue_ids:, **options) ⇒ Object
41 42 43 44 45 46 47 48 49 |
# File 'lib/linear/commands/issue/update.rb', line 41 def call(issue_ids:, **) raise SmellsBad, 'No issue IDs provided!' if issue_ids.empty? raise SmellsBad, 'You may only open a PR against a single issue' if [:pr] && issue_ids.size > 1 logger.debug('Updating issues', issue_ids:, options:) Rubyists::Linear::Issue.find_all(issue_ids).each do |issue| update_issue(issue, **) # defined in lib/linear/commands/issue.rb end end |