diff options
author | Kamil Trzciński <ayufan@ayufan.eu> | 2015-12-14 10:32:57 +0000 |
---|---|---|
committer | Kamil Trzciński <ayufan@ayufan.eu> | 2015-12-14 10:32:57 +0000 |
commit | e81ae1e68c03de4442265e4699710421e2f2755c (patch) | |
tree | c3af812b5a8e8dbb3637370550550de777e53b36 /lib/ci | |
parent | c80f34257dc389369801eb112506706d46051bb1 (diff) | |
parent | a0c2a7b0cbb4567a1f09c4cbc400bf75df47a072 (diff) | |
download | gitlab-ce-e81ae1e68c03de4442265e4699710421e2f2755c.tar.gz |
Merge branch 'ci-services-migrate' into 'master'
Ci Services migrate
See merge request !1985
Diffstat (limited to 'lib/ci')
-rw-r--r-- | lib/ci/api/projects.rb | 38 |
1 files changed, 0 insertions, 38 deletions
diff --git a/lib/ci/api/projects.rb b/lib/ci/api/projects.rb index d719ad9e8d5..23c79f3879d 100644 --- a/lib/ci/api/projects.rb +++ b/lib/ci/api/projects.rb @@ -5,30 +5,6 @@ module Ci before { authenticate! } resource :projects do - # Register new webhook for project - # - # Parameters - # project_id (required) - The ID of a project - # web_hook (required) - WebHook URL - # Example Request - # POST /projects/:project_id/webhooks - post ":project_id/webhooks" do - required_attributes! [:web_hook] - - project = Ci::Project.find(params[:project_id]) - - unauthorized! unless can?(current_user, :admin_project, project.gl_project) - - web_hook = project.web_hooks.new({ url: params[:web_hook] }) - - if web_hook.save - present web_hook, with: Entities::WebHook - else - errors = web_hook.errors.full_messages.join(", ") - render_api_error!(errors, 400) - end - end - # Retrieve all Gitlab CI projects that the user has access to # # Example Request: @@ -121,20 +97,6 @@ module Ci end end - # Remove a Gitlab CI project - # - # Parameters: - # id (required) - The ID of a project - # Example Request: - # DELETE /projects/:id - delete ":id" do - project = Ci::Project.find(params[:id]) - - unauthorized! unless can?(current_user, :admin_project, project.gl_project) - - project.destroy - end - # Link a Gitlab CI project to a runner # # Parameters: |