From 9f0d794513d2ce1c990e61f4d21efe1dcad845fd Mon Sep 17 00:00:00 2001 From: Jose Ivan Vargas <jvargas@gitlab.com> Date: Fri, 30 Dec 2016 11:30:25 -0600 Subject: [PATCH 1/7] Moved the webhooks and services gear options to a single one called integrations --- app/controllers/projects/hooks_controller.rb | 7 +++---- .../projects/services_controller.rb | 2 +- .../settings/integrations_controller.rb | 18 ++++++++++++++++++ app/helpers/gitlab_routing_helper.rb | 3 +++ .../layouts/nav/_project_settings.html.haml | 10 +++------- .../{index.html.haml => _index.html.haml} | 0 .../{index.html.haml => _index.html.haml} | 2 -- .../settings/integrations/show.html.haml | 3 +++ config/routes/project.rb | 2 +- 9 files changed, 32 insertions(+), 15 deletions(-) create mode 100644 app/controllers/projects/settings/integrations_controller.rb rename app/views/projects/hooks/{index.html.haml => _index.html.haml} (100%) rename app/views/projects/services/{index.html.haml => _index.html.haml} (97%) create mode 100644 app/views/projects/settings/integrations/show.html.haml diff --git a/app/controllers/projects/hooks_controller.rb b/app/controllers/projects/hooks_controller.rb index 0ae8ff98009a..8c52aa748ae2 100644 --- a/app/controllers/projects/hooks_controller.rb +++ b/app/controllers/projects/hooks_controller.rb @@ -7,8 +7,7 @@ class Projects::HooksController < Projects::ApplicationController layout "project_settings" def index - @hooks = @project.hooks - @hook = ProjectHook.new + redirect_to namespace_project_settings_integrations_path(@project.namespace, @project) end def create @@ -16,7 +15,7 @@ def create @hook.save if @hook.valid? - redirect_to namespace_project_hooks_path(@project.namespace, @project) + redirect_to namespace_project_settings_integrations_path(@project.namespace, @project) else @hooks = @project.hooks.select(&:persisted?) render :index @@ -44,7 +43,7 @@ def test def destroy hook.destroy - redirect_to namespace_project_hooks_path(@project.namespace, @project) + redirect_to namespace_project_settings_integrations_path(@project.namespace, @project) end private diff --git a/app/controllers/projects/services_controller.rb b/app/controllers/projects/services_controller.rb index 30c2a5d99827..b4c40c6bf142 100644 --- a/app/controllers/projects/services_controller.rb +++ b/app/controllers/projects/services_controller.rb @@ -10,7 +10,7 @@ class Projects::ServicesController < Projects::ApplicationController layout "project_settings" def index - @services = @project.find_or_initialize_services + redirect_to namespace_project_settings_integrations_path(@project.namespace, @project) end def edit diff --git a/app/controllers/projects/settings/integrations_controller.rb b/app/controllers/projects/settings/integrations_controller.rb new file mode 100644 index 000000000000..07563e458655 --- /dev/null +++ b/app/controllers/projects/settings/integrations_controller.rb @@ -0,0 +1,18 @@ +module Projects + module Settings + class IntegrationsController < Projects::ApplicationController + include ServiceParams + + before_action :authorize_admin_project! + + layout "project_settings" + def show + @hooks = @project.hooks + @hook = ProjectHook.new + + # Services + @services = @project.find_or_initialize_services + end + end + end +end diff --git a/app/helpers/gitlab_routing_helper.rb b/app/helpers/gitlab_routing_helper.rb index 5742fec44581..44e22d6abd52 100644 --- a/app/helpers/gitlab_routing_helper.rb +++ b/app/helpers/gitlab_routing_helper.rb @@ -208,6 +208,9 @@ def artifacts_action_path(path, project, build) end # Settings + def project_settings_integrations_path(project, *args) + namespace_project_settings_integrations_path(project.namespace, project, *args) + end def project_settings_members_path(project, *args) namespace_project_settings_members_path(project.namespace, project, *args) end diff --git a/app/views/layouts/nav/_project_settings.html.haml b/app/views/layouts/nav/_project_settings.html.haml index 0fb2bb460cbb..08e016a1773d 100644 --- a/app/views/layouts/nav/_project_settings.html.haml +++ b/app/views/layouts/nav/_project_settings.html.haml @@ -8,14 +8,10 @@ = link_to namespace_project_deploy_keys_path(@project.namespace, @project), title: 'Deploy Keys' do %span Deploy Keys - = nav_link(controller: :hooks) do - = link_to namespace_project_hooks_path(@project.namespace, @project), title: 'Webhooks' do + = nav_link(controller: :integrations) do + = link_to namespace_project_settings_integrations_path(@project.namespace, @project), title: 'Webhooks' do %span - Webhooks - = nav_link(controller: :services) do - = link_to namespace_project_services_path(@project.namespace, @project), title: 'Services' do - %span - Services + Integrations = nav_link(controller: :protected_branches) do = link_to namespace_project_protected_branches_path(@project.namespace, @project), title: 'Protected Branches' do %span diff --git a/app/views/projects/hooks/index.html.haml b/app/views/projects/hooks/_index.html.haml similarity index 100% rename from app/views/projects/hooks/index.html.haml rename to app/views/projects/hooks/_index.html.haml diff --git a/app/views/projects/services/index.html.haml b/app/views/projects/services/_index.html.haml similarity index 97% rename from app/views/projects/services/index.html.haml rename to app/views/projects/services/_index.html.haml index 66fd3029dc9a..964133504e69 100644 --- a/app/views/projects/services/index.html.haml +++ b/app/views/projects/services/_index.html.haml @@ -1,5 +1,3 @@ -- page_title "Services" - .row.prepend-top-default.append-bottom-default .col-lg-3 %h4.prepend-top-0 diff --git a/app/views/projects/settings/integrations/show.html.haml b/app/views/projects/settings/integrations/show.html.haml new file mode 100644 index 000000000000..aa38a889cdd7 --- /dev/null +++ b/app/views/projects/settings/integrations/show.html.haml @@ -0,0 +1,3 @@ +- page_title 'Integrations' += render 'projects/hooks/index' += render 'projects/services/index' diff --git a/config/routes/project.rb b/config/routes/project.rb index 1fc6ed28c74f..6620b765e026 100644 --- a/config/routes/project.rb +++ b/config/routes/project.rb @@ -307,9 +307,9 @@ end end end - namespace :settings do resource :members, only: [:show] + resource :integrations, only: [:show] end # Since both wiki and repository routing contains wildcard characters -- GitLab From 1ee4f98694f482099de9f21dc957071e53395313 Mon Sep 17 00:00:00 2001 From: Jose Ivan Vargas <jvargas@gitlab.com> Date: Fri, 30 Dec 2016 13:27:51 -0600 Subject: [PATCH 2/7] Fixed spinach feature tests for the services and hooks controllers Added a test for the integrations controller --- .../projects/hooks/_project_hook.html.haml | 2 +- app/views/shared/web_hooks/_form.html.haml | 3 +-- features/steps/project/hooks.rb | 6 +++--- features/steps/project/services.rb | 2 +- features/steps/shared/paths.rb | 2 +- .../settings/integrations_controller_spec.rb | 20 +++++++++++++++++++ 6 files changed, 27 insertions(+), 8 deletions(-) create mode 100644 spec/controllers/projects/settings/integrations_controller_spec.rb diff --git a/app/views/projects/hooks/_project_hook.html.haml b/app/views/projects/hooks/_project_hook.html.haml index ceabe2eab3d5..5a22e6cdf998 100644 --- a/app/views/projects/hooks/_project_hook.html.haml +++ b/app/views/projects/hooks/_project_hook.html.haml @@ -10,6 +10,6 @@ %span.append-right-10.inline SSL Verification: #{hook.enable_ssl_verification ? "enabled" : "disabled"} = link_to "Test", test_namespace_project_hook_path(@project.namespace, @project, hook), class: "btn btn-sm" - = link_to namespace_project_hook_path(@project.namespace, @project, hook), data: { confirm: 'Are you sure?'}, method: :delete, class: "btn btn-transparent" do + = link_to namespace_project_settings_integrations_path(@project.namespace, @project, hook), data: { confirm: 'Are you sure?'}, method: :delete, class: "btn btn-transparent" do %span.sr-only Remove = icon('trash') diff --git a/app/views/shared/web_hooks/_form.html.haml b/app/views/shared/web_hooks/_form.html.haml index 5d659eb83a9c..070c70d28ea3 100644 --- a/app/views/shared/web_hooks/_form.html.haml +++ b/app/views/shared/web_hooks/_form.html.haml @@ -1,4 +1,3 @@ -- page_title "Webhooks" - context_title = @project ? 'project' : 'group' .row.prepend-top-default @@ -99,7 +98,7 @@ - if hooks.any? %ul.well-list - hooks.each do |hook| - = render "project_hook", hook: hook + = render "projects/hooks/project_hook", hook: hook - else %p.settings-message.text-center.append-bottom-0 No webhooks found, add one in the form above. diff --git a/features/steps/project/hooks.rb b/features/steps/project/hooks.rb index 13c0713669a0..37b608ffbd36 100644 --- a/features/steps/project/hooks.rb +++ b/features/steps/project/hooks.rb @@ -36,12 +36,12 @@ class Spinach::Features::ProjectHooks < Spinach::FeatureSteps end step 'I should see newly created hook' do - expect(current_path).to eq namespace_project_hooks_path(current_project.namespace, current_project) + expect(current_path).to eq namespace_project_settings_integrations_path(current_project.namespace, current_project) expect(page).to have_content(@url) end step 'I should see newly created hook with SSL verification enabled' do - expect(current_path).to eq namespace_project_hooks_path(current_project.namespace, current_project) + expect(current_path).to eq namespace_project_settings_integrations_path(current_project.namespace, current_project) expect(page).to have_content(@url) expect(page).to have_content("SSL Verification: enabled") end @@ -57,7 +57,7 @@ class Spinach::Features::ProjectHooks < Spinach::FeatureSteps end step 'hook should be triggered' do - expect(current_path).to eq namespace_project_hooks_path(current_project.namespace, current_project) + expect(current_path).to eq namespace_project_settings_integrations_path(current_project.namespace, current_project) expect(page).to have_selector '.flash-notice', text: 'Hook executed successfully: HTTP 200' end diff --git a/features/steps/project/services.rb b/features/steps/project/services.rb index a4d29770922c..772b07d0ad83 100644 --- a/features/steps/project/services.rb +++ b/features/steps/project/services.rb @@ -4,7 +4,7 @@ class Spinach::Features::ProjectServices < Spinach::FeatureSteps include SharedPaths step 'I visit project "Shop" services page' do - visit namespace_project_services_path(@project.namespace, @project) + visit namespace_project_settings_integrations_path(@project.namespace, @project) end step 'I should see list of available services' do diff --git a/features/steps/shared/paths.rb b/features/steps/shared/paths.rb index 670e6ca49a3e..718cf9247293 100644 --- a/features/steps/shared/paths.rb +++ b/features/steps/shared/paths.rb @@ -256,7 +256,7 @@ module SharedPaths end step 'I visit project hooks page' do - visit namespace_project_hooks_path(@project.namespace, @project) + visit namespace_project_settings_integrations_path(@project.namespace, @project) end step 'I visit project deploy keys page' do diff --git a/spec/controllers/projects/settings/integrations_controller_spec.rb b/spec/controllers/projects/settings/integrations_controller_spec.rb new file mode 100644 index 000000000000..7a0ad4ae2365 --- /dev/null +++ b/spec/controllers/projects/settings/integrations_controller_spec.rb @@ -0,0 +1,20 @@ +require ('spec_helper') + +describe Projects::Settings::IntegrationsController do + let(:project) { create(:project, :public) } + let(:user) { create(:user) } + + before do + project.team << [user, :master] + sign_in(user) + end + + describe 'GET show' do + it 'renders show with 200 status code' do + get :show, namespace_id: project.namespace, project_id: project + + expect(response).to have_http_status(200) + expect(response).to render_template(:show) + end + end +end -- GitLab From bc7c6c689239a5db3f0c4edcbb77d6b9e586ba22 Mon Sep 17 00:00:00 2001 From: Jose Ivan Vargas <jvargas@gitlab.com> Date: Fri, 30 Dec 2016 15:09:31 -0600 Subject: [PATCH 3/7] Fixed more tests --- features/project/active_tab.feature | 6 +++--- features/steps/project/active_tab.rb | 8 ++++---- .../projects/settings/integrations_controller_spec.rb | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/features/project/active_tab.feature b/features/project/active_tab.feature index 57dda9c2234f..d033e6b167b4 100644 --- a/features/project/active_tab.feature +++ b/features/project/active_tab.feature @@ -39,10 +39,10 @@ Feature: Project Active Tab # Sub Tabs: Settings - Scenario: On Project Settings/Hooks + Scenario: On Project Settings/Integrations Given I visit my project's settings page - And I click the "Hooks" tab - Then the active sub nav should be Hooks + And I click the "Integrations" tab + Then the active sub nav should be Integrations And no other sub navs should be active And the active main tab should be Settings diff --git a/features/steps/project/active_tab.rb b/features/steps/project/active_tab.rb index 582250328594..9f701840f1df 100644 --- a/features/steps/project/active_tab.rb +++ b/features/steps/project/active_tab.rb @@ -27,8 +27,8 @@ class Spinach::Features::ProjectActiveTab < Spinach::FeatureSteps end end - step 'I click the "Hooks" tab' do - click_link('Webhooks') + step 'I click the "Integrations" tab' do + click_link('Integrations') end step 'I click the "Deploy Keys" tab' do @@ -39,8 +39,8 @@ class Spinach::Features::ProjectActiveTab < Spinach::FeatureSteps ensure_active_sub_nav('Members') end - step 'the active sub nav should be Hooks' do - ensure_active_sub_nav('Webhooks') + step 'the active sub nav should be Integrations' do + ensure_active_sub_nav('Integrations') end step 'the active sub nav should be Deploy Keys' do diff --git a/spec/controllers/projects/settings/integrations_controller_spec.rb b/spec/controllers/projects/settings/integrations_controller_spec.rb index 7a0ad4ae2365..f6f0653dbc90 100644 --- a/spec/controllers/projects/settings/integrations_controller_spec.rb +++ b/spec/controllers/projects/settings/integrations_controller_spec.rb @@ -1,4 +1,4 @@ -require ('spec_helper') +require('spec_helper') describe Projects::Settings::IntegrationsController do let(:project) { create(:project, :public) } -- GitLab From 373411d18d019f5321475e4b770cb36f4461a462 Mon Sep 17 00:00:00 2001 From: Jose Ivan Vargas <jvargas@gitlab.com> Date: Mon, 16 Jan 2017 10:11:25 -0500 Subject: [PATCH 4/7] Corrected code style and titles --- app/controllers/projects/settings/integrations_controller.rb | 2 +- app/helpers/gitlab_routing_helper.rb | 1 + app/views/layouts/nav/_project_settings.html.haml | 2 +- app/views/shared/web_hooks/_form.html.haml | 2 -- .../projects/settings/integrations_controller_spec.rb | 4 ++-- 5 files changed, 5 insertions(+), 6 deletions(-) diff --git a/app/controllers/projects/settings/integrations_controller.rb b/app/controllers/projects/settings/integrations_controller.rb index 07563e458655..fb2a48377354 100644 --- a/app/controllers/projects/settings/integrations_controller.rb +++ b/app/controllers/projects/settings/integrations_controller.rb @@ -4,8 +4,8 @@ class IntegrationsController < Projects::ApplicationController include ServiceParams before_action :authorize_admin_project! - layout "project_settings" + def show @hooks = @project.hooks @hook = ProjectHook.new diff --git a/app/helpers/gitlab_routing_helper.rb b/app/helpers/gitlab_routing_helper.rb index 44e22d6abd52..2159e4ce21a4 100644 --- a/app/helpers/gitlab_routing_helper.rb +++ b/app/helpers/gitlab_routing_helper.rb @@ -211,6 +211,7 @@ def artifacts_action_path(path, project, build) def project_settings_integrations_path(project, *args) namespace_project_settings_integrations_path(project.namespace, project, *args) end + def project_settings_members_path(project, *args) namespace_project_settings_members_path(project.namespace, project, *args) end diff --git a/app/views/layouts/nav/_project_settings.html.haml b/app/views/layouts/nav/_project_settings.html.haml index 08e016a1773d..c6df66d2c3ce 100644 --- a/app/views/layouts/nav/_project_settings.html.haml +++ b/app/views/layouts/nav/_project_settings.html.haml @@ -9,7 +9,7 @@ %span Deploy Keys = nav_link(controller: :integrations) do - = link_to namespace_project_settings_integrations_path(@project.namespace, @project), title: 'Webhooks' do + = link_to namespace_project_settings_integrations_path(@project.namespace, @project), title: 'Integrations' do %span Integrations = nav_link(controller: :protected_branches) do diff --git a/app/views/shared/web_hooks/_form.html.haml b/app/views/shared/web_hooks/_form.html.haml index 070c70d28ea3..edbaa8857809 100644 --- a/app/views/shared/web_hooks/_form.html.haml +++ b/app/views/shared/web_hooks/_form.html.haml @@ -1,5 +1,3 @@ -- context_title = @project ? 'project' : 'group' - .row.prepend-top-default .col-lg-3 %h4.prepend-top-0 diff --git a/spec/controllers/projects/settings/integrations_controller_spec.rb b/spec/controllers/projects/settings/integrations_controller_spec.rb index f6f0653dbc90..e0f9a5b24a68 100644 --- a/spec/controllers/projects/settings/integrations_controller_spec.rb +++ b/spec/controllers/projects/settings/integrations_controller_spec.rb @@ -1,8 +1,8 @@ -require('spec_helper') +require 'spec_helper' describe Projects::Settings::IntegrationsController do let(:project) { create(:project, :public) } - let(:user) { create(:user) } + let(:user) { create(:user) } before do project.team << [user, :master] -- GitLab From 0af99433143727088b6a0a1b2163751c05d80ce6 Mon Sep 17 00:00:00 2001 From: Jose Ivan Vargas <jvargas@gitlab.com> Date: Wed, 18 Jan 2017 12:09:32 -0600 Subject: [PATCH 5/7] Removed the index action from both the projects hook and services controllers --- app/controllers/projects/hooks_controller.rb | 7 ++----- app/controllers/projects/services_controller.rb | 4 ---- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/app/controllers/projects/hooks_controller.rb b/app/controllers/projects/hooks_controller.rb index 8c52aa748ae2..245c674f6509 100644 --- a/app/controllers/projects/hooks_controller.rb +++ b/app/controllers/projects/hooks_controller.rb @@ -6,10 +6,6 @@ class Projects::HooksController < Projects::ApplicationController layout "project_settings" - def index - redirect_to namespace_project_settings_integrations_path(@project.namespace, @project) - end - def create @hook = @project.hooks.new(hook_params) @hook.save @@ -18,7 +14,8 @@ def create redirect_to namespace_project_settings_integrations_path(@project.namespace, @project) else @hooks = @project.hooks.select(&:persisted?) - render :index + flash[:alert] = @hook.errors.full_messages.join.html_safe + redirect_to namespace_project_settings_integrations_path(@project.namespace, @project) end end diff --git a/app/controllers/projects/services_controller.rb b/app/controllers/projects/services_controller.rb index b4c40c6bf142..17cb1d5be242 100644 --- a/app/controllers/projects/services_controller.rb +++ b/app/controllers/projects/services_controller.rb @@ -9,10 +9,6 @@ class Projects::ServicesController < Projects::ApplicationController layout "project_settings" - def index - redirect_to namespace_project_settings_integrations_path(@project.namespace, @project) - end - def edit end -- GitLab From 7b3ea49a4449686e512a5236c2d4073641afce77 Mon Sep 17 00:00:00 2001 From: Jose Ivan Vargas <jvargas@gitlab.com> Date: Wed, 18 Jan 2017 15:40:16 -0600 Subject: [PATCH 6/7] Fixed tests and a rubocop linter --- app/controllers/projects/hooks_controller.rb | 6 ++---- spec/features/security/project/internal_access_spec.rb | 4 ++-- spec/features/security/project/private_access_spec.rb | 4 ++-- spec/features/security/project/public_access_spec.rb | 4 ++-- 4 files changed, 8 insertions(+), 10 deletions(-) diff --git a/app/controllers/projects/hooks_controller.rb b/app/controllers/projects/hooks_controller.rb index 245c674f6509..b668a9331e71 100644 --- a/app/controllers/projects/hooks_controller.rb +++ b/app/controllers/projects/hooks_controller.rb @@ -10,13 +10,11 @@ def create @hook = @project.hooks.new(hook_params) @hook.save - if @hook.valid? - redirect_to namespace_project_settings_integrations_path(@project.namespace, @project) - else + unless @hook.valid? @hooks = @project.hooks.select(&:persisted?) flash[:alert] = @hook.errors.full_messages.join.html_safe - redirect_to namespace_project_settings_integrations_path(@project.namespace, @project) end + redirect_to namespace_project_settings_integrations_path(@project.namespace, @project) end def test diff --git a/spec/features/security/project/internal_access_spec.rb b/spec/features/security/project/internal_access_spec.rb index ecebabefff87..92d5a2fbc48c 100644 --- a/spec/features/security/project/internal_access_spec.rb +++ b/spec/features/security/project/internal_access_spec.rb @@ -262,8 +262,8 @@ it { is_expected.to be_denied_for(:visitor) } end - describe "GET /:project_path/hooks" do - subject { namespace_project_hooks_path(project.namespace, project) } + describe "GET /:project_path/settings/integrations" do + subject { namespace_project_settings_integrations_path(project.namespace, project) } it { is_expected.to be_allowed_for(:admin) } it { is_expected.to be_allowed_for(:owner).of(project) } diff --git a/spec/features/security/project/private_access_spec.rb b/spec/features/security/project/private_access_spec.rb index 9bc59a7c4f99..b616e4884875 100644 --- a/spec/features/security/project/private_access_spec.rb +++ b/spec/features/security/project/private_access_spec.rb @@ -234,8 +234,8 @@ it { is_expected.to be_denied_for(:visitor) } end - describe "GET /:project_path/hooks" do - subject { namespace_project_hooks_path(project.namespace, project) } + describe "GET /:project_path/namespace/hooks" do + subject { namespace_project_settings_integrations_path(project.namespace, project) } it { is_expected.to be_allowed_for(:admin) } it { is_expected.to be_allowed_for(:owner).of(project) } diff --git a/spec/features/security/project/public_access_spec.rb b/spec/features/security/project/public_access_spec.rb index a8d43b3d5816..ded85e837f49 100644 --- a/spec/features/security/project/public_access_spec.rb +++ b/spec/features/security/project/public_access_spec.rb @@ -400,8 +400,8 @@ it { is_expected.to be_allowed_for(:visitor) } end - describe "GET /:project_path/hooks" do - subject { namespace_project_hooks_path(project.namespace, project) } + describe "GET /:project_path/settings/integrations" do + subject { namespace_project_settings_integrations_path(project.namespace, project) } it { is_expected.to be_allowed_for(:admin) } it { is_expected.to be_allowed_for(:owner).of(project) } -- GitLab From 8f391fd373a3789b021d07bb23dc837e91c65da2 Mon Sep 17 00:00:00 2001 From: Jose Ivan Vargas <jvargas@gitlab.com> Date: Thu, 19 Jan 2017 16:11:48 -0600 Subject: [PATCH 7/7] Renamed a file to make the transition to EE easier --- .../{hooks => settings/integrations}/_project_hook.html.haml | 2 +- app/views/shared/web_hooks/_form.html.haml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) rename app/views/projects/{hooks => settings/integrations}/_project_hook.html.haml (79%) diff --git a/app/views/projects/hooks/_project_hook.html.haml b/app/views/projects/settings/integrations/_project_hook.html.haml similarity index 79% rename from app/views/projects/hooks/_project_hook.html.haml rename to app/views/projects/settings/integrations/_project_hook.html.haml index 5a22e6cdf998..ceabe2eab3d5 100644 --- a/app/views/projects/hooks/_project_hook.html.haml +++ b/app/views/projects/settings/integrations/_project_hook.html.haml @@ -10,6 +10,6 @@ %span.append-right-10.inline SSL Verification: #{hook.enable_ssl_verification ? "enabled" : "disabled"} = link_to "Test", test_namespace_project_hook_path(@project.namespace, @project, hook), class: "btn btn-sm" - = link_to namespace_project_settings_integrations_path(@project.namespace, @project, hook), data: { confirm: 'Are you sure?'}, method: :delete, class: "btn btn-transparent" do + = link_to namespace_project_hook_path(@project.namespace, @project, hook), data: { confirm: 'Are you sure?'}, method: :delete, class: "btn btn-transparent" do %span.sr-only Remove = icon('trash') diff --git a/app/views/shared/web_hooks/_form.html.haml b/app/views/shared/web_hooks/_form.html.haml index edbaa8857809..13586a5a12aa 100644 --- a/app/views/shared/web_hooks/_form.html.haml +++ b/app/views/shared/web_hooks/_form.html.haml @@ -96,7 +96,7 @@ - if hooks.any? %ul.well-list - hooks.each do |hook| - = render "projects/hooks/project_hook", hook: hook + = render "project_hook", hook: hook - else %p.settings-message.text-center.append-bottom-0 No webhooks found, add one in the form above. -- GitLab