Skip to content
Snippets Groups Projects
Verified Commit 7aa40b33 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets
Browse files

Fix rubocop violations

parent a50741de
No related branches found
No related tags found
1 merge request!1225CE upstream
Pipeline #
Loading
Loading
@@ -46,7 +46,7 @@ def find_kerberos_user
return unless krb_principal
 
identity = ::Identity.find_by(provider: :kerberos, extern_uid: krb_principal)
identity.user if identity
identity&.user
end
 
# The Kerberos backend will translate spnego_token into a Kerberos
Loading
Loading
Loading
Loading
@@ -126,7 +126,7 @@ def stop_with_action!(current_user)
return unless available?
 
stop!
stop_action.play(current_user) if stop_action
stop_action&.play(current_user)
end
 
def actions_for(environment)
Loading
Loading
Loading
Loading
@@ -95,7 +95,7 @@ def build_dependents
end
 
def update_dependents_attributes
self.geo_node_key.title = "Geo node: #{self.url}" if self.geo_node_key
self.geo_node_key&.title = "Geo node: #{self.url}"
 
if self.primary?
self.oauth_application = nil
Loading
Loading
Loading
Loading
@@ -508,7 +508,7 @@ def add_import_job
def reset_cache_and_import_attrs
ProjectCacheWorker.perform_async(self.id)
 
self.import_data&.destroy if !mirror?
self.import_data&.destroy unless mirror?
end
 
def import_url=(value)
Loading
Loading
Loading
Loading
@@ -943,11 +943,8 @@ def ff_merge(user, source, target_branch, merge_request: nil)
raise 'Invalid merge target' if our_commit.nil?
raise 'Invalid merge source' if their_commit.nil?
 
GitOperationService.new(user, self).with_branch(
target_branch) do |start_commit|
if merge_request
merge_request.update(in_progress_merge_commit_sha: their_commit.oid)
end
GitOperationService.new(user, self).with_branch(target_branch) do |start_commit|
merge_request&.update(in_progress_merge_commit_sha: their_commit.oid)
 
their_commit.oid
end
Loading
Loading
Loading
Loading
@@ -15,7 +15,7 @@ def execute
def before_create(issuable)
if @recaptcha_verified
spam_log = current_user.spam_logs.find_by(id: @spam_log_id, title: issuable.title)
spam_log.update!(recaptcha_verified: true) if spam_log
spam_log&.update!(recaptcha_verified: true)
else
issuable.spam = spam_service.check(@api)
issuable.spam_log = spam_service.spam_log
Loading
Loading
Loading
Loading
@@ -20,9 +20,9 @@ class AddGroupIdColumnsToProtectedBranchAccessLevels < ActiveRecord::Migration
 
def change
add_column :protected_branch_merge_access_levels, :group_id, :integer
add_foreign_key :protected_branch_merge_access_levels, :namespaces, column: :group_id
add_foreign_key :protected_branch_merge_access_levels, :namespaces, column: :group_id # rubocop: disable Migration/AddConcurrentForeignKey
 
add_column :protected_branch_push_access_levels, :group_id, :integer
add_foreign_key :protected_branch_push_access_levels, :namespaces, column: :group_id
add_foreign_key :protected_branch_push_access_levels, :namespaces, column: :group_id # rubocop: disable Migration/AddConcurrentForeignKey
end
end
Loading
Loading
@@ -20,6 +20,6 @@ def change
t.index :group_id
end
 
add_foreign_key :approver_groups, :namespaces, column: :group_id, on_delete: :cascade
add_foreign_key :approver_groups, :namespaces, column: :group_id, on_delete: :cascade # rubocop: disable Migration/AddConcurrentForeignKey
end
end
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment