stable

Clone or download

Read-only

feat: Enhance GitLab cross-references detection

This is part of request #27919 GitLab references are not displayed in the artefact view if located in subgroups When GitLab repositories are in subgroups[1], the matching GitLab references will not be displayed in the cross-reference field of the artifact. From a technical point of view, we have to rework how references will be split and found from the cross-reference keyword and value. This will work well for references automatically stored by the GitLab integration (the one stored by the GitLab webhook parsing). The split of manually added GitLab cross-references will not benefit of this work. The current restrictions still apply on these. [1] https://docs.gitlab.com/ee/user/group/subgroups/ How to test ----------- * Create a GitLab repository located in one or more subgroup * Integrate this GitLab repository in your Tuleap project * Add some artifact references in your GitLab commits, branches, tags, merge requests of this integration => In the artifact view, in the cross-reference field, all the GitLab references must be well displayed. Change-Id: I5c29e7ff6b175e6eea331a59a64576647a2c7564

Modified Files

Name
A plugins/gitlab/include/Reference/Branch/BranchReferenceSplitValuesDao.php +42 −0 Go to diff View file
A plugins/gitlab/include/Reference/Branch/GitlabBranchReferenceSplitValuesBuilder.php +52 −0 Go to diff View file
M plugins/gitlab/include/Reference/GitlabCrossReferenceOrganizer.php +5 −2 Go to diff View file
M plugins/gitlab/include/Reference/GitlabReferenceBuilder.php +7 −10 Go to diff View file
M plugins/gitlab/include/Reference/GitlabReferenceExtractor.php +64 −14 Go to diff View file
A plugins/gitlab/include/Reference/GitlabReferenceSplitValuesBuilder.php +27 −0 Go to diff View file
A plugins/gitlab/include/Reference/GitlabReferenceValueWithoutSeparatorSplitValuesBuilder.php +47 −0 Go to diff View file
A plugins/gitlab/include/Reference/Tag/GitlabTagReferenceSplitValuesBuilder.php +52 −0 Go to diff View file
A plugins/gitlab/include/Reference/Tag/TagReferenceSplitValuesDao.php +42 −0 Go to diff View file
M plugins/gitlab/include/gitlabPlugin.php +28 −2 Go to diff View file
A plugins/gitlab/tests/unit/Reference/Branch/GitlabBranchReferenceSplitValuesBuilderTest.php +67 −0 Go to diff View file
M plugins/gitlab/tests/unit/Reference/GitlabCrossReferenceOrganizerTest.php +99 −2 Go to diff View file
M plugins/gitlab/tests/unit/Reference/GitlabReferenceBuilderTest.php +78 −1 Go to diff View file
D plugins/gitlab/tests/unit/Reference/GitlabReferenceExtractorTest.php +0 −63 Go to diff View file
A plugins/gitlab/tests/unit/Reference/GitlabReferenceValueWithoutSeparatorSplitValuesBuilderTest.php +61 −0 Go to diff View file
A plugins/gitlab/tests/unit/Reference/Tag/GitlabTagReferenceSplitValuesBuilderTest.php +67 −0 Go to diff View file