Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJarka Košanová <jarka@gitlab.com>2018-09-22 11:07:20 +0300
committerJarka Košanová <jarka@gitlab.com>2018-10-04 11:22:00 +0300
commitc0e9eb0eaca198f5ae12d6bd693ddcd705f79369 (patch)
tree5b7f5f0750c6c5d54745cd8e142c5d95e6f3c5d1 /lib/banzai
parent2243e4d4ca4bbd96a05059d463d283d468a3fc57 (diff)
Support short reference to group entities from project entities
- add a direct project parent (group) to Banzai context - if an epic is referenced from a direct descendant -> change epic to_reference to use short reference
Diffstat (limited to 'lib/banzai')
-rw-r--r--lib/banzai/filter/epic_reference_filter.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/banzai/filter/epic_reference_filter.rb b/lib/banzai/filter/epic_reference_filter.rb
index e06e2fb3870..26bcf5c04b4 100644
--- a/lib/banzai/filter/epic_reference_filter.rb
+++ b/lib/banzai/filter/epic_reference_filter.rb
@@ -9,6 +9,12 @@ module Banzai
def self.object_class
Epic
end
+
+ private
+
+ def group
+ context[:group] || context[:project]&.group
+ end
end
end
end