Commit 3b33db63 authored by Lin Jen-Shin's avatar Lin Jen-Shin

Merge branch 'ee-56392-enable-the-layout-extraspacing-cop' into 'master'

[EE] Enable the Layout/ExtraSpacing cop

Closes gitlab-ce#56392

See merge request gitlab-org/gitlab-ee!9290
parents 5ff494d3 cebfe79a
...@@ -15,12 +15,6 @@ Capybara/CurrentPathExpectation: ...@@ -15,12 +15,6 @@ Capybara/CurrentPathExpectation:
Layout/EmptyLinesAroundArguments: Layout/EmptyLinesAroundArguments:
Enabled: false Enabled: false
# Offense count: 253
# Cop supports --auto-correct.
# Configuration parameters: AllowForAlignment, ForceEqualSignAlignment.
Layout/ExtraSpacing:
Enabled: false
# Offense count: 83 # Offense count: 83
# Cop supports --auto-correct. # Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle, IndentationWidth. # Configuration parameters: EnforcedStyle, IndentationWidth.
......
...@@ -5,7 +5,7 @@ class PasswordsController < Devise::PasswordsController ...@@ -5,7 +5,7 @@ class PasswordsController < Devise::PasswordsController
before_action :resource_from_email, only: [:create] before_action :resource_from_email, only: [:create]
before_action :check_password_authentication_available, only: [:create] before_action :check_password_authentication_available, only: [:create]
before_action :throttle_reset, only: [:create] before_action :throttle_reset, only: [:create]
# rubocop: disable CodeReuse/ActiveRecord # rubocop: disable CodeReuse/ActiveRecord
def edit def edit
......
...@@ -24,10 +24,10 @@ class Projects::CommitController < Projects::ApplicationController ...@@ -24,10 +24,10 @@ class Projects::CommitController < Projects::ApplicationController
apply_diff_view_cookie! apply_diff_view_cookie!
respond_to do |format| respond_to do |format|
format.html do format.html do
render render
end end
format.diff do format.diff do
send_git_diff(@project.repository, @commit.diff_refs) send_git_diff(@project.repository, @commit.diff_refs)
end end
format.patch do format.patch do
......
...@@ -40,7 +40,7 @@ class Projects::DiscussionsController < Projects::ApplicationController ...@@ -40,7 +40,7 @@ class Projects::DiscussionsController < Projects::ApplicationController
def render_json_with_discussions_serializer def render_json_with_discussions_serializer
render json: render json:
DiscussionSerializer.new(project: project, noteable: discussion.noteable, current_user: current_user, note_entity: ProjectNoteEntity) DiscussionSerializer.new(project: project, noteable: discussion.noteable, current_user: current_user, note_entity: ProjectNoteEntity)
.represent(discussion, context: self, render_truncated_diff_lines: true) .represent(discussion, context: self, render_truncated_diff_lines: true)
end end
......
...@@ -55,7 +55,7 @@ class Projects::MergeRequestsController < Projects::MergeRequests::ApplicationCo ...@@ -55,7 +55,7 @@ class Projects::MergeRequestsController < Projects::MergeRequests::ApplicationCo
render json: serializer.represent(@merge_request, serializer: params[:serializer]) render json: serializer.represent(@merge_request, serializer: params[:serializer])
end end
format.patch do format.patch do
break render_404 unless @merge_request.diff_refs break render_404 unless @merge_request.diff_refs
send_git_patch @project.repository, @merge_request.diff_refs send_git_patch @project.repository, @merge_request.diff_refs
......
...@@ -18,7 +18,7 @@ class Projects::PagesController < Projects::ApplicationController ...@@ -18,7 +18,7 @@ class Projects::PagesController < Projects::ApplicationController
project.pages_domains.destroy_all # rubocop: disable DestroyAll project.pages_domains.destroy_all # rubocop: disable DestroyAll
respond_to do |format| respond_to do |format|
format.html do format.html do
redirect_to project_pages_path(@project), redirect_to project_pages_path(@project),
status: 302, status: 302,
notice: 'Pages were removed' notice: 'Pages were removed'
......
...@@ -8,7 +8,7 @@ module Types ...@@ -8,7 +8,7 @@ module Types
abilities :change_namespace, :change_visibility_level, :rename_project, abilities :change_namespace, :change_visibility_level, :rename_project,
:remove_project, :archive_project, :remove_fork_project, :remove_project, :archive_project, :remove_fork_project,
:remove_pages, :read_project, :create_merge_request_in, :remove_pages, :read_project, :create_merge_request_in,
:read_wiki, :read_project_member, :create_issue, :upload_file, :read_wiki, :read_project_member, :create_issue, :upload_file,
:read_cycle_analytics, :download_code, :download_wiki_code, :read_cycle_analytics, :download_code, :download_wiki_code,
:fork_project, :create_project_snippet, :read_commit_status, :fork_project, :create_project_snippet, :read_commit_status,
:request_access, :create_pipeline, :create_pipeline_schedule, :request_access, :create_pipeline, :create_pipeline_schedule,
......
...@@ -31,7 +31,7 @@ module AuthHelper ...@@ -31,7 +31,7 @@ module AuthHelper
def form_based_provider_with_highest_priority def form_based_provider_with_highest_priority
@form_based_provider_with_highest_priority ||= begin @form_based_provider_with_highest_priority ||= begin
form_based_provider_priority.each do |provider_regexp| form_based_provider_priority.each do |provider_regexp|
highest_priority = form_based_providers.find { |provider| provider.match?(provider_regexp) } highest_priority = form_based_providers.find { |provider| provider.match?(provider_regexp) }
break highest_priority unless highest_priority.nil? break highest_priority unless highest_priority.nil?
end end
end end
......
...@@ -209,7 +209,7 @@ module IssuablesHelper ...@@ -209,7 +209,7 @@ module IssuablesHelper
end end
def issuable_labels_tooltip(labels, limit: 5) def issuable_labels_tooltip(labels, limit: 5)
first, last = labels.partition.with_index { |_, i| i < limit } first, last = labels.partition.with_index { |_, i| i < limit }
if labels && labels.any? if labels && labels.any?
label_names = first.collect { |label| label.fetch(:title) } label_names = first.collect { |label| label.fetch(:title) }
......
...@@ -154,7 +154,7 @@ module Clusters ...@@ -154,7 +154,7 @@ module Clusters
def build_kube_client! def build_kube_client!
raise "Incomplete settings" unless api_url raise "Incomplete settings" unless api_url
raise "No namespace" if cluster.project_type? && actual_namespace.empty? # can probably remove this line once we remove #actual_namespace raise "No namespace" if cluster.project_type? && actual_namespace.empty? # can probably remove this line once we remove #actual_namespace
unless (username && password) || token unless (username && password) || token
raise "Either username/password or token is required to access API" raise "Either username/password or token is required to access API"
......
...@@ -85,11 +85,11 @@ module HasStatus ...@@ -85,11 +85,11 @@ module HasStatus
scope :running, -> { where(status: 'running') } scope :running, -> { where(status: 'running') }
scope :pending, -> { where(status: 'pending') } scope :pending, -> { where(status: 'pending') }
scope :success, -> { where(status: 'success') } scope :success, -> { where(status: 'success') }
scope :failed, -> { where(status: 'failed') } scope :failed, -> { where(status: 'failed') }
scope :canceled, -> { where(status: 'canceled') } scope :canceled, -> { where(status: 'canceled') }
scope :skipped, -> { where(status: 'skipped') } scope :skipped, -> { where(status: 'skipped') }
scope :manual, -> { where(status: 'manual') } scope :manual, -> { where(status: 'manual') }
scope :scheduled, -> { where(status: 'scheduled') } scope :scheduled, -> { where(status: 'scheduled') }
scope :alive, -> { where(status: [:created, :pending, :running]) } scope :alive, -> { where(status: [:created, :pending, :running]) }
scope :created_or_pending, -> { where(status: [:created, :pending]) } scope :created_or_pending, -> { where(status: [:created, :pending]) }
scope :running_or_pending, -> { where(status: [:running, :pending]) } scope :running_or_pending, -> { where(status: [:running, :pending]) }
......
...@@ -15,7 +15,7 @@ class Email < ActiveRecord::Base ...@@ -15,7 +15,7 @@ class Email < ActiveRecord::Base
after_commit :update_invalid_gpg_signatures, if: -> { previous_changes.key?('confirmed_at') } after_commit :update_invalid_gpg_signatures, if: -> { previous_changes.key?('confirmed_at') }
devise :confirmable devise :confirmable
self.reconfirmable = false # currently email can't be changed, no need to reconfirm self.reconfirmable = false # currently email can't be changed, no need to reconfirm
delegate :username, to: :user delegate :username, to: :user
......
...@@ -98,7 +98,7 @@ class Group < Namespace ...@@ -98,7 +98,7 @@ class Group < Namespace
def select_for_project_authorization def select_for_project_authorization
if current_scope.joins_values.include?(:shared_projects) if current_scope.joins_values.include?(:shared_projects)
joins('INNER JOIN namespaces project_namespace ON project_namespace.id = projects.namespace_id') joins('INNER JOIN namespaces project_namespace ON project_namespace.id = projects.namespace_id')
.where('project_namespace.share_with_group_lock = ?', false) .where('project_namespace.share_with_group_lock = ?', false)
.select("projects.id AS project_id, LEAST(project_group_links.group_access, members.access_level) AS access_level") .select("projects.id AS project_id, LEAST(project_group_links.group_access, members.access_level) AS access_level")
else else
super super
......
...@@ -76,7 +76,7 @@ class Member < ActiveRecord::Base ...@@ -76,7 +76,7 @@ class Member < ActiveRecord::Base
scope :maintainers, -> { active.where(access_level: MAINTAINER) } scope :maintainers, -> { active.where(access_level: MAINTAINER) }
scope :masters, -> { maintainers } # @deprecated scope :masters, -> { maintainers } # @deprecated
scope :owners, -> { active.where(access_level: OWNER) } scope :owners, -> { active.where(access_level: OWNER) }
scope :owners_and_maintainers, -> { active.where(access_level: [OWNER, MAINTAINER]) } scope :owners_and_maintainers, -> { active.where(access_level: [OWNER, MAINTAINER]) }
scope :owners_and_masters, -> { owners_and_maintainers } # @deprecated scope :owners_and_masters, -> { owners_and_maintainers } # @deprecated
scope :order_name_asc, -> { left_join_users.reorder(Gitlab::Database.nulls_last_order('users.name', 'ASC')) } scope :order_name_asc, -> { left_join_users.reorder(Gitlab::Database.nulls_last_order('users.name', 'ASC')) }
......
...@@ -30,7 +30,7 @@ class Milestone < ActiveRecord::Base ...@@ -30,7 +30,7 @@ class Milestone < ActiveRecord::Base
has_internal_id :iid, scope: :group, init: ->(s) { s&.group&.milestones&.maximum(:iid) } has_internal_id :iid, scope: :group, init: ->(s) { s&.group&.milestones&.maximum(:iid) }
has_many :issues has_many :issues
has_many :labels, -> { distinct.reorder('labels.title') }, through: :issues has_many :labels, -> { distinct.reorder('labels.title') }, through: :issues
has_many :merge_requests has_many :merge_requests
has_many :events, as: :target, dependent: :destroy # rubocop:disable Cop/ActiveRecordDependent has_many :events, as: :target, dependent: :destroy # rubocop:disable Cop/ActiveRecordDependent
......
...@@ -59,7 +59,7 @@ class IrkerService < Service ...@@ -59,7 +59,7 @@ class IrkerService < Service
' append "?key=secretpassword" to the URI (Note that due to a bug, if you ' \ ' append "?key=secretpassword" to the URI (Note that due to a bug, if you ' \
' want to use a password, you have to omit the "#" on the channel). If you ' \ ' want to use a password, you have to omit the "#" on the channel). If you ' \
' specify a default IRC URI to prepend before each recipient, you can just ' \ ' specify a default IRC URI to prepend before each recipient, you can just ' \
' give a channel name.' }, ' give a channel name.' },
{ type: 'checkbox', name: 'colorize_messages' } { type: 'checkbox', name: 'colorize_messages' }
] ]
end end
......
...@@ -50,11 +50,11 @@ class Snippet < ActiveRecord::Base ...@@ -50,11 +50,11 @@ class Snippet < ActiveRecord::Base
validates :visibility_level, inclusion: { in: Gitlab::VisibilityLevel.values } validates :visibility_level, inclusion: { in: Gitlab::VisibilityLevel.values }
# Scopes # Scopes
scope :are_internal, -> { where(visibility_level: Snippet::INTERNAL) } scope :are_internal, -> { where(visibility_level: Snippet::INTERNAL) }
scope :are_private, -> { where(visibility_level: Snippet::PRIVATE) } scope :are_private, -> { where(visibility_level: Snippet::PRIVATE) }
scope :are_public, -> { where(visibility_level: Snippet::PUBLIC) } scope :are_public, -> { where(visibility_level: Snippet::PUBLIC) }
scope :public_and_internal, -> { where(visibility_level: [Snippet::PUBLIC, Snippet::INTERNAL]) } scope :public_and_internal, -> { where(visibility_level: [Snippet::PUBLIC, Snippet::INTERNAL]) }
scope :fresh, -> { order("created_at DESC") } scope :fresh, -> { order("created_at DESC") }
scope :inc_relations_for_view, -> { includes(author: :status) } scope :inc_relations_for_view, -> { includes(author: :status) }
participant :author participant :author
......
...@@ -145,7 +145,7 @@ class User < ActiveRecord::Base ...@@ -145,7 +145,7 @@ class User < ActiveRecord::Base
has_many :issue_assignees has_many :issue_assignees
has_many :assigned_issues, class_name: "Issue", through: :issue_assignees, source: :issue has_many :assigned_issues, class_name: "Issue", through: :issue_assignees, source: :issue
has_many :assigned_merge_requests, dependent: :nullify, foreign_key: :assignee_id, class_name: "MergeRequest" # rubocop:disable Cop/ActiveRecordDependent has_many :assigned_merge_requests, dependent: :nullify, foreign_key: :assignee_id, class_name: "MergeRequest" # rubocop:disable Cop/ActiveRecordDependent
has_many :custom_attributes, class_name: 'UserCustomAttribute' has_many :custom_attributes, class_name: 'UserCustomAttribute'
has_many :callouts, class_name: 'UserCallout' has_many :callouts, class_name: 'UserCallout'
......
...@@ -59,7 +59,7 @@ class PipelineEntity < Grape::Entity ...@@ -59,7 +59,7 @@ class PipelineEntity < Grape::Entity
pipeline.present.failure_reason pipeline.present.failure_reason
end end
expose :retry_path, if: -> (*) { can_retry? } do |pipeline| expose :retry_path, if: -> (*) { can_retry? } do |pipeline|
retry_project_pipeline_path(pipeline.project, pipeline) retry_project_pipeline_path(pipeline.project, pipeline)
end end
......
...@@ -50,7 +50,7 @@ module Boards ...@@ -50,7 +50,7 @@ module Boards
if move_between_ids if move_between_ids
attrs[:move_between_ids] = move_between_ids attrs[:move_between_ids] = move_between_ids
attrs[:board_group_id] = board.group&.id attrs[:board_group_id] = board.group&.id
end end
attrs attrs
......
...@@ -20,7 +20,7 @@ module Boards ...@@ -20,7 +20,7 @@ module Boards
# rubocop: disable CodeReuse/ActiveRecord # rubocop: disable CodeReuse/ActiveRecord
def decrement_higher_lists(list) def decrement_higher_lists(list)
board.lists.movable.where('position > ?', list.position) board.lists.movable.where('position > ?', list.position)
.update_all('position = position - 1') .update_all('position = position - 1')
end end
# rubocop: enable CodeReuse/ActiveRecord # rubocop: enable CodeReuse/ActiveRecord
......
...@@ -49,7 +49,7 @@ module Labels ...@@ -49,7 +49,7 @@ module Labels
.new(current_user, title: new_label.title, group_id: project.group.id) .new(current_user, title: new_label.title, group_id: project.group.id)
.execute(skip_authorization: true) .execute(skip_authorization: true)
.where.not(id: new_label) .where.not(id: new_label)
.select(:id) # Can't use pluck() to avoid object-creation because of the batching .select(:id) # Can't use pluck() to avoid object-creation because of the batching
end end
# rubocop: enable CodeReuse/ActiveRecord # rubocop: enable CodeReuse/ActiveRecord
......
...@@ -104,7 +104,7 @@ ...@@ -104,7 +104,7 @@
- link_to_help = link_to(_("here"), help_page_path("user/permissions")) - link_to_help = link_to(_("here"), help_page_path("user/permissions"))
= _('Read more about project permissions <strong>%{link_to_help}</strong>').html_safe % { link_to_help: link_to_help } = _('Read more about project permissions <strong>%{link_to_help}</strong>').html_safe % { link_to_help: link_to_help }
= form_tag admin_group_members_update_path(@group), id: "new_project_member", class: "bulk_import", method: :put do = form_tag admin_group_members_update_path(@group), id: "new_project_member", class: "bulk_import", method: :put do
%div %div
= users_select_tag(:user_ids, multiple: true, email_user: true, skip_ldap: @group.ldap_synced?, scope: :all) = users_select_tag(:user_ids, multiple: true, email_user: true, skip_ldap: @group.ldap_synced?, scope: :all)
.prepend-top-10 .prepend-top-10
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
- tooltip = "#{subject.name} - #{status.status_tooltip}" - tooltip = "#{subject.name} - #{status.status_tooltip}"
- if status.has_details? - if status.has_details?
= link_to status.details_path, class: 'mini-pipeline-graph-dropdown-item', data: { toggle: 'tooltip', title: tooltip, container: 'body' } do = link_to status.details_path, class: 'mini-pipeline-graph-dropdown-item', data: { toggle: 'tooltip', title: tooltip, container: 'body' } do
%span{ class: klass }= sprite_icon(status.icon) %span{ class: klass }= sprite_icon(status.icon)
%span.ci-build-text= subject.name %span.ci-build-text= subject.name
...@@ -16,5 +16,5 @@ ...@@ -16,5 +16,5 @@
%span.ci-build-text= subject.name %span.ci-build-text= subject.name
- if status.has_action? - if status.has_action?
= link_to status.action_path, class: "ci-action-icon-container ci-action-icon-wrapper js-ci-action-icon", method: status.action_method, data: { toggle: 'tooltip', title: status.action_title, container: 'body' } do = link_to status.action_path, class: "ci-action-icon-container ci-action-icon-wrapper js-ci-action-icon", method: status.action_method, data: { toggle: 'tooltip', title: status.action_title, container: 'body' } do
= sprite_icon(status.action_icon, css_class: "icon-action-#{status.action_icon}") = sprite_icon(status.action_icon, css_class: "icon-action-#{status.action_icon}")
- @hide_top_links = true - @hide_top_links = true
- page_title "Groups" - page_title "Groups"
- header_title "Groups", dashboard_groups_path - header_title "Groups", dashboard_groups_path
= render_if_exists "shared/gold_trial_callout" = render_if_exists "shared/gold_trial_callout"
= render 'dashboard/groups_head' = render 'dashboard/groups_head'
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
= f.hidden_field :reset_password_token = f.hidden_field :reset_password_token
.form-group .form-group
= f.label 'New password', for: "user_password" = f.label 'New password', for: "user_password"
= f.password_field :password, class: "form-control top qa-password-field", required: true, title: 'This field is required' = f.password_field :password, class: "form-control top qa-password-field", required: true, title: 'This field is required'
.form-group .form-group
= f.label 'Confirm new password', for: "user_password_confirmation" = f.label 'Confirm new password', for: "user_password_confirmation"
= f.password_field :password_confirmation, class: "form-control bottom qa-password-confirmation", title: 'This field is required', required: true = f.password_field :password_confirmation, class: "form-control bottom qa-password-confirmation", title: 'This field is required', required: true
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
- resource_params = params[resource_name].presence || params - resource_params = params[resource_name].presence || params
= f.hidden_field :remember_me, value: resource_params.fetch(:remember_me, 0) = f.hidden_field :remember_me, value: resource_params.fetch(:remember_me, 0)
%div %div
= f.label 'Two-Factor Authentication code', name: :otp_attempt = f.label 'Two-Factor Authentication code', name: :otp_attempt
= f.text_field :otp_attempt, class: 'form-control', required: true, autofocus: true, autocomplete: 'off', title: 'This field is required.' = f.text_field :otp_attempt, class: 'form-control', required: true, autofocus: true, autocomplete: 'off', title: 'This field is required.'
%p.form-text.text-muted.hint Enter the code from the two-factor app on your mobile device. If you've lost your device, you may enter one of your recovery codes. %p.form-text.text-muted.hint Enter the code from the two-factor app on your mobile device. If you've lost your device, you may enter one of your recovery codes.
.prepend-top-20 .prepend-top-20
......
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
%strong= t scope, scope: [:doorkeeper, :scopes] %strong= t scope, scope: [:doorkeeper, :scopes]
.text-secondary= t scope, scope: [:doorkeeper, :scope_desc] .text-secondary= t scope, scope: [:doorkeeper, :scope_desc]
.form-actions.text-right .form-actions.text-right
= form_tag oauth_authorization_path, method: :delete, class: 'inline' do = form_tag oauth_authorization_path, method: :delete, class: 'inline' do
= hidden_field_tag :client_id, @pre_auth.client.uid = hidden_field_tag :client_id, @pre_auth.client.uid
= hidden_field_tag :redirect_uri, @pre_auth.redirect_uri = hidden_field_tag :redirect_uri, @pre_auth.redirect_uri
= hidden_field_tag :state, @pre_auth.state = hidden_field_tag :state, @pre_auth.state
......
...@@ -21,6 +21,6 @@ ...@@ -21,6 +21,6 @@
= link_to note.attachment.url, target: '_blank' do = link_to note.attachment.url, target: '_blank' do
= image_tag note.attachment.url, class: 'note-image-attach' = image_tag note.attachment.url, class: 'note-image-attach'
- else - else
= link_to note.attachment.url, target: '_blank', class: 'note-file-attach' do = link_to note.attachment.url, target: '_blank', class: 'note-file-attach' do
%i.fa.fa-paperclip %i.fa.fa-paperclip
= note.attachment_identifier = note.attachment_identifier
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
Members with access to Members with access to
%strong= @group.name %strong= @group.name
%span.badge= @members.total_count %span.badge= @members.total_count
= form_tag group_group_members_path(@group), method: :get, class: 'form-inline member-search-form flex-project-members-form' do = form_tag group_group_members_path(@group), method: :get, class: 'form-inline member-search-form flex-project-members-form' do
.form-group .form-group
.position-relative.append-right-8 .position-relative.append-right-8
= search_field_tag :search, params[:search], { placeholder: 'Find existing members by name', class: 'form-control', spellcheck: false } = search_field_tag :search, params[:search], { placeholder: 'Find existing members by name', class: 'form-control', spellcheck: false }
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
= render 'shared/issuable/nav', type: :merge_requests = render 'shared/issuable/nav', type: :merge_requests
- if current_user - if current_user
.nav-controls .nav-controls
= render 'shared/new_project_item_select', path: 'merge_requests/new', label: "New merge request", type: :merge_requests, with_feature_enabled: 'merge_requests', with_shared: false, include_projects_in_subgroups: true = render 'shared/new_project_item_select', path: 'merge_requests/new', label: "New merge request", type: :merge_requests, with_feature_enabled: 'merge_requests', with_shared: false, include_projects_in_subgroups: true
= render 'shared/issuable/search_bar', type: :merge_requests = render 'shared/issuable/search_bar', type: :merge_requests
......
= form_for [@group, @milestone], html: { class: 'milestone-form common-note-form js-quick-submit js-requires-input' } do |f| = form_for [@group, @milestone], html: { class: 'milestone-form common-note-form js-quick-submit js-requires-input' } do |f|
.row .row
= form_errors(@milestone) = form_errors(@milestone)
...@@ -24,4 +24,3 @@ ...@@ -24,4 +24,3 @@
- else - else
= f.submit 'Update milestone', class: "btn-success btn" = f.submit 'Update milestone', class: "btn-success btn"
= link_to "Cancel", group_milestone_path(@group, @milestone), class: "btn btn-cancel" = link_to "Cancel", group_milestone_path(@group, @milestone), class: "btn btn-cancel"
...@@ -11,20 +11,20 @@ ...@@ -11,20 +11,20 @@
%meta{ 'http-equiv' => 'X-UA-Compatible', content: 'IE=edge' } %meta{ 'http-equiv' => 'X-UA-Compatible', content: 'IE=edge' }
-# Open Graph - http://ogp.me/ -# Open Graph - http://ogp.me/
%meta{ property: 'og:type', content: "object" } %meta{ property: 'og:type', content: "object" }
%meta{ property: 'og:site_name', content: site_name } %meta{ property: 'og:site_name', content: site_name }
%meta{ property: 'og:title', content: page_title } %meta{ property: 'og:title', content: page_title }
%meta{ property: 'og:description', content: page_description } %meta{ property: 'og:description', content: page_description }
%meta{ property: 'og:image', content: page_image } %meta{ property: 'og:image', content: page_image }
%meta{ property: 'og:image:width', content: '64' } %meta{ property: 'og:image:width', content: '64' }
%meta{ property: 'og:image:height', content: '64' } %meta{ property: 'og:image:height', content: '64' }
%meta{ property: 'og:url', content: request.base_url + request.fullpath } %meta{ property: 'og:url', content: request.base_url + request.fullpath }
-# Twitter Card - https://dev.twitter.com/cards/types/summary -# Twitter Card - https://dev.twitter.com/cards/types/summary
%meta{ property: 'twitter:card', content: "summary" } %meta{ property: 'twitter:card', content: "summary" }
%meta{ property: 'twitter:title', content: page_title } %meta{ property: 'twitter:title', content: page_title }
%meta{ property: 'twitter:description', content: page_description } %meta{ property: 'twitter:description', content: page_description }
%meta{ property: 'twitter:image', content: page_image } %meta{ property: 'twitter:image', content: page_image }
= page_card_meta_tags = page_card_meta_tags
%title= page_title(site_name) %title= page_title(site_name)
...@@ -33,8 +33,8 @@ ...@@ -33,8 +33,8 @@
= favicon_link_tag favicon, id: 'favicon', data: { original_href: favicon }, type: 'image/png' = favicon_link_tag favicon, id: 'favicon', data: { original_href: favicon }, type: 'image/png'
= stylesheet_link_tag "application", media: "all" = stylesheet_link_tag "application", media: "all"
= stylesheet_link_tag "print", media: "print" = stylesheet_link_tag "print", media: "print"
= stylesheet_link_tag "test", media: "all" if Rails.env.test? = stylesheet_link_tag "test", media: "all" if Rails.env.test?
= stylesheet_link_tag 'performance_bar' if performance_bar_enabled? = stylesheet_link_tag 'performance_bar' if performance_bar_enabled?
= stylesheet_link_tag 'csslab' if Feature.enabled?(:csslab) = stylesheet_link_tag 'csslab' if Feature.enabled?(:csslab)
...@@ -61,10 +61,10 @@ ...@@ -61,10 +61,10 @@
%meta{ name: 'theme-color', content: '#474D57' } %meta{ name: 'theme-color', content: '#474D57' }
-# Apple Safari/iOS home screen icons -# Apple Safari/iOS home screen icons
= favicon_link_tag 'touch-icon-iphone.png', rel: 'apple-touch-icon' = favicon_link_tag 'touch-icon-iphone.png', rel: 'apple-touch-icon'
= favicon_link_tag 'touch-icon-ipad.png', rel: 'apple-touch-icon', sizes: '76x76' = favicon_link_tag 'touch-icon-ipad.png', rel: 'apple-touch-icon', sizes: '76x76'
= favicon_link_tag 'touch-icon-iphone-retina.png', rel: 'apple-touch-icon', sizes: '120x120' = favicon_link_tag 'touch-icon-iphone-retina.png', rel: 'apple-touch-icon', sizes: '120x120'
= favicon_link_tag 'touch-icon-ipad-retina.png', rel: 'apple-touch-icon', sizes: '152x152' = favicon_link_tag 'touch-icon-ipad-retina.png', rel: 'apple-touch-icon', sizes: '152x152'
%link{ rel: 'mask-icon', href: image_path('logo.svg'), color: 'rgb(226, 67, 41)' } %link{ rel: 'mask-icon', href: image_path('logo.svg'), color: 'rgb(226, 67, 41)' }
-# Windows 8 pinned site tile -# Windows 8 pinned site tile
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
= render "layouts/init_client_detection_flags" = render "layouts/init_client_detection_flags"
= render 'peek/bar' = render 'peek/bar'
= header_message = header_message
= render partial: "layouts/header/default", locals: { project: @project, group: @group } = render partial: "layouts/header/default", locals: { project: @project, group: @group }
= render 'layouts/page', sidebar: sidebar, nav: nav = render 'layouts/page', sidebar: sidebar, nav: nav
= footer_message = footer_message
......
- page_title @group.name - page_title @group.name
- page_description @group.description unless page_description - page_description @group.description unless page_description
- header_title group_title(@group) unless header_title - header_title group_title(@group) unless header_title
- nav "group" - nav "group"
- @left_sidebar = true - @left_sidebar = true
- content_for :page_specific_javascripts do - content_for :page_specific_javascripts do
......
%li.header-new.dropdown{ data: { track_label: "new_dropdown", track_event: "click_dropdown" } } %li.header-new.dropdown{ data: { track_label: "new_dropdown", track_event: "click_dropdown" } }
= link_to new_project_path, class: "header-new-dropdown-toggle has-tooltip qa-new-menu-toggle", title: _("New..."), ref: 'tooltip', aria: { label: _("New...") }, data: { toggle: 'dropdown', placement: 'bottom', container: 'body', display: 'static' } do = link_to new_project_path, class: "header-new-dropdown-toggle has-tooltip qa-new-menu-toggle", title: _("New..."), ref: 'tooltip', aria: { label: _("New...") }, data: { toggle: 'dropdown', placement: 'bottom', container: 'body', display: 'static' } do
= sprite_icon('plus-square', size: 16) = sprite_icon('plus-square', size: 16)
= sprite_icon('angle-down', css_class: 'caret-down') = sprite_icon('angle-down', css_class: 'caret-down')
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
= render "layouts/nav/projects_dropdown/show" = render "layouts/nav/projects_dropdown/show"
- if dashboard_nav_link?(:groups) - if dashboard_nav_link?(:groups)
= nav_link(controller: ['dashboard/groups', 'explore/groups'], html_options: { id: 'nav-groups-dropdown', class: "home dropdown header-groups qa-groups-dropdown", data: { track_label: "groups_dropdown", track_event: "click_dropdown" } }) do = nav_link(controller: ['dashboard/groups', 'explore/groups'], html_options: { id: 'nav-groups-dropdown', class: "home dropdown header-groups qa-groups-dropdown", data: { track_label: "groups_dropdown", track_event: "click_dropdown" } }) do
%button{ type: 'button', data: { toggle: "dropdown" } } %button{ type: 'button', data: { toggle: "dropdown" } }
= _('Groups') = _('Groups')
= sprite_icon('angle-down', css_class: 'caret-down') = sprite_icon('angle-down', css_class: 'caret-down')
......
...@@ -170,7 +170,7 @@ ...@@ -170,7 +170,7 @@
= _('CI / CD') = _('CI / CD')
%ul.sidebar-sub-level-items %ul.sidebar-sub-level-items
= nav_link(controller: [:pipelines, :builds, :jobs, :pipeline_schedules, :artifacts], html_options: { class: "fly-out-top-item" } ) do = nav_link(controller: [:pipelines, :builds, :jobs, :pipeline_schedules, :artifacts], html_options: { class: "fly-out-top-item" }) do
= link_to project_pipelines_path(@project) do = link_to project_pipelines_path(@project) do
%strong.fly-out-top-item-name %strong.fly-out-top-item-name
= _('CI / CD') = _('CI / CD')
......
- header_title _("Snippets"), snippets_path - header_title _("Snippets"), snippets_path
- content_for :page_specific_javascripts do - content_for :page_specific_javascripts do
- if @snippet && current_user - if @snippet && current_user
......
...@@ -33,9 +33,9 @@ ...@@ -33,9 +33,9 @@
%p %p
Once the exported file is ready, you will receive a notification email with a download link, or you can download it from this page. Once the exported file is ready, you will receive a notification email with a download link, or you can download it from this page.
- if project.export_status == :finished - if project.export_status == :finished
= link_to 'Download export', download_export_project_path(project), = link_to 'Download export', download_export_project_path(project),
rel: 'nofollow', download: '', method: :get, class: "btn btn-default" rel: 'nofollow', download: '', method: :get, class: "btn btn-default"
= link_to 'Generate new export', generate_new_export_project_path(project), = link_to 'Generate new export', generate_new_export_project_path(project),
method: :post, class: "btn btn-default" method: :post, class: "btn btn-default"
- else - else
= link_to 'Export project', export_project_path(project), = link_to 'Export project', export_project_path(project),
......
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
= sprite_icon('tag', size: 16, css_class: 'icon append-right-4') = sprite_icon('tag', size: 16, css_class: 'icon append-right-4')
= @project.topics_to_show = @project.topics_to_show
- if @project.has_extra_topics? - if @project.has_extra_topics?
= _("+ %{count} more") % { count: @project.count_of_extra_topics_not_shown } = _("+ %{count} more") % { count: @project.count_of_extra_topics_not_shown }
.project-repo-buttons.col-md-12.col-lg-6.d-inline-flex.flex-wrap.justify-content-lg-end .project-repo-buttons.col-md-12.col-lg-6.d-inline-flex.flex-wrap.justify-content-lg-end
......
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
= clipboard_button(target: '#issuable_email', class: 'btn btn-clipboard input-group-text btn-transparent d-none d-sm-block') = clipboard_button(target: '#issuable_email', class: 'btn btn-clipboard input-group-text btn-transparent d-none d-sm-block')
- if issuable_type == 'issue' - if issuable_type == 'issue'
- enter_title_text = _('Enter the issue title') - enter_title_text = _('Enter the issue title')
- enter_description_text = _('Enter the issue description') - enter_description_text = _('Enter the issue description')
- else - else
- enter_title_text = _('Enter the merge request title') - enter_title_text = _('Enter the merge request title')
......
...@@ -43,7 +43,7 @@ ...@@ -43,7 +43,7 @@
= f.label :description, class: 'label-bold' do = f.label :description, class: 'label-bold' do
Project description Project description
%span (optional) %span (optional)
= f.text_area :description, placeholder: 'Description format', class: "form-control", rows: 3, maxlength: 250, data: { track_label: "#{track_label}", track_event: "activate_form_input", track_property: "project_description", track_value: "" } = f.text_area :description, placeholder: 'Description format', class: "form-control", rows: 3, maxlength: 250, data: { track_label: "#{track_label}", track_event: "activate_form_input", track_property: "project_description", track_value: "" }
= f.label :visibility_level, class: 'label-bold' do = f.label :visibility_level, class: 'label-bold' do
Visibility Level Visibility Level
......
...@@ -35,8 +35,8 @@ ...@@ -35,8 +35,8 @@
- elsif can_collaborate_with_project?(@project) - elsif can_collaborate_with_project?(@project)
%li= link_to _('New file'), project_new_blob_path(@project, @project.default_branch || 'master') %li= link_to _('New file'), project_new_blob_path(@project, @project.default_branch || 'master')
- elsif create_mr_from_new_fork - elsif create_mr_from_new_fork
- continue_params = { to: project_new_blob_path(@project, @project.default_branch || 'master'), - continue_params = { to: project_new_blob_path(@project, @project.default_branch || 'master'),
notice: edit_in_new_fork_notice, notice: edit_in_new_fork_notice,
notice_now: edit_in_new_fork_notice_now } notice_now: edit_in_new_fork_notice_now }
- fork_path = project_forks_path(@project, namespace_key: current_user.namespace.id, continue: continue_params) - fork_path = project_forks_path(@project, namespace_key: current_user.namespace.id, continue: continue_params)
%li= link_to _('New file'), fork_path, method: :post %li= link_to _('New file'), fork_path, method: :post
...@@ -49,7 +49,7 @@ ...@@ -49,7 +49,7 @@
#{ _('Download') } #{ _('Download') }
- unless @commit.parents.length > 1 - unless @commit.parents.length > 1
%li= link_to s_("DownloadCommit|Email Patches"), project_commit_path(@project, @commit, format: :patch), class: "qa-email-patches" %li= link_to s_("DownloadCommit|Email Patches"), project_commit_path(@project, @commit, format: :patch), class: "qa-email-patches"
%li= link_to s_("DownloadCommit|Plain Diff"), project_commit_path(@project, @commit, format: :diff), class: "qa-plain-diff" %li= link_to s_("DownloadCommit|Plain Diff"), project_commit_path(@project, @commit, format: :diff), class: "qa-plain-diff"
.commit-box{ data: { project_path: project_path(@project) } } .commit-box{ data: { project_path: project_path(@project) } }
%h3.commit-title %h3.commit-title
......
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
= render partial: 'projects/issues/merge_requests_status', locals: { merge_request: merge_request, css_class: 'd-none d-xl-block append-right-8' } = render partial: 'projects/issues/merge_requests_status', locals: { merge_request: merge_request, css_class: 'd-none d-xl-block append-right-8' }
= link_to merge_request.title, merge_request_path(merge_request), { class: 'mr-title-link'} = link_to merge_request.title, merge_request_path(merge_request), { class: 'mr-title-link'}
.item-meta .item-meta
= render partial: 'projects/issues/merge_requests_status', locals: { merge_request: merge_request, css_class: 'd-xl-none d-lg-block append-right-5' } = render partial: 'projects/issues/merge_requests_status', locals: { merge_request: merge_request, css_class: 'd-xl-none d-lg-block append-right-5' }
%span.d-flex.align-items-center.append-right-8.mr-item-path.item-path-id.mt-0 %span.d-flex.align-items-center.append-right-8.mr-item-path.item-path-id.mt-0
%span.path-id-text.bold.text-truncate{ data: { toggle: 'tooltip'}, title: merge_request.target_project.full_path } %span.path-id-text.bold.text-truncate{ data: { toggle: 'tooltip'}, title: merge_request.target_project.full_path }
= merge_request.target_project.full_path = merge_request.target_project.full_path
......
...@@ -18,5 +18,5 @@ ...@@ -18,5 +18,5 @@
- mr_status_tooltip = "<div><span class=\"bold\">#{mr_status_title}</span> #{time_ago_in_words(mr_status_date)} ago</div><span class=\"text-tertiary\">#{l(mr_status_date.to_time, format: time_format)}</span>" - mr_status_tooltip = "<div><span class=\"bold\">#{mr_status_title}</span> #{time_ago_in_words(mr_status_date)} ago</div><span class=\"text-tertiary\">#{l(mr_status_date.to_time, format: time_format)}</span>"
%span.mr-status-wrapper.suggestion-help-hover{ class: css_class, data: { toggle: 'tooltip', placement: 'bottom', html: 'true', title: mr_status_tooltip } } %span.mr-status-wrapper.suggestion-help-hover{ class: css_class, data: { toggle: 'tooltip', placement: 'bottom', html: 'true', title: mr_status_tooltip } }
= sprite_icon(mr_status_icon, size: 16, css_class: "merge-request-status #{mr_status_class}") = sprite_icon(mr_status_icon, size: 16, css_class: "merge-request-status #{mr_status_class}")
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
= icon('check', class: 'icon') = icon('check', class: 'icon')
= _('Create merge request and branch') = _('Create merge request and branch')
%li{ class: [!can_create_merge_request && 'droplab-item-selected'], role: 'button', data: { value: 'create-branch', text: _('Create branch') } } %li{ class: [!can_create_merge_request && 'droplab-item-selected'], role: 'button', data: { value: 'create-branch', text: _('Create branch') } }
.menu-item .menu-item
= icon('check', class: 'icon') = icon('check', class: 'icon')
= _('Create branch') = _('Create branch')
......
= form_for [@project.namespace.becomes(Namespace), @project, @milestone], = form_for [@project.namespace.becomes(Namespace), @project, @milestone],
html: {class: 'milestone-form common-note-form js-quick-submit js-requires-input'}, html: { class: 'milestone-form common-note-form js-quick-submit js-requires-input' },
data: { markdown_version: @milestone.cached_markdown_version } do |f| data: { markdown_version: @milestone.cached_markdown_version } do |f|
= form_errors(@milestone) = form_errors(@milestone)
.row .row
.col-md-6 .col-md-6
......
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
= n_('Reveal value', 'Reveal values', @schedule.variables.size) = n_('Reveal value', 'Reveal values', @schedule.variables.size)
.form-group.row .form-group.row
.col-md-9 .col-md-9
= f.label :active, s_('PipelineSchedules|Activated'), class: 'label-bold' = f.label :active, s_('PipelineSchedules|Activated'), class: 'label-bold'
%div %div
= f.check_box :active, required: false, value: @schedule.active? = f.check_box :active, required: false, value: @schedule.active?
= _('Active') = _('Active')
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
%span.flex-project-title %span.flex-project-title
= _("Members of <strong>%{project_name}</strong>").html_safe % { project_name: sanitize_project_name(project.name) } = _("Members of <strong>%{project_name}</strong>").html_safe % { project_name: sanitize_project_name(project.name) }
%span.badge.badge-pill= members.total_count %span.badge.badge-pill= members.total_count
= form_tag project_project_members_path(project), method: :get, class: 'form-inline member-search-form flex-project-members-form' do = form_tag project_project_members_path(project), method: :get, class: 'form-inline member-search-form flex-project-members-form' do
.form-group .form-group
.position-relative .position-relative
= search_field_tag :search, params[:search], { placeholder: _('Find existing members by name'), class: 'form-control', spellcheck: false } = search_field_tag :search, params[:search], { placeholder: _('Find existing members by name'), class: 'form-control', spellcheck: false }
......
...@@ -12,6 +12,6 @@ ...@@ -12,6 +12,6 @@
%a.btn.btn-default.append-right-10{ href: template.preview, rel: 'noopener noreferrer', target: '_blank', data: { track_label: "create_from_template", track_property: "template_preview", track_event: "click_button", track_value: template.name } } %a.btn.btn-default.append-right-10{ href: template.preview, rel: 'noopener noreferrer', target: '_blank', data: { track_label: "create_from_template", track_property: "template_preview", track_event: "click_button", track_value: template.name } }
= _("Preview") = _("Preview")
%label.btn.btn-success.template-button.choose-template.append-bottom-0{ for: template.name } %label.btn.btn-success.template-button.choose-template.append-bottom-0{ for: template.name }
%input{ type: "radio", autocomplete: "off", name: "project[template_name]", id: template.name, value: template.name, data: { track_label: "create_from_template", track_property: "template_use", track_event: "click_button" } } %input{ type: "radio", autocomplete: "off", name: "project[template_name]", id: template.name, value: template.name, data: { track_label: "create_from_template", track_property: "template_use", track_event: "click_button" } }
%span %span
= _("Use template") = _("Use template")
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
- status_path = project_serverless_functions_path(@project, format: :json) - status_path = project_serverless_functions_path(@project, format: :json)
- clusters_path = project_clusters_path(@project) - clusters_path = project_clusters_path(@project)
.serverless-functions-page.js-serverless-functions-page{ data: { status_path: status_path, installed: @installed, clusters_path: clusters_path, help_path: help_page_path('user/project/clusters/serverless/index') } } .serverless-functions-page.js-serverless-functions-page{ data: { status_path: status_path, installed: @installed, clusters_path: clusters_path, help_path: help_page_path('user/project/clusters/serverless/index') } }
%div{ class: [container_class, ('limit-container-width' unless fluid_layout)] } %div{ class: [container_class, ('limit-container-width' unless fluid_layout)] }
.js-serverless-functions-notice .js-serverless-functions-notice
......
...@@ -40,27 +40,24 @@ ...@@ -40,27 +40,24 @@
#{ _('New directory') } #{ _('New directory') }
- elsif can?(current_user, :fork_project, @project) && can?(current_user, :create_merge_request_in, @project) - elsif can?(current_user, :fork_project, @project) && can?(current_user, :create_merge_request_in, @project)
%li %li
- continue_params = { to: project_new_blob_path(@project, @id), - continue_params = { to: project_new_blob_path(@project, @id),
notice: edit_in_new_fork_notice, notice: edit_in_new_fork_notice,
notice_now: edit_in_new_fork_notice_now } notice_now: edit_in_new_fork_notice_now }
- fork_path = project_forks_path(@project, namespace_key: current_user.namespace.id, - fork_path = project_forks_path(@project, namespace_key: current_user.namespace.id, continue: continue_params)
continue: continue_params)
= link_to fork_path, method: :post do = link_to fork_path, method: :post do
#{ _('New file') } #{ _('New file') }
%li %li
- continue_params = { to: request.fullpath, - continue_params = { to: request.fullpath,
notice: edit_in_new_fork_notice + " Try to upload a file again.", notice: edit_in_new_fork_notice + " Try to upload a file again.",
notice_now: edit_in_new_fork_notice_now } notice_now: edit_in_new_fork_notice_now }
- fork_path = project_forks_path(@project, namespace_key: current_user.namespace.id, - fork_path = project_forks_path(@project, namespace_key: current_user.namespace.id, continue: continue_params)
continue: continue_params)
= link_to fork_path, method: :post do = link_to fork_path, method: :post do
#{ _('Upload file') } #{ _('Upload file') }
%li %li
- continue_params = { to: request.fullpath, - continue_params = { to: request.fullpath,
notice: edit_in_new_fork_notice + " Try to create a new directory again.", notice: edit_in_new_fork_notice + " Try to create a new directory again.",
notice_now: edit_in_new_fork_notice_now } notice_now: edit_in_new_fork_notice_now }
- fork_path = project_forks_path(@project, namespace_key: current_user.namespace.id, - fork_path = project_forks_path(@project, namespace_key: current_user.namespace.id, continue: continue_params)
continue: continue_params)
= link_to fork_path, method: :post do = link_to fork_path, method: :post do
#{ _('New directory') } #{ _('New directory') }
......
%board-sidebar{ "inline-template" => true, ":current-user" => (UserSerializer.new.represent(current_user) || {}).to_json } %board-sidebar{ "inline-template" => true, ":current-user" => (UserSerializer.new.represent(current_user) || {}).to_json }
%transition{ name: "boards-sidebar-slide" } %transition{ name: "boards-sidebar-slide" }
%aside.right-sidebar.right-sidebar-expanded.issue-boards-sidebar{ "v-show" => "showSidebar" } %aside.right-sidebar.right-sidebar-expanded.issue-boards-sidebar{ "v-show" => "showSidebar" }
.issuable-sidebar .issuable-sidebar
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
%aside.issues-bulk-update.js-right-sidebar.right-sidebar{ "aria-live" => "polite", data: { 'signed-in': current_user.present? } } %aside.issues-bulk-update.js-right-sidebar.right-sidebar{ "aria-live" => "polite", data: { 'signed-in': current_user.present? } }
.issuable-sidebar.hidden .issuable-sidebar.hidden
= form_tag [:bulk_update, @project.namespace.becomes(Namespace), @project, type], method: :post, class: "bulk-update" do = form_tag [:bulk_update, @project.namespace.becomes(Namespace), @project, type], method: :post, class: "bulk-update" do
.block.issuable-sidebar-header .block.issuable-sidebar-header
.filter-item.inline.update-issues-btn.float-left .filter-item.inline.update-issues-btn.float-left
= button_tag "Update all", class: "btn update-selected-issues btn-info", disabled: true = button_tag "Update all", class: "btn update-selected-issues btn-info", disabled: true
...@@ -50,4 +50,3 @@ ...@@ -50,4 +50,3 @@
= hidden_field_tag "update[issuable_ids]", [] = hidden_field_tag "update[issuable_ids]", []
= hidden_field_tag :state_event, params[:state_event] = hidden_field_tag :state_event, params[:state_event]
...@@ -17,7 +17,7 @@ class NamespacelessProjectDestroyWorker ...@@ -17,7 +17,7 @@ class NamespacelessProjectDestroyWorker
return return
end end
return if project.namespace # Reject doing anything for projects that *do* have a namespace return if project.namespace # Reject doing anything for projects that *do* have a namespace
project.team.truncate project.team.truncate
......
...@@ -19,7 +19,7 @@ if defined?(Unicorn) ...@@ -19,7 +19,7 @@ if defined?(Unicorn)
Unicorn::StreamInput.send(:public, :eof?) # rubocop:disable GitlabSecurity/PublicSend Unicorn::StreamInput.send(:public, :eof?) # rubocop:disable GitlabSecurity/PublicSend
end end
require ::File.expand_path('../config/environment', __FILE__) require ::File.expand_path('../config/environment', __FILE__)
warmup do |app| warmup do |app|
client = Rack::MockRequest.new(app) client = Rack::MockRequest.new(app)
......
...@@ -7,7 +7,7 @@ Settings.ldap['enabled'] = false if Settings.ldap['enabled'].nil? ...@@ -7,7 +7,7 @@ Settings.ldap['enabled'] = false if Settings.ldap['enabled'].nil?
Settings.ldap['sync_time'] = 3600 if Settings.ldap['sync_time'].nil? Settings.ldap['sync_time'] = 3600 if Settings.ldap['sync_time'].nil?
Settings.ldap['schedule_sync_daily'] = 1 if Settings.ldap['schedule_sync_daily'].nil? Settings.ldap['schedule_sync_daily'] = 1 if Settings.ldap['schedule_sync_daily'].nil?
Settings.ldap['schedule_sync_hour'] = 1 if Settings.ldap['schedule_sync_hour'].nil? Settings.ldap['schedule_sync_hour'] = 1 if Settings.ldap['schedule_sync_hour'].nil?
Settings.ldap['schedule_sync_minute'] = 30 if Settings.ldap['schedule_sync_minute'].nil? Settings.ldap['schedule_sync_minute'] = 30 if Settings.ldap['schedule_sync_minute'].nil?
# backwards compatibility, we only have one host # backwards compatibility, we only have one host
if Settings.ldap['enabled'] || Rails.env.test? if Settings.ldap['enabled'] || Rails.env.test?
......
...@@ -178,7 +178,7 @@ Devise.setup do |config| ...@@ -178,7 +178,7 @@ Devise.setup do |config|
# Configure the default scope given to Warden. By default it's the first # Configure the default scope given to Warden. By default it's the first
# devise role declared in your routes (usually :user). # devise role declared in your routes (usually :user).
config.default_scope = :user # now have an :email scope as well, so set the default config.default_scope = :user # now have an :email scope as well, so set the default
# Configure sign_out behavior. # Configure sign_out behavior.
# Sign_out action can be scoped (i.e. /users/sign_out affects only :user scope). # Sign_out action can be scoped (i.e. /users/sign_out affects only :user scope).
......
...@@ -31,7 +31,7 @@ Doorkeeper::OpenidConnect.configure do ...@@ -31,7 +31,7 @@ Doorkeeper::OpenidConnect.configure do
o.claim(:name) { |user| user.name } o.claim(:name) { |user| user.name }
o.claim(:nickname) { |user| user.username } o.claim(:nickname) { |user| user.username }
o.claim(:email) { |user| user.public_email } o.claim(:email) { |user| user.public_email }
o.claim(:email_verified) { |user| true if user.public_email? } o.claim(:email_verified) { |user| true if user.public_email? }
o.claim(:website) { |user| user.full_website_url if user.website_url? } o.claim(:website) { |user| user.full_website_url if user.website_url? }
o.claim(:profile) { |user| Gitlab::Routing.url_helpers.user_url user } o.claim(:profile) { |user| Gitlab::Routing.url_helpers.user_url user }
......
...@@ -108,7 +108,7 @@ module ActiveRecord ...@@ -108,7 +108,7 @@ module ActiveRecord
when String when String
with_value with_value
when Hash when Hash
with_value.map do |name, expression| with_value.map do |name, expression|
case expression case expression
when String when String
select = Arel::Nodes::SqlLiteral.new "(#{expression})" select = Arel::Nodes::SqlLiteral.new "(#{expression})"
......
...@@ -62,7 +62,7 @@ scope format: false do ...@@ -62,7 +62,7 @@ scope format: false do
resources :protected_tags, only: [:index, :show, :create, :update, :destroy] resources :protected_tags, only: [:index, :show, :create, :update, :destroy]
end end
scope constraints: { id: /.+/ } do scope constraints: { id: /.+/ } do
scope controller: :blob do scope controller: :blob do
get '/new/*id', action: :new, as: :new_blob get '/new/*id', action: :new, as: :new_blob
post '/create/*id', action: :create, as: :create_blob post '/create/*id', action: :create, as: :create_blob
......
...@@ -28,7 +28,7 @@ class AddCiBuildsIndexForJobscontroller < ActiveRecord::Migration[4.2] ...@@ -28,7 +28,7 @@ class AddCiBuildsIndexForJobscontroller < ActiveRecord::Migration[4.2]
disable_ddl_transaction! disable_ddl_transaction!
def up def up
add_concurrent_index :ci_builds, [:project_id, :id] unless index_exists? :ci_builds, [:project_id, :id] add_concurrent_index :ci_builds, [:project_id, :id] unless index_exists? :ci_builds, [:project_id, :id]
remove_concurrent_index :ci_builds, :project_id if index_exists? :ci_builds, :project_id remove_concurrent_index :ci_builds, :project_id if index_exists? :ci_builds, :project_id
end end
......
...@@ -48,7 +48,7 @@ class UpdateUploadPathsToSystem < ActiveRecord::Migration[4.2] ...@@ -48,7 +48,7 @@ class UpdateUploadPathsToSystem < ActiveRecord::Migration[4.2]
end end
def new_upload_dir def new_upload_dir
File.join(base_directory, "-", "system") File.join(base_directory, "-", "system")
end end
def arel_table def arel_table
......
...@@ -49,7 +49,7 @@ module EE ...@@ -49,7 +49,7 @@ module EE
url_helper :user_group_saml_omniauth_metadata url_helper :user_group_saml_omniauth_metadata
def user_group_saml_omniauth_metadata_path(group) def user_group_saml_omniauth_metadata_path(group)
params = { group_path: group.path, token: group.saml_discovery_token } params = { group_path: group.path, token: group.saml_discovery_token }
path = '/users/auth/group_saml/metadata' path = '/users/auth/group_saml/metadata'
ActionDispatch::Http::URL.path_for(path: path, params: params) ActionDispatch::Http::URL.path_for(path: path, params: params)
......
# frozen_string_literal: true # frozen_string_literal: true
class Approver < ActiveRecord::Base class Approver < ActiveRecord::Base
belongs_to :target, polymorphic: true # rubocop:disable Cop/PolymorphicAssociations belongs_to :target, polymorphic: true # rubocop:disable Cop/PolymorphicAssociations
belongs_to :user belongs_to :user
include ApproverMigrateHook include ApproverMigrateHook
......
# frozen_string_literal: true # frozen_string_literal: true
class ApproverGroup < ActiveRecord::Base class ApproverGroup < ActiveRecord::Base
belongs_to :target, polymorphic: true # rubocop:disable Cop/PolymorphicAssociations belongs_to :target, polymorphic: true # rubocop:disable Cop/PolymorphicAssociations
belongs_to :group belongs_to :group
include ApproverMigrateHook include ApproverMigrateHook
......
...@@ -59,7 +59,7 @@ class DraftNote < ActiveRecord::Base ...@@ -59,7 +59,7 @@ class DraftNote < ActiveRecord::Base
end end
def type def type
return 'DiffNote' if on_diff? return 'DiffNote' if on_diff?
return 'DiscussionNote' if discussion_id.present? return 'DiscussionNote' if discussion_id.present?
'Note' 'Note'
......
...@@ -9,10 +9,10 @@ module EE ...@@ -9,10 +9,10 @@ module EE
cache_markdown_field :footer_message, pipeline: :broadcast_message cache_markdown_field :footer_message, pipeline: :broadcast_message
validates :message_background_color, allow_blank: true, color: true validates :message_background_color, allow_blank: true, color: true
validates :message_font_color, allow_blank: true, color: true validates :message_font_color, allow_blank: true, color: true
default_value_for :message_background_color, '#E75E40' default_value_for :message_background_color, '#E75E40'
default_value_for :message_font_color, '#FFFFFF' default_value_for :message_font_color, '#FFFFFF'
end end
def show_header? def show_header?
......
...@@ -248,7 +248,7 @@ module EE ...@@ -248,7 +248,7 @@ module EE
def to_reference(from = nil, full: false) def to_reference(from = nil, full: false)
reference = "#{self.class.reference_prefix}#{iid}" reference = "#{self.class.reference_prefix}#{iid}"
return reference unless (cross_reference?(from) && !group.projects.include?(from)) || full return reference unless (cross_reference?(from) && !group.projects.include?(from)) || full
"#{group.full_path}#{reference}" "#{group.full_path}#{reference}"
end end
......
...@@ -31,7 +31,7 @@ module EE ...@@ -31,7 +31,7 @@ module EE
has_many :epics, foreign_key: :author_id has_many :epics, foreign_key: :author_id
has_many :assigned_epics, foreign_key: :assignee_id, class_name: "Epic" has_many :assigned_epics, foreign_key: :assignee_id, class_name: "Epic"
has_many :path_locks, dependent: :destroy # rubocop: disable Cop/ActiveRecordDependent has_many :path_locks, dependent: :destroy # rubocop: disable Cop/ActiveRecordDependent
has_many :vulnerability_feedback, foreign_key: :author_id, class_name: 'Vulnerabilities::Feedback' has_many :vulnerability_feedback, foreign_key: :author_id, class_name: 'Vulnerabilities::Feedback'
has_many :approvals, dependent: :destroy # rubocop: disable Cop/ActiveRecordDependent has_many :approvals, dependent: :destroy # rubocop: disable Cop/ActiveRecordDependent
has_many :approvers, dependent: :destroy # rubocop: disable Cop/ActiveRecordDependent has_many :approvers, dependent: :destroy # rubocop: disable Cop/ActiveRecordDependent
......
...@@ -285,7 +285,7 @@ class Geo::ProjectRegistry < Geo::BaseRegistry ...@@ -285,7 +285,7 @@ class Geo::ProjectRegistry < Geo::BaseRegistry
# @see REGISTRY_TYPES # @see REGISTRY_TYPES
def should_be_redownloaded?(type) def should_be_redownloaded?(type)
ensure_valid_type!(type) ensure_valid_type!(type)
return true if public_send("force_to_redownload_#{type}") # rubocop:disable GitlabSecurity/PublicSend return true if public_send("force_to_redownload_#{type}") # rubocop:disable GitlabSecurity/PublicSend
retry_count(type) > RETRIES_BEFORE_REDOWNLOAD retry_count(type) > RETRIES_BEFORE_REDOWNLOAD
end end
......
...@@ -127,7 +127,7 @@ class GeoNode < ActiveRecord::Base ...@@ -127,7 +127,7 @@ class GeoNode < ActiveRecord::Base
end end
def url=(value) def url=(value)
value += '/' if value.present? && !value.end_with?('/') value += '/' if value.present? && !value.end_with?('/')
write_attribute(:url, value) write_attribute(:url, value)
...@@ -280,7 +280,7 @@ class GeoNode < ActiveRecord::Base ...@@ -280,7 +280,7 @@ class GeoNode < ActiveRecord::Base
errors.add(:url, 'scheme must be http or https') errors.add(:url, 'scheme must be http or https')
end end
rescue URI::InvalidURIError rescue URI::InvalidURIError
errors.add(:url, 'is invalid') errors.add(:url, 'is invalid')
end end
def update_clone_url def update_clone_url
......
...@@ -31,7 +31,7 @@ module EE ...@@ -31,7 +31,7 @@ module EE
# select projects which have allowed number of shared runner minutes or are public # select projects which have allowed number of shared runner minutes or are public
super super
.where("projects.visibility_level=? OR (#{builds_check_limit.to_sql})=1", # rubocop:disable GitlabSecurity/SqlInjection .where("projects.visibility_level=? OR (#{builds_check_limit.to_sql})=1", # rubocop:disable GitlabSecurity/SqlInjection
::Gitlab::VisibilityLevel::PUBLIC) ::Gitlab::VisibilityLevel::PUBLIC)
end end
# rubocop: enable CodeReuse/ActiveRecord # rubocop: enable CodeReuse/ActiveRecord
......
...@@ -39,7 +39,7 @@ ...@@ -39,7 +39,7 @@
- mr_created_count = @events.merge_requests.created.count - mr_created_count = @events.merge_requests.created.count
- mr_merged_count = @events.merge_requests.merged.count - mr_merged_count = @events.merge_requests.merged.count
- if mr_created_count > 0 || mr_merged_count > 0 - if mr_created_count > 0 || mr_merged_count > 0
= _('<strong>%{created_count}</strong> created, <strong>%{accepted_count}</strong> accepted.').html_safe % { created_count: mr_created_count, accepted_count: mr_merged_count } = _('<strong>%{created_count}</strong> created, <strong>%{accepted_count}</strong> accepted.').html_safe % { created_count: mr_created_count, accepted_count: mr_merged_count }
- else - else
= _('No merge requests for the selected time period.') = _('No merge requests for the selected time period.')
......
- breadcrumb_title _("Security Dashboard") - breadcrumb_title _("Security Dashboard")
- page_title _("Security Dashboard") - page_title _("Security Dashboard")
#js-group-security-dashboard{ data: { vulnerabilities_endpoint: group_security_vulnerabilities_path(@group), #js-group-security-dashboard{ data: { vulnerabilities_endpoint: group_security_vulnerabilities_path(@group),
vulnerabilities_summary_endpoint: summary_group_security_vulnerabilities_path(@group), vulnerabilities_summary_endpoint: summary_group_security_vulnerabilities_path(@group),
......
...@@ -6,4 +6,4 @@ ...@@ -6,4 +6,4 @@
"error-state-svg-path" => image_path('illustrations/feature_flag.svg'), "error-state-svg-path" => image_path('illustrations/feature_flag.svg'),
"feature-flags-help-page-path" => help_page_path("user/project/operations/feature_flags"), "feature-flags-help-page-path" => help_page_path("user/project/operations/feature_flags"),
"can-user-admin-feature-flag" => can?(current_user, :admin_feature_flag, @project), "can-user-admin-feature-flag" => can?(current_user, :admin_feature_flag, @project),
"new-feature-flag-path" => can?(current_user, :create_feature_flag, @project) ? new_project_feature_flag_path(@project): nil } } "new-feature-flag-path" => can?(current_user, :create_feature_flag, @project) ? new_project_feature_flag_path(@project): nil } }
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
%a.btn.btn-default.append-right-10{ href: project_path(template), rel: 'noopener noreferrer', target: '_blank' } %a.btn.btn-default.append-right-10{ href: project_path(template), rel: 'noopener noreferrer', target: '_blank' }
= _('Preview') = _('Preview')
%label.btn.btn-success.custom-template-button.choose-template.append-bottom-0{ for: template.name } %label.btn.btn-success.custom-template-button.choose-template.append-bottom-0{ for: template.name }
%input{ type: "radio", autocomplete: "off", name: "project[template_name]", id: template.name, value: template.name } %input{ type: "radio", autocomplete: "off", name: "project[template_name]", id: template.name, value: template.name }
%span %span
= _('Use template') = _('Use template')
......
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
%a.btn.btn-default.append-right-10{ href: project_path(project), rel: 'noopener noreferrer', target: '_blank' } %a.btn.btn-default.append-right-10{ href: project_path(project), rel: 'noopener noreferrer', target: '_blank' }
= _('Preview') = _('Preview')
%label.btn.btn-success.custom-template-button.choose-template.append-bottom-0{ for: project.name } %label.btn.btn-success.custom-template-button.choose-template.append-bottom-0{ for: project.name }
%input{ type: "radio", autocomplete: "off", name: "project[template_name]", id: project.name, value: project.name, data: { subgroup_id: project.namespace_id } } %input{ type: "radio", autocomplete: "off", name: "project[template_name]", id: project.name, value: project.name, data: { subgroup_id: project.namespace_id } }
%span.qa-use-template-button %span.qa-use-template-button
= _('Use template') = _('Use template')
......
...@@ -20,7 +20,7 @@ class AddFeatureFlagsToProjects < ActiveRecord::Migration[4.2] ...@@ -20,7 +20,7 @@ class AddFeatureFlagsToProjects < ActiveRecord::Migration[4.2]
t.index [:project_id, :name], unique: true t.index [:project_id, :name], unique: true
end end
create_table :operations_feature_flags_clients, id: :bigserial do |t| create_table :operations_feature_flags_clients, id: :bigserial do |t|
t.integer :project_id, null: false t.integer :project_id, null: false
t.string :token, null: false t.string :token, null: false
......
...@@ -6,7 +6,7 @@ class CreateVulnerabilityOccurrences < ActiveRecord::Migration[4.2] ...@@ -6,7 +6,7 @@ class CreateVulnerabilityOccurrences < ActiveRecord::Migration[4.2]
DOWNTIME = false DOWNTIME = false
def change def change
create_table :vulnerability_occurrences, id: :bigserial do |t| create_table :vulnerability_occurrences, id: :bigserial do |t|
t.timestamps_with_timezone null: false t.timestamps_with_timezone null: false
t.integer :severity, null: false, limit: 2 t.integer :severity, null: false, limit: 2
......
...@@ -9,7 +9,7 @@ class RecreateVulnerabilityOccurrencesAndVulnerabilityOccurrenceIdentifiers < Ac ...@@ -9,7 +9,7 @@ class RecreateVulnerabilityOccurrencesAndVulnerabilityOccurrenceIdentifiers < Ac
drop_table :vulnerability_occurrence_identifiers drop_table :vulnerability_occurrence_identifiers
drop_table :vulnerability_occurrences drop_table :vulnerability_occurrences
create_table :vulnerability_occurrences, id: :bigserial do |t| create_table :vulnerability_occurrences, id: :bigserial do |t|
t.timestamps_with_timezone null: false t.timestamps_with_timezone null: false
t.integer :severity, null: false, limit: 2 t.integer :severity, null: false, limit: 2
...@@ -62,7 +62,7 @@ class RecreateVulnerabilityOccurrencesAndVulnerabilityOccurrenceIdentifiers < Ac ...@@ -62,7 +62,7 @@ class RecreateVulnerabilityOccurrencesAndVulnerabilityOccurrenceIdentifiers < Ac
drop_table :vulnerability_occurrence_identifiers drop_table :vulnerability_occurrence_identifiers
drop_table :vulnerability_occurrences drop_table :vulnerability_occurrences
create_table :vulnerability_occurrences, id: :bigserial do |t| create_table :vulnerability_occurrences, id: :bigserial do |t|
t.timestamps_with_timezone null: false t.timestamps_with_timezone null: false
t.integer :severity, null: false, limit: 2 t.integer :severity, null: false, limit: 2
......
...@@ -7,7 +7,7 @@ class ChangeVulnOccurrenceColumns < ActiveRecord::Migration[4.2] ...@@ -7,7 +7,7 @@ class ChangeVulnOccurrenceColumns < ActiveRecord::Migration[4.2]
drop_table :vulnerability_occurrence_identifiers drop_table :vulnerability_occurrence_identifiers
drop_table :vulnerability_occurrences drop_table :vulnerability_occurrences
create_table :vulnerability_occurrences, id: :bigserial do |t| create_table :vulnerability_occurrences, id: :bigserial do |t|
t.timestamps_with_timezone null: false t.timestamps_with_timezone null: false
t.integer :severity, null: false, limit: 2 t.integer :severity, null: false, limit: 2
...@@ -59,7 +59,7 @@ class ChangeVulnOccurrenceColumns < ActiveRecord::Migration[4.2] ...@@ -59,7 +59,7 @@ class ChangeVulnOccurrenceColumns < ActiveRecord::Migration[4.2]
drop_table :vulnerability_occurrence_identifiers drop_table :vulnerability_occurrence_identifiers
drop_table :vulnerability_occurrences drop_table :vulnerability_occurrences
create_table :vulnerability_occurrences, id: :bigserial do |t| create_table :vulnerability_occurrences, id: :bigserial do |t|
t.timestamps_with_timezone null: false t.timestamps_with_timezone null: false
t.integer :severity, null: false, limit: 2 t.integer :severity, null: false, limit: 2
......
...@@ -27,7 +27,7 @@ module API ...@@ -27,7 +27,7 @@ module API
requires :id, type: String, desc: 'The ID of a project' requires :id, type: String, desc: 'The ID of a project'
end end
resource :projects, requirements: API::NAMESPACE_OR_PROJECT_REQUIREMENTS do resource :projects, requirements: API::NAMESPACE_OR_PROJECT_REQUIREMENTS do
desc 'Get project software license policies' do desc 'Get project software license policies' do
success Entities::ManagedLicense success Entities::ManagedLicense
end end
......
...@@ -350,7 +350,7 @@ module EE ...@@ -350,7 +350,7 @@ module EE
number_to_percentage(node.repositories_synced_in_percentage, precision: 2) number_to_percentage(node.repositories_synced_in_percentage, precision: 2)
end end
expose :wikis_count # Deprecated expose :wikis_count # Deprecated
expose :wikis_failed_count expose :wikis_failed_count
expose :wikis_synced_count expose :wikis_synced_count
expose :wikis_synced_in_percentage do |node| expose :wikis_synced_in_percentage do |node|
......
...@@ -84,7 +84,7 @@ module EE ...@@ -84,7 +84,7 @@ module EE
} }
results = count(::Ci::Build.where(name: types.keys).group(:name), fallback: Hash.new(-1)) results = count(::Ci::Build.where(name: types.keys).group(:name), fallback: Hash.new(-1))
results.each_with_object({}) { |(key, value), response| response[types[key.to_sym]] = value } results.each_with_object({}) { |(key, value), response| response[types[key.to_sym]] = value }
end end
# rubocop: enable CodeReuse/ActiveRecord # rubocop: enable CodeReuse/ActiveRecord
......
...@@ -31,7 +31,7 @@ namespace :gitlab do ...@@ -31,7 +31,7 @@ namespace :gitlab do
end end
desc "GitLab | Elasticsearch | Index project repositories" desc "GitLab | Elasticsearch | Index project repositories"
task index_repositories: :environment do task index_repositories: :environment do
print "Indexing project repositories..." print "Indexing project repositories..."
Sidekiq::Logging.logger = Logger.new(STDOUT) Sidekiq::Logging.logger = Logger.new(STDOUT)
...@@ -41,7 +41,7 @@ namespace :gitlab do ...@@ -41,7 +41,7 @@ namespace :gitlab do
end end
desc "GitLab | Elasticsearch | Index wiki repositories" desc "GitLab | Elasticsearch | Index wiki repositories"
task index_wikis: :environment do task index_wikis: :environment do
projects = apply_project_filters(Project.with_wiki_enabled) projects = apply_project_filters(Project.with_wiki_enabled)
projects.find_each do |project| projects.find_each do |project|
......
...@@ -278,7 +278,7 @@ describe Groups::EpicsController do ...@@ -278,7 +278,7 @@ describe Groups::EpicsController do
group.add_developer(user) group.add_developer(user)
end end
context 'with correct basic params' do context 'with correct basic params' do
it 'returns status 200' do it 'returns status 200' do
update_epic(epic, params) update_epic(epic, params)
......
...@@ -246,7 +246,7 @@ describe Groups::Security::VulnerabilitiesController do ...@@ -246,7 +246,7 @@ describe Groups::Security::VulnerabilitiesController do
end end
describe 'GET history.json' do describe 'GET history.json' do
subject { get :history, params: { group_id: group }, format: :json } subject { get :history, params: { group_id: group }, format: :json }
context 'when security dashboard feature is disabled' do context 'when security dashboard feature is disabled' do
before do before do
...@@ -350,7 +350,7 @@ describe Groups::Security::VulnerabilitiesController do ...@@ -350,7 +350,7 @@ describe Groups::Security::VulnerabilitiesController do
it 'returns filtered history if filters are enabled' do it 'returns filtered history if filters are enabled' do
travel_to(Time.zone.parse('2019-02-10')) do travel_to(Time.zone.parse('2019-02-10')) do
get :history, params: { group_id: group, report_type: %w[dependency_scanning sast] }, format: :json get :history, params: { group_id: group, report_type: %w[dependency_scanning sast] }, format: :json
end end
expect(response).to have_gitlab_http_status(200) expect(response).to have_gitlab_http_status(200)
......
...@@ -251,7 +251,7 @@ describe Projects::IssuesController do ...@@ -251,7 +251,7 @@ describe Projects::IssuesController do
end end
describe 'GET #discussions' do describe 'GET #discussions' do
let(:issue) { create(:issue, project: project) } let(:issue) { create(:issue, project: project) }
let!(:discussion) { create(:discussion_note_on_issue, noteable: issue, project: issue.project) } let!(:discussion) { create(:discussion_note_on_issue, noteable: issue, project: issue.project) }
context 'with a related system note' do context 'with a related system note' do
......
...@@ -5,7 +5,7 @@ describe UnsubscribesController do ...@@ -5,7 +5,7 @@ describe UnsubscribesController do
describe "show" do describe "show" do
it "responds with success" do it "responds with success" do
get :show, params: { email: Base64.urlsafe_encode64('me@example.com') } get :show, params: { email: Base64.urlsafe_encode64('me@example.com') }
assert_response :success assert_response :success
end end
......
...@@ -46,7 +46,7 @@ FactoryBot.define do ...@@ -46,7 +46,7 @@ FactoryBot.define do
trait :repository_sync_failed do trait :repository_sync_failed do
sync_failed sync_failed
last_wiki_successful_sync_at { 5.days.ago } last_wiki_successful_sync_at { 5.days.ago }
resync_wiki false resync_wiki false
wiki_retry_count nil wiki_retry_count nil
end end
......
...@@ -8,7 +8,7 @@ FactoryBot.define do ...@@ -8,7 +8,7 @@ FactoryBot.define do
factory :vulnerabilities_occurrence, class: Vulnerabilities::Occurrence do factory :vulnerabilities_occurrence, class: Vulnerabilities::Occurrence do
name 'Cipher with no integrity' name 'Cipher with no integrity'
project project
sequence(:uuid) { generate(:vulnerability_occurrence_uuid) } sequence(:uuid) { generate(:vulnerability_occurrence_uuid) }
project_fingerprint { generate(:project_fingerprint) } project_fingerprint { generate(:project_fingerprint) }
primary_identifier factory: :vulnerabilities_identifier primary_identifier factory: :vulnerabilities_identifier
location_fingerprint '4e5b6966dd100170b4b1ad599c7058cce91b57b4' location_fingerprint '4e5b6966dd100170b4b1ad599c7058cce91b57b4'
......
...@@ -2,8 +2,8 @@ require 'rails_helper' ...@@ -2,8 +2,8 @@ require 'rails_helper'
describe 'Manually create a todo item from epic', :js do describe 'Manually create a todo item from epic', :js do
let(:group) { create(:group) } let(:group) { create(:group) }
let(:epic) { create(:epic, group: group) } let(:epic) { create(:epic, group: group) }
let(:user) { create(:user)} let(:user) { create(:user)}
before do before do
stub_licensed_features(epics: true) stub_licensed_features(epics: true)
......
...@@ -3,8 +3,8 @@ require 'spec_helper' ...@@ -3,8 +3,8 @@ require 'spec_helper'
describe 'Edit group settings' do describe 'Edit group settings' do
include Select2Helper include Select2Helper
let(:user) { create(:user) } let(:user) { create(:user) }
let(:developer) { create(:user) } let(:developer) { create(:user) }
let(:group) { create(:group, path: 'foo') } let(:group) { create(:group, path: 'foo') }
before do before do
......
...@@ -6,7 +6,7 @@ describe 'Issues csv' do ...@@ -6,7 +6,7 @@ describe 'Issues csv' do
let(:milestone) { create(:milestone, title: 'v1.0', project: project) } let(:milestone) { create(:milestone, title: 'v1.0', project: project) }
let(:idea_label) { create(:label, project: project, title: 'Idea') } let(:idea_label) { create(:label, project: project, title: 'Idea') }
let(:feature_label) { create(:label, project: project, title: 'Feature', priority: 10) } let(:feature_label) { create(:label, project: project, title: 'Feature', priority: 10) }
let!(:issue) { create(:issue, project: project, author: user) } let!(:issue) { create(:issue, project: project, author: user) }
before do before do
sign_in(user) sign_in(user)
......
...@@ -47,7 +47,7 @@ describe 'Pipeline', :js do ...@@ -47,7 +47,7 @@ describe 'Pipeline', :js do
end end
describe 'GET /:project/pipelines/:id/licenses' do describe 'GET /:project/pipelines/:id/licenses' do
let(:pipeline) { create(:ci_pipeline, project: project, ref: 'master', sha: project.commit.id) } let(:pipeline) { create(:ci_pipeline, project: project, ref: 'master', sha: project.commit.id) }
before do before do
stub_licensed_features(license_management: true) stub_licensed_features(license_management: true)
......
...@@ -7,7 +7,7 @@ describe 'Promotions', :js do ...@@ -7,7 +7,7 @@ describe 'Promotions', :js do
let(:group) { create(:group) } let(:group) { create(:group) }
let(:project) { create(:project, :repository, namespace: group) } let(:project) { create(:project, :repository, namespace: group) }
let(:milestone) { create(:milestone, project: project, start_date: Date.today, due_date: 7.days.from_now) } let(:milestone) { create(:milestone, project: project, start_date: Date.today, due_date: 7.days.from_now) }
let!(:issue) { create(:issue, project: project, author: user) } let!(:issue) { create(:issue, project: project, author: user) }
let(:otherproject) { create(:project, :repository, namespace: otherdeveloper.namespace) } let(:otherproject) { create(:project, :repository, namespace: otherdeveloper.namespace) }
describe 'if you have a license' do describe 'if you have a license' do
......
require 'spec_helper' require 'spec_helper'
describe EpicsFinder do describe EpicsFinder do
let(:user) { create(:user) } let(:user) { create(:user) }
let(:search_user) { create(:user) } let(:search_user) { create(:user) }
let(:group) { create(:group, :private) } let(:group) { create(:group, :private) }
let(:another_group) { create(:group) } let(:another_group) { create(:group) }
let!(:epic1) { create(:epic, :opened, group: group, title: 'This is awesome epic', created_at: 1.week.ago) } let!(:epic1) { create(:epic, :opened, group: group, title: 'This is awesome epic', created_at: 1.week.ago) }
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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