Commit ade5e0b1 authored by Douwe Maan's avatar Douwe Maan

Fix new offenses

parent f88ff0cc
...@@ -13,16 +13,16 @@ class Projects::PipelinesController < Projects::ApplicationController ...@@ -13,16 +13,16 @@ class Projects::PipelinesController < Projects::ApplicationController
.page(params[:page]) .page(params[:page])
.per(30) .per(30)
@running_count = PipelinesFinder. @running_count = PipelinesFinder
.new(project).execute(scope: 'running').count .new(project).execute(scope: 'running').count
@pending_count = PipelinesFinder. @pending_count = PipelinesFinder
.new(project).execute(scope: 'pending').count .new(project).execute(scope: 'pending').count
@finished_count = PipelinesFinder. @finished_count = PipelinesFinder
.new(project).execute(scope: 'finished').count .new(project).execute(scope: 'finished').count
@pipelines_count = PipelinesFinder. @pipelines_count = PipelinesFinder
.new(project).execute.count .new(project).execute.count
respond_to do |format| respond_to do |format|
......
...@@ -5,7 +5,7 @@ module API ...@@ -5,7 +5,7 @@ module API
before { authenticate! } before { authenticate! }
NOTEABLE_TYPES = [Issue, MergeRequest, Snippet] NOTEABLE_TYPES = [Issue, MergeRequest, Snippet].freeze
params do params do
requires :id, type: String, desc: 'The ID of a project' requires :id, type: String, desc: 'The ID of a project'
...@@ -85,7 +85,7 @@ module API ...@@ -85,7 +85,7 @@ module API
note = ::Notes::CreateService.new(user_project, current_user, opts).execute note = ::Notes::CreateService.new(user_project, current_user, opts).execute
if note.valid? if note.valid?
present note, with: ::API::V3::Entities::const_get(note.class.name) present note, with: ::API::V3::Entities.const_get(note.class.name)
else else
not_found!("Note #{note.errors.messages}") not_found!("Note #{note.errors.messages}")
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment