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:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-10-05 11:47:23 +0300
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-10-05 11:47:23 +0300
commitc293cc91522544f5a45fc00b842fc23fa228cdf9 (patch)
tree2ed47ab1619d0e57905090b3408025fe66a16b2e /app/controllers/ci
parent0de7c83a78711601b40b5a739070da2e3af29b11 (diff)
Move CI web hooks page to project settings area
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Diffstat (limited to 'app/controllers/ci')
-rw-r--r--app/controllers/ci/web_hooks_controller.rb53
1 files changed, 0 insertions, 53 deletions
diff --git a/app/controllers/ci/web_hooks_controller.rb b/app/controllers/ci/web_hooks_controller.rb
deleted file mode 100644
index 24074a6d9ac..00000000000
--- a/app/controllers/ci/web_hooks_controller.rb
+++ /dev/null
@@ -1,53 +0,0 @@
-module Ci
- class WebHooksController < Ci::ApplicationController
- before_action :authenticate_user!
- before_action :project
- before_action :authorize_access_project!
- before_action :authorize_manage_project!
-
- layout 'ci/project'
-
- def index
- @web_hooks = @project.web_hooks
- @web_hook = Ci::WebHook.new
- end
-
- def create
- @web_hook = @project.web_hooks.new(web_hook_params)
- @web_hook.save
-
- if @web_hook.valid?
- redirect_to ci_project_web_hooks_path(@project)
- else
- @web_hooks = @project.web_hooks.select(&:persisted?)
- render :index
- end
- end
-
- def test
- Ci::TestHookService.new.execute(hook, current_user)
-
- redirect_to :back
- end
-
- def destroy
- hook.destroy
-
- redirect_to ci_project_web_hooks_path(@project)
- end
-
- private
-
- def hook
- @web_hook ||= @project.web_hooks.find(params[:id])
- end
-
- def project
- @project = Ci::Project.find(params[:project_id])
- end
-
- def web_hook_params
- params.require(:web_hook).permit(:url)
- end
- end
-end