Review app deployments are linked to merge requests in Deployments::LinkMergeRequestsService

When a review app is deployed, we appear to be creating deployment rows and linking merge requests. This leads to two problems:

  1. We show review app deployments in the widget, which is not super helpful
  2. Other merge requests that (later) include the merge commit will also trigger the linking, so merge request A may end up showing deployments to review apps B, C, D, and E

An example of this is !20947 (merged). When the new widget feature flag (deployment_merge_requests_widget) is enabled, the widget looks like this:

Screenshot_from_2019-12-04_12-28-02

Disabling the flag results in no deployments showing up.

We need to change the linking of deployments so that we don't run it for review app deployments, regardless of the status of said deployments.

Assignee Loading
Time tracking Loading