Skip to content

Link squashed MRs to deployments

Tiger Watson requested to merge 461036-link-squash-commits-to-deployments into master

What does this MR do and why?

When a new deployment is created, link merge requests with a squash commit that used a fast-forward merge. These were previously not linked.

Query

This is the same query that currently runs for linking MRs by merge commit #link_merge_requests_by_merge_commits, except we look for squash_commit_sha instead of merge_commit_sha (which is indexed in the same way).

https://console.postgres.ai/gitlab/gitlab-production-main/sessions/28247/commands/88170

How to set up and validate locally

See replication steps in #461036 (closed). In the final step when checking linked MRs, all MRs should be listed (including those that were squashed).

Related to #461036 (closed)

Edited by Tiger Watson

Merge request reports