Skip to content

Made Ci::Builds to have same ref as Ci::Pipeline in dev fixtures

What does this MR do?

This MR changes the way development database gets seed. Ci::Builds inserted into development db get the same ref as their parent Ci::Pipeline.

Why was this MR needed?

Imagine a developer starting gdk to contribute. According to documentation, an author of MR should get a Todo when his or her build in the CI pipeline for that MR suddenly failed. An issue here is that an author will not get any Todo for pre-generated projects and MRs. Reason for this is that Gitlab::Seeder::Pipelines creates all the builds with master ref. This is unexpected due to the fact that Ci::Build should have the same ref as Ci::Pipeline (reference). As a result, we could not get an appropriate merge_request at MergeRequests::BaseService because master ref differed from the pre-generated requests sources, and no todos are generated.

This MR fixes the issue and makes pre-generated projects to create todos as expected.

Does this MR meet the acceptance criteria?

Merge request reports