diff options
author | Phil Hughes <me@iamphill.com> | 2018-11-27 15:10:40 +0000 |
---|---|---|
committer | Phil Hughes <me@iamphill.com> | 2018-11-27 15:10:40 +0000 |
commit | 50e21a89a0009813b9f090288b22c64c5cefbd58 (patch) | |
tree | 7a142c12573f872f14ac366ec00082c650664592 /app/controllers | |
parent | 15b4a8f93aaf313b8197ca381f529b00bd231a20 (diff) | |
download | gitlab-ce-50e21a89a0009813b9f090288b22c64c5cefbd58.tar.gz |
Suggests issues when typing title
This suggests possibly related issues when the user types a title.
This uses GraphQL to allow the frontend to request the exact
data that is requires. We also get free caching through the Vue Apollo
plugin.
With this we can include the ability to import .graphql files in JS
and Vue files.
Also we now have the Vue test utils library to make testing
Vue components easier.
Closes #22071
Diffstat (limited to 'app/controllers')
-rw-r--r-- | app/controllers/projects/issues_controller.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/app/controllers/projects/issues_controller.rb b/app/controllers/projects/issues_controller.rb index 308f666394c..d6d7110355b 100644 --- a/app/controllers/projects/issues_controller.rb +++ b/app/controllers/projects/issues_controller.rb @@ -38,6 +38,8 @@ class Projects::IssuesController < Projects::ApplicationController # Allow create a new branch and empty WIP merge request from current issue before_action :authorize_create_merge_request_from!, only: [:create_merge_request] + before_action :set_suggested_issues_feature_flags, only: [:new] + respond_to :html def index @@ -263,4 +265,9 @@ class Projects::IssuesController < Projects::ApplicationController # 3. https://gitlab.com/gitlab-org/gitlab-ce/issues/42426 Gitlab::QueryLimiting.whitelist('https://gitlab.com/gitlab-org/gitlab-ce/issues/42422') end + + def set_suggested_issues_feature_flags + push_frontend_feature_flag(:graphql) + push_frontend_feature_flag(:issue_suggestions) + end end |