[After %15.2] Remove wip/unwip from app/services/merge_requests/base_service.rb handle_draft_event
This is a follow up to #363403 (closed) and !89271 (merged) to be worked on after %15.2!
In !89271 (merged), we updated MergeRequests::BaseService#handle_draft_event to accept wip
/unwip
and draft
/ready
as internal draft event states. This should ensure a smooth transition from the former event states wip
/unwip
to the more recent draft
/ready
states, as the states are used in frontend JavaScript app/assets/javascripts/merge_request.js.
As discussed in !89271 (merged), after %15.2, we can remove the former event states wip
/unwip
from [MergeRequests::BaseService#handle_draft_event](app/services/merge_requests/base_service.rb#L134] and the accompanying code comment (while keeping event states draft
/ready
).
Implementation Guide
After %15.2:
- Open app/services/merge_requests/base_service.rb
- Navigate to method MergeRequests::BaseService#handle_draft_event
- Remove line
when 'wip' then MergeRequest.draft_title(title)
- Remove line
when 'unwip' then MergeRequest.draftless_title(title)
- Remove comment lines
Supports both wip and draft permutations of draft_event.
,This support can be removed >= %15.2
Edited by Daniel Schömer