• Patrick Bajao's avatar
    Add new preparing state · bc5dae9b
    Patrick Bajao authored
    This `preparing` state will be used later on to determine whether
    a merge request is mergeable or not
    (via `MergeRequest#mergeable?`).
    
    We also won't check mergeability when the `merge_status` is set
    to `preparing`.
    
    We set the `merge_status` to `unchecked` in
    `MergeRequests::AfterCreateService` (which is called in
    `NewMergeRequestWorker`) so we can check for mergeability once
    everything's prepared.
    
    Right now, no merge requests will have their `merge_status` to
    `preparing` to keep backwards compatibility and to not result to
    incidents/downtimes on multi-stage deploy (e.g. canary).
    
    The `MergeRequest#mark_as_preparing` will be later called in
    `MergeRequests::CreateService`. This will trigger the behavior
    that we want to achieve with the `preparing` state.
    bc5dae9b
merge_request.rb 59.5 KB