Skip to content

GLM shorthand reference for projects from the same namespace

Oswaldo Ferreira requested to merge (removed):glm-shorthand-reference into master

What does this MR do?

Explained on #21679 (closed)

Plan

Following the idea that a project can be typed as gitlab-ce and gitlab-org/gitlab-ce, we should change the regex that extracts this project name pattern. Today, we consider <project> regex tag as the whole sentence, while it should consider only gitlab-ce as the reference.

  • Expose namespace and project references separately on Project#reference_pattern
  • Change filters (Banzai::Filters::IssueReferenceFilter, and so on) to accept <namespace> and <project> as separated data
  • Build full project name on the filters in order to search for the project on Project.find_with_namespace
  • Build link texts with the shortest version. gitlab-org/gitlab-ce#1 will have the link text gitlab-ce#1, and gitlab-ce#1 will also have the link text gitlab-ce#1
  • Double-check context, describe, it texts, name patterns and alignments

Does this MR meet the acceptance criteria?

What are the relevant issue numbers?

#21679 (closed)

Merge request reports