diff options
author | Rémy Coutable <remy@rymai.me> | 2017-11-20 09:22:14 +0000 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2017-11-20 09:22:14 +0000 |
commit | 4f09d099e9fa29659917f87c2dc25f2b9aa05b5e (patch) | |
tree | a70a9b3d42c8d3762974d354b31aa611590f55b8 /app/services | |
parent | 135437b70d5bf12fff17d10adeae0c459b779138 (diff) | |
parent | 181cd299f9e06223e8338e93b1c318c671ccb1aa (diff) | |
download | gitlab-ce-4f09d099e9fa29659917f87c2dc25f2b9aa05b5e.tar.gz |
Merge branch '18040-rubocop-line-break-after-guard-clause' into 'master'
Adds Rubocop rule for line break after guard clause
Closes #18040
See merge request gitlab-org/gitlab-ce!15188
Diffstat (limited to 'app/services')
-rw-r--r-- | app/services/ci/fetch_kubernetes_token_service.rb | 1 | ||||
-rw-r--r-- | app/services/labels/promote_service.rb | 1 | ||||
-rw-r--r-- | app/services/merge_requests/build_service.rb | 1 | ||||
-rw-r--r-- | app/services/projects/group_links/destroy_service.rb | 1 | ||||
-rw-r--r-- | app/services/todo_service.rb | 1 |
5 files changed, 5 insertions, 0 deletions
diff --git a/app/services/ci/fetch_kubernetes_token_service.rb b/app/services/ci/fetch_kubernetes_token_service.rb index 44da87cb00c..e73c6ad6780 100644 --- a/app/services/ci/fetch_kubernetes_token_service.rb +++ b/app/services/ci/fetch_kubernetes_token_service.rb @@ -34,6 +34,7 @@ module Ci kubeclient.get_secrets.as_json rescue KubeException => err raise err unless err.error_code == 404 + [] end diff --git a/app/services/labels/promote_service.rb b/app/services/labels/promote_service.rb index 43b539ded53..997d247be46 100644 --- a/app/services/labels/promote_service.rb +++ b/app/services/labels/promote_service.rb @@ -19,6 +19,7 @@ module Labels # We skipped validations during creation. Let's run them now, after deleting conflicting labels raise ActiveRecord::RecordInvalid.new(new_label) unless new_label.valid? + new_label end end diff --git a/app/services/merge_requests/build_service.rb b/app/services/merge_requests/build_service.rb index bc0e7ad4e39..f3b99e1ec8c 100644 --- a/app/services/merge_requests/build_service.rb +++ b/app/services/merge_requests/build_service.rb @@ -28,6 +28,7 @@ module MergeRequests def find_target_project return target_project if target_project.present? && can?(current_user, :read_project, target_project) + project.default_merge_request_target end diff --git a/app/services/projects/group_links/destroy_service.rb b/app/services/projects/group_links/destroy_service.rb index fbf31214c28..e3a20b4c1e4 100644 --- a/app/services/projects/group_links/destroy_service.rb +++ b/app/services/projects/group_links/destroy_service.rb @@ -3,6 +3,7 @@ module Projects class DestroyService < BaseService def execute(group_link) return false unless group_link + group_link.destroy end end diff --git a/app/services/todo_service.rb b/app/services/todo_service.rb index e694c5761da..575853fd66b 100644 --- a/app/services/todo_service.rb +++ b/app/services/todo_service.rb @@ -208,6 +208,7 @@ class TodoService def create_todos(users, attributes) Array(users).map do |user| next if pending_todos(user, attributes).exists? + todo = Todo.create(attributes.merge(user_id: user.id)) user.update_todos_count_cache todo |