summaryrefslogtreecommitdiff
path: root/lib/banzai
diff options
context:
space:
mode:
authorAdam Niedzielski <adamsunday@gmail.com>2017-04-19 16:38:46 +0200
committerAdam Niedzielski <adamsunday@gmail.com>2017-04-19 16:38:46 +0200
commitde71a4659482aeb38da5e883eeff12b24056871a (patch)
tree55667fd9064ba9a02722c17e20c04f7cf6090989 /lib/banzai
parentbbd83376d625b8d9cb73cbc83c3c0eb71b1abf32 (diff)
downloadgitlab-ce-de71a4659482aeb38da5e883eeff12b24056871a.tar.gz
Display issuable state only in notes and issuable description
Closes #30964
Diffstat (limited to 'lib/banzai')
-rw-r--r--lib/banzai/filter/issuable_state_filter.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/banzai/filter/issuable_state_filter.rb b/lib/banzai/filter/issuable_state_filter.rb
index 0b2b8bd7f4d..1a9d03beb51 100644
--- a/lib/banzai/filter/issuable_state_filter.rb
+++ b/lib/banzai/filter/issuable_state_filter.rb
@@ -9,6 +9,8 @@ module Banzai
VISIBLE_STATES = %w(closed merged).freeze
def call
+ return doc unless context[:issuable_state_filter_enabled]
+
extractor = Banzai::IssuableExtractor.new(project, current_user)
issuables = extractor.extract([doc])