BigW Consortium Gitlab
Add support for cross project references for labels ## Summary Support for cross project references for labels. ## Rationale 1. Cross project label references are currently not supported in GitLab 1. `to_reference` method signature in `Label` model breaks the abstraction introduced in `Referable`. `concerns/referable.rb: def to_reference(_from_project = nil)` Signatures: ``` label.rb: def to_reference(format = :id) commit_range.rb: def to_reference(from_project = nil) commit.rb: def to_reference(from_project = nil) external_issue.rb: def to_reference(_from_project = nil) group.rb: def to_reference(_from_project = nil) issue.rb: def to_reference(from_project = nil) merge_request.rb: def to_reference(from_project = nil) milestone.rb: def to_reference(from_project = nil) project.rb: def to_reference(_from_project = nil) snippet.rb: def to_reference(from_project = nil) user.rb: def to_reference(_from_project = nil) ``` This MR suggests using `def to_reference(from_project = nil, format: :id)` which makes use of keyword arguments and preserves abstract interface. 1. We need support for cross project label references when we want to move issue to another project It may happen that issue description, system notes or comments contain reference to label and this reference will be invalid after moving issue to another project and will not be displayed correctly unless we have support for cross project references. Merge request that needs this feature: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/2831 I think that cross project label references may be useful, (example: `Hey, see our issues for CI in GitLab CE! - gitab-org/gitlab-ce~"CI"`). cc @JobV @DouweM @rspeicher See merge request !2966
Name |
Last commit
|
Last update |
---|---|---|
.. | ||
abstract_reference_filter.rb | Loading commit data... | |
autolink_filter.rb | Loading commit data... | |
commit_range_reference_filter.rb | Loading commit data... | |
commit_reference_filter.rb | Loading commit data... | |
emoji_filter.rb | Loading commit data... | |
external_issue_reference_filter.rb | Loading commit data... | |
external_link_filter.rb | Loading commit data... | |
gollum_tags_filter.rb | Loading commit data... | |
issue_reference_filter.rb | Loading commit data... | |
label_reference_filter.rb | Loading commit data... | |
markdown_filter.rb | Loading commit data... | |
merge_request_reference_filter.rb | Loading commit data... | |
milestone_reference_filter.rb | Loading commit data... | |
redactor_filter.rb | Loading commit data... | |
reference_filter.rb | Loading commit data... | |
reference_gatherer_filter.rb | Loading commit data... | |
relative_link_filter.rb | Loading commit data... | |
sanitization_filter.rb | Loading commit data... | |
snippet_reference_filter.rb | Loading commit data... | |
syntax_highlight_filter.rb | Loading commit data... | |
table_of_contents_filter.rb | Loading commit data... | |
task_list_filter.rb | Loading commit data... | |
upload_link_filter.rb | Loading commit data... | |
user_reference_filter.rb | Loading commit data... | |
yaml_front_matter_filter.rb | Loading commit data... |