Skip to content

Refactor merge train position to use car index/count

Problem

In the query ee/app/assets/javascripts/vue_merge_request_widget/queries/states/merge_train_position.fragment.graphql we use the field merge_train_index and merge_trains_count directly on the merge request type.

Solution

We now have a merge_train_car field, where the index/count would make more sense to live. We should add those fields in the issue #473241 (closed)

After those fields are added then we can refactor the query ee/app/assets/javascripts/vue_merge_request_widget/queries/states/merge_train_position.fragment.graphql and the related component ee/app/assets/javascripts/vue_merge_request_widget/components/merge_train_position_indicator.vue. As well as any other instances where the fields are used.

Edited by Payton Burdette