Class: Abt::Providers::Devops::Commands::HarvestTimeEntryData
- Inherits:
-
BaseCommand
show all
- Defined in:
- lib/abt/providers/devops/commands/harvest_time_entry_data.rb
Instance Attribute Summary
Attributes inherited from BaseCommand
#config, #path
Attributes inherited from BaseCommand
#ari, #cli, #flags
Class Method Summary
collapse
Instance Method Summary
collapse
Methods inherited from BaseCommand
#initialize
Methods inherited from BaseCommand
flags, #initialize
Class Method Details
.description ⇒ Object
12
13
14
|
# File 'lib/abt/providers/devops/commands/harvest_time_entry_data.rb', line 12
def self.description
"Print Harvest time entry data for DevOps work item as json. Used by harvest start script."
end
|
.usage ⇒ Object
8
9
10
|
# File 'lib/abt/providers/devops/commands/harvest_time_entry_data.rb', line 8
def self.usage
"abt harvest-time-entry-data devops[:<organization-name>/<project-name>/<board-id>/<work-item-id>]"
end
|
Instance Method Details
16
17
18
19
20
21
22
23
24
25
26
27
28
|
# File 'lib/abt/providers/devops/commands/harvest_time_entry_data.rb', line 16
def perform
require_work_item!
puts Oj.dump(body, mode: :json)
rescue HttpError::NotFoundError
args = [organization_name, project_name, board_id, work_item_id].compact
error_message = [
"Unable to find work item for configuration:",
"devops:#{args.join('/')}"
].join("\n")
abort(error_message)
end
|