[go: up one dir, main page]

Skip to content

Expand 'Related Branch' detection

Problem to solve

It will give Gitlab the ability to detect related branches inside subtrees.

This is intended to anyone who's using subtrees to separate different development characteristics.

Ex: Most of the projects where I work at, are using this structure.

image

It would be nice to automatically relate those to an issue like this.

image

Proposal

To accomplish that, I modified this file: https://gitlab.com/gitlab-org/gitlab-ce/blob/master/app/services/issues/related_branches_service.rb#L22

Replacing this branch =~ /\A#{issue.iid}-(?!\d+-stable)/i by branch =~ /\A.*\/*#{issue.iid}-(?!\d+-stable)/i

I haven't notice any weird behaviour inside my Gitlab Instance. If it ok/required I would send a MR with the change

Links / references

Edited by 🤖 GitLab Bot 🤖