summaryrefslogtreecommitdiff
path: root/lib/api
diff options
context:
space:
mode:
Diffstat (limited to 'lib/api')
-rw-r--r--lib/api/deployments.rb2
-rw-r--r--lib/api/entities.rb4
-rw-r--r--lib/api/environments.rb4
-rw-r--r--lib/api/helpers/pagination.rb2
-rw-r--r--lib/api/issues.rb6
-rw-r--r--lib/api/jobs.rb2
-rw-r--r--lib/api/labels.rb2
-rw-r--r--lib/api/pipeline_schedules.rb6
-rw-r--r--lib/api/pipelines.rb6
-rw-r--r--lib/api/projects_relation_builder.rb2
-rw-r--r--lib/api/releases.rb2
-rw-r--r--lib/api/services.rb4
-rw-r--r--lib/api/todos.rb2
-rw-r--r--lib/api/triggers.rb10
-rw-r--r--lib/api/variables.rb2
15 files changed, 28 insertions, 28 deletions
diff --git a/lib/api/deployments.rb b/lib/api/deployments.rb
index 8706a971a1a..eb45df31ff9 100644
--- a/lib/api/deployments.rb
+++ b/lib/api/deployments.rb
@@ -33,7 +33,7 @@ module API
success Entities::Deployment
end
params do
- requires :deployment_id, type: Integer, desc: 'The deployment ID'
+ requires :deployment_id, type: Integer, desc: 'The deployment ID'
end
get ':id/deployments/:deployment_id' do
authorize! :read_deployment, user_project
diff --git a/lib/api/entities.rb b/lib/api/entities.rb
index e0a48908122..4edec631e8d 100644
--- a/lib/api/entities.rb
+++ b/lib/api/entities.rb
@@ -190,7 +190,7 @@ module API
expose :custom_attributes, using: 'API::Entities::CustomAttribute', if: :with_custom_attributes
# rubocop: disable CodeReuse/ActiveRecord
- def self.preload_relation(projects_relation, options = {})
+ def self.preload_relation(projects_relation, options = {})
# Preloading tags, should be done with using only `:tags`,
# as `:tags` are defined as: `has_many :tags, through: :taggings`
# N+1 is solved then by using `subject.tags.map(&:name)`
@@ -274,7 +274,7 @@ module API
expose :statistics, using: 'API::Entities::ProjectStatistics', if: :statistics
# rubocop: disable CodeReuse/ActiveRecord
- def self.preload_relation(projects_relation, options = {})
+ def self.preload_relation(projects_relation, options = {})
# Preloading tags, should be done with using only `:tags`,
# as `:tags` are defined as: `has_many :tags, through: :taggings`
# N+1 is solved then by using `subject.tags.map(&:name)`
diff --git a/lib/api/environments.rb b/lib/api/environments.rb
index 633f24d3c9a..0278c6c54a5 100644
--- a/lib/api/environments.rb
+++ b/lib/api/environments.rb
@@ -74,7 +74,7 @@ module API
success Entities::Environment
end
params do
- requires :environment_id, type: Integer, desc: 'The environment ID'
+ requires :environment_id, type: Integer, desc: 'The environment ID'
end
delete ':id/environments/:environment_id' do
authorize! :update_environment, user_project
@@ -88,7 +88,7 @@ module API
success Entities::Environment
end
params do
- requires :environment_id, type: Integer, desc: 'The environment ID'
+ requires :environment_id, type: Integer, desc: 'The environment ID'
end
post ':id/environments/:environment_id/stop' do
authorize! :read_environment, user_project
diff --git a/lib/api/helpers/pagination.rb b/lib/api/helpers/pagination.rb
index cfcce6b66ad..de59c915d66 100644
--- a/lib/api/helpers/pagination.rb
+++ b/lib/api/helpers/pagination.rb
@@ -146,7 +146,7 @@ module API
end
def add_default_pagination_headers
- header 'X-Per-Page', per_page.to_s
+ header 'X-Per-Page', per_page.to_s
end
def add_navigation_links(next_page_params)
diff --git a/lib/api/issues.rb b/lib/api/issues.rb
index dac700482b4..afa3ac80121 100644
--- a/lib/api/issues.rb
+++ b/lib/api/issues.rb
@@ -294,7 +294,7 @@ module API
end
# rubocop: enable CodeReuse/ActiveRecord
- desc 'List merge requests that are related to the issue' do
+ desc 'List merge requests that are related to the issue' do
success Entities::MergeRequestBasic
end
params do
@@ -318,7 +318,7 @@ module API
present paginate(merge_requests), with: Entities::MergeRequestBasic, current_user: current_user, project: user_project
end
- desc 'List merge requests closing issue' do
+ desc 'List merge requests closing issue' do
success Entities::MergeRequestBasic
end
params do
@@ -335,7 +335,7 @@ module API
end
# rubocop: enable CodeReuse/ActiveRecord
- desc 'List participants for an issue' do
+ desc 'List participants for an issue' do
success Entities::UserBasic
end
params do
diff --git a/lib/api/jobs.rb b/lib/api/jobs.rb
index 45c694b6448..59f0dbe8a9b 100644
--- a/lib/api/jobs.rb
+++ b/lib/api/jobs.rb
@@ -52,7 +52,7 @@ module API
success Entities::Job
end
params do
- requires :pipeline_id, type: Integer, desc: 'The pipeline ID'
+ requires :pipeline_id, type: Integer, desc: 'The pipeline ID'
use :optional_scope
use :pagination
end
diff --git a/lib/api/labels.rb b/lib/api/labels.rb
index 2e676b0aa6b..d5eb2b94669 100644
--- a/lib/api/labels.rb
+++ b/lib/api/labels.rb
@@ -69,7 +69,7 @@ module API
success Entities::Label
end
params do
- requires :name, type: String, desc: 'The name of the label to be updated'
+ requires :name, type: String, desc: 'The name of the label to be updated'
optional :new_name, type: String, desc: 'The new name of the label'
optional :color, type: String, desc: "The new color of the label given in 6-digit hex notation with leading '#' sign (e.g. #FFAABB) or one of the allowed CSS color names"
optional :description, type: String, desc: 'The new description of label'
diff --git a/lib/api/pipeline_schedules.rb b/lib/api/pipeline_schedules.rb
index 47b711917e2..c86b50d3736 100644
--- a/lib/api/pipeline_schedules.rb
+++ b/lib/api/pipeline_schedules.rb
@@ -32,7 +32,7 @@ module API
success Entities::PipelineScheduleDetails
end
params do
- requires :pipeline_schedule_id, type: Integer, desc: 'The pipeline schedule id'
+ requires :pipeline_schedule_id, type: Integer, desc: 'The pipeline schedule id'
end
get ':id/pipeline_schedules/:pipeline_schedule_id' do
present pipeline_schedule, with: Entities::PipelineScheduleDetails
@@ -87,7 +87,7 @@ module API
success Entities::PipelineScheduleDetails
end
params do
- requires :pipeline_schedule_id, type: Integer, desc: 'The pipeline schedule id'
+ requires :pipeline_schedule_id, type: Integer, desc: 'The pipeline schedule id'
end
post ':id/pipeline_schedules/:pipeline_schedule_id/take_ownership' do
authorize! :update_pipeline_schedule, pipeline_schedule
@@ -103,7 +103,7 @@ module API
success Entities::PipelineScheduleDetails
end
params do
- requires :pipeline_schedule_id, type: Integer, desc: 'The pipeline schedule id'
+ requires :pipeline_schedule_id, type: Integer, desc: 'The pipeline schedule id'
end
delete ':id/pipeline_schedules/:pipeline_schedule_id' do
authorize! :admin_pipeline_schedule, pipeline_schedule
diff --git a/lib/api/pipelines.rb b/lib/api/pipelines.rb
index 7a7b23d2bbb..1f59b27f685 100644
--- a/lib/api/pipelines.rb
+++ b/lib/api/pipelines.rb
@@ -42,7 +42,7 @@ module API
success Entities::Pipeline
end
params do
- requires :ref, type: String, desc: 'Reference'
+ requires :ref, type: String, desc: 'Reference'
optional :variables, Array, desc: 'Array of variables available in the pipeline'
end
# rubocop: disable CodeReuse/ActiveRecord
@@ -101,7 +101,7 @@ module API
success Entities::Pipeline
end
params do
- requires :pipeline_id, type: Integer, desc: 'The pipeline ID'
+ requires :pipeline_id, type: Integer, desc: 'The pipeline ID'
end
post ':id/pipelines/:pipeline_id/retry' do
authorize! :update_pipeline, user_project
@@ -116,7 +116,7 @@ module API
success Entities::Pipeline
end
params do
- requires :pipeline_id, type: Integer, desc: 'The pipeline ID'
+ requires :pipeline_id, type: Integer, desc: 'The pipeline ID'
end
post ':id/pipelines/:pipeline_id/cancel' do
authorize! :update_pipeline, user_project
diff --git a/lib/api/projects_relation_builder.rb b/lib/api/projects_relation_builder.rb
index 8edcfea7c93..263468c9aa6 100644
--- a/lib/api/projects_relation_builder.rb
+++ b/lib/api/projects_relation_builder.rb
@@ -11,7 +11,7 @@ module API
projects_relation
end
- def preload_relation(projects_relation, options = {})
+ def preload_relation(projects_relation, options = {})
projects_relation
end
diff --git a/lib/api/releases.rb b/lib/api/releases.rb
index 576fee51db0..cb85028f22c 100644
--- a/lib/api/releases.rb
+++ b/lib/api/releases.rb
@@ -97,7 +97,7 @@ module API
success Entities::Release
end
params do
- requires :tag_name, type: String, desc: 'The name of the tag', as: :tag
+ requires :tag_name, type: String, desc: 'The name of the tag', as: :tag
end
delete ':id/releases/:tag_name', requirements: RELEASE_ENDPOINT_REQUIREMETS do
authorize_destroy_release!
diff --git a/lib/api/services.rb b/lib/api/services.rb
index d60f0f5f08d..637b5a8a89a 100644
--- a/lib/api/services.rb
+++ b/lib/api/services.rb
@@ -763,7 +763,7 @@ module API
params do
requires :id, type: String, desc: 'The ID of a project'
end
- resource :projects, requirements: API::NAMESPACE_OR_PROJECT_REQUIREMENTS do
+ resource :projects, requirements: API::NAMESPACE_OR_PROJECT_REQUIREMENTS do
before { authenticate! }
before { authorize_admin_project }
@@ -842,7 +842,7 @@ module API
params do
requires :id, type: String, desc: 'The ID of a project'
end
- resource :projects, requirements: API::NAMESPACE_OR_PROJECT_REQUIREMENTS do
+ resource :projects, requirements: API::NAMESPACE_OR_PROJECT_REQUIREMENTS do
desc "Trigger a slash command for #{service_slug}" do
detail 'Added in GitLab 8.13'
end
diff --git a/lib/api/todos.rb b/lib/api/todos.rb
index d2c8cf7c1aa..64ac8ece56c 100644
--- a/lib/api/todos.rb
+++ b/lib/api/todos.rb
@@ -14,7 +14,7 @@ module API
params do
requires :id, type: String, desc: 'The ID of a project'
end
- resource :projects, requirements: API::NAMESPACE_OR_PROJECT_REQUIREMENTS do
+ resource :projects, requirements: API::NAMESPACE_OR_PROJECT_REQUIREMENTS do
ISSUABLE_TYPES.each do |type, finder|
type_id_str = "#{type.singularize}_iid".to_sym
diff --git a/lib/api/triggers.rb b/lib/api/triggers.rb
index 3ce1529f259..604f989d8b3 100644
--- a/lib/api/triggers.rb
+++ b/lib/api/triggers.rb
@@ -7,7 +7,7 @@ module API
params do
requires :id, type: String, desc: 'The ID of a project'
end
- resource :projects, requirements: API::NAMESPACE_OR_PROJECT_REQUIREMENTS do
+ resource :projects, requirements: API::NAMESPACE_OR_PROJECT_REQUIREMENTS do
desc 'Trigger a GitLab project pipeline' do
success Entities::Pipeline
end
@@ -59,7 +59,7 @@ module API
success Entities::Trigger
end
params do
- requires :trigger_id, type: Integer, desc: 'The trigger ID'
+ requires :trigger_id, type: Integer, desc: 'The trigger ID'
end
get ':id/triggers/:trigger_id' do
authenticate!
@@ -75,7 +75,7 @@ module API
success Entities::Trigger
end
params do
- requires :description, type: String, desc: 'The trigger description'
+ requires :description, type: String, desc: 'The trigger description'
end
post ':id/triggers' do
authenticate!
@@ -116,7 +116,7 @@ module API
success Entities::Trigger
end
params do
- requires :trigger_id, type: Integer, desc: 'The trigger ID'
+ requires :trigger_id, type: Integer, desc: 'The trigger ID'
end
post ':id/triggers/:trigger_id/take_ownership' do
authenticate!
@@ -137,7 +137,7 @@ module API
success Entities::Trigger
end
params do
- requires :trigger_id, type: Integer, desc: 'The trigger ID'
+ requires :trigger_id, type: Integer, desc: 'The trigger ID'
end
delete ':id/triggers/:trigger_id' do
authenticate!
diff --git a/lib/api/variables.rb b/lib/api/variables.rb
index f7cae2251c2..148deb86c4c 100644
--- a/lib/api/variables.rb
+++ b/lib/api/variables.rb
@@ -11,7 +11,7 @@ module API
requires :id, type: String, desc: 'The ID of a project'
end
- resource :projects, requirements: API::NAMESPACE_OR_PROJECT_REQUIREMENTS do
+ resource :projects, requirements: API::NAMESPACE_OR_PROJECT_REQUIREMENTS do
desc 'Get project variables' do
success Entities::Variable
end