Skip to content
Snippets Groups Projects
Unverified Commit 43b0dddf authored by Zeger-Jan van de Weg's avatar Zeger-Jan van de Weg
Browse files

Fix enviroments seeding on certain branch names

Bit of a cryptic commit title, but our seeding will try to guard against
branchnames being anything but alphanumerical. These charachters we gsub
away but can't have an empty string as replacement.

This change is less efficient, but given that the number of seeded MRs
per project is very limited, this should be ok.
parent 91a3a4b5
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -28,7 +28,11 @@ class Gitlab::Seeder::Environments
end
 
def create_merge_request_review_deployments!
@project.merge_requests.sample(4).map do |merge_request|
@project
.merge_requests
.select { |mr| mr.source_branch.match(/\p{Alnum}+/) }
.sample(4)
.each do |merge_request|
next unless merge_request.diff_head_sha
 
create_deployment!(
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment