Method: LabClient::MergeRequests#add_spent_time
- Defined in:
- lib/labclient/merge_requests/time_stats.rb
#add_spent_time(project_id, merge_request_id, duration) ⇒ Object
60 61 62 63 64 65 66 |
# File 'lib/labclient/merge_requests/time_stats.rb', line 60 def add_spent_time(project_id, merge_request_id, duration) project_id = format_id(project_id) merge_request_id = format_id(merge_request_id) duration = ChronicDuration.output(ChronicDuration.parse(duration.to_s), format: :short) client.request(:post, "projects/#{project_id}/merge_requests/#{merge_request_id}/add_spent_time", body: { duration: duration }) end |