This instance was upgraded to Heptapod 0.27.2 on 2021-12-08 at 22:00 UTC+1

Commit 0bcbdaaf authored by 🙈  jacopo beschi 🙉's avatar 🙈 jacopo beschi 🙉 Committed by Robert Speicher
Browse files

Adds Rubocop rule for line break around conditionals

parent 41c44f0d233f
......@@ -65,6 +65,7 @@ def assign_builds_and_projects
else
Project.all
end
@projects = @projects.where.not(id: runner.projects.select(:id)) if runner.projects.any?
@projects = @projects.page(params[:page]).per(30)
end
......
......@@ -8,6 +8,7 @@ def render_group_tree(groups)
# Only show root groups if no parent-id is given
groups.where(parent_id: params[:parent_id])
end
@groups = @groups.with_selects_for_list(archived: params[:archived])
.sort(@sort = params[:sort])
.page(params[:page])
......
......@@ -32,6 +32,7 @@ def ensure_canonical_path(routable, requested_full_path)
if canonical_path.casecmp(requested_full_path) != 0
flash[:notice] = "#{routable.class.to_s.titleize} '#{requested_full_path}' was moved to '#{canonical_path}'. Please update any links and bookmarks that may still have the old path."
end
redirect_to build_canonical_path(routable)
end
end
......
......@@ -12,6 +12,7 @@ def index
)
"# Metrics are disabled, see: #{help_page}\n"
end
render text: response, content_type: 'text/plain; version=0.0.4'
end
......
......@@ -83,6 +83,7 @@ def cas3
if ticket
handle_service_ticket oauth['provider'], ticket
end
handle_omniauth
end
......@@ -90,6 +91,7 @@ def authentiq
if params['sid']
handle_service_ticket oauth['provider'], params['sid']
end
handle_omniauth
end
......@@ -124,6 +126,7 @@ def continue_login_process
# Only allow properly saved users to login.
if @user.persisted? && @user.valid?
log_audit_event(@user, with: oauth['provider'])
if @user.two_factor_enabled?
params[:remember_me] = '1' if remember_me?
prompt_for_two_factor(@user)
......
......@@ -150,6 +150,7 @@ def editor_variables
if params[:file].present?
params[:file_name] = params[:file].original_filename
end
File.join(@path, params[:file_name])
elsif params[:file_path].present?
params[:file_path]
......
......@@ -27,6 +27,7 @@ def create
unless @key.valid? && @project.deploy_keys << @key
flash[:alert] = @key.errors.full_messages.join(', ').html_safe
end
redirect_to_repository_settings(@project)
end
......
......@@ -21,6 +21,7 @@ def create
@hooks = @project.hooks.select(&:persisted?)
flash[:alert] = @hook.errors.full_messages.join.html_safe
end
redirect_to project_settings_integrations_path(@project)
end
......
......@@ -48,6 +48,7 @@ def diffs
else
[]
end
@diff_notes_disabled = true
@environment = @merge_request.environments_for(current_user).last
......
......@@ -203,6 +203,7 @@ def remove_export
else
flash[:alert] = _("Project export could not be deleted.")
end
redirect_to(edit_project_path(@project))
end
......
......@@ -28,6 +28,7 @@ def create
resource.update_attributes(reset_password_token: nil,
reset_password_sent_at: nil)
end
# hide the signed-in notification
flash[:notice] = nil
log_audit_event(current_user, resource, with: authentication_method)
......
......@@ -63,6 +63,7 @@ def all_visible_descendant_groups
groups_table = Group.arel_table
visible_to_user = groups_table[:visibility_level]
.in(Gitlab::VisibilityLevel.levels_for_user(current_user))
if current_user
authorized_groups = GroupsFinder.new(current_user,
all_available: false)
......@@ -115,6 +116,7 @@ def subgroups
else
direct_child_groups
end
groups.with_selects_for_list(archived: params[:archived]).order_by(sort)
end
......@@ -140,6 +142,7 @@ def projects
else
direct_child_projects
end
projects.with_route.order_by(sort)
end
......
......@@ -34,6 +34,7 @@ def init_collection
else
collection_without_user
end
union(projects)
end
......
......@@ -203,6 +203,7 @@ def truncate_visible(text, max_chars)
node.content = node.content.truncate(num_remaining)
truncated = true
end
content_length += node.content.length
end
......
......@@ -12,6 +12,7 @@ def page_gutter_class
current_path?('projects/merge_requests/conflicts#show') ||
current_path?('issues#show') ||
current_path?('milestones#show')
if cookies[:collapsed_gutter] == 'true'
%w[page-gutter right-sidebar-collapsed]
else
......
......@@ -89,6 +89,7 @@ def chunk_snippet(snippet, query, surrounding_lines = 3)
snippet_chunk = [lined_content[line_number]]
snippet_start_line = line_number
end
last_line = line_number
end
# Add final chunk to chunk array
......
......@@ -58,6 +58,7 @@ def self_url?(url, namespace, project)
url_no_dotgit = url.chomp('.git')
return true if url_no_dotgit == [Gitlab.config.gitlab.url, '/', namespace, '/',
project].join('')
url_with_dotgit = url_no_dotgit + '.git'
url_with_dotgit == Gitlab::Shell.new.url_to_repo([namespace, '/', project].join(''))
end
......
......@@ -30,6 +30,7 @@ def todo_target_link(todo)
else
todo.target_reference
end
link_to text, todo_target_path(todo), class: 'has-tooltip', title: todo.target.title
end
......
......@@ -418,6 +418,7 @@ def performance_bar_allowed_group_id=(group_full_path)
super(group_full_path)
Gitlab::PerformanceBar.expire_allowed_user_ids_cache
end
return
end
......
......@@ -314,6 +314,7 @@ def notes_with_associations
includes = []
includes << :author unless notes.authors_loaded?
includes << :award_emoji unless notes.award_emojis_loaded?
if includes.any?
notes.includes(includes)
else
......
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