From f610f865f1dd92f0408c12d9a97590f5f9892744 Mon Sep 17 00:00:00 2001 From: Chris Day Date: Mon, 7 Mar 2022 08:48:31 -0800 Subject: [PATCH] Include merge-requests in RESERVED_REFS_NAMES When importing a project currently we delete the merge-request refs, but for an in-progress MR we want to keep these. Looking at the history of the reserved ref names, in the initial commit to the cleanup service, 5f811894, merge-requests was included in the list, but in 081e2fce we transferred the list to the repository model and inadvertently duplicated environments and left out merge-requests. We fixed the duplicate environment entry with ba6d3fcb, but never re-added merge-requests. This commit re-adds merge-requests to the reserved reference list. No additional tests added because the existing tests already validate that all reference types in RESERVED_REFS_NAMES are not removed. Changelog: fixed --- app/models/repository.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/app/models/repository.rb b/app/models/repository.rb index be8e530c6507a9..e0b1901d188f3c 100644 --- a/app/models/repository.rb +++ b/app/models/repository.rb @@ -15,6 +15,7 @@ class Repository heads tags replace + #{REF_MERGE_REQUEST} #{REF_ENVIRONMENTS} #{REF_KEEP_AROUND} #{REF_PIPELINES} -- GitLab