Commit 8686917b authored by Lin Jen-Shin's avatar Lin Jen-Shin

Use prepended where we're prepending

parent d5d1dcce
......@@ -12,7 +12,7 @@ module EE
end
end
included do
prepended do
before_action :authorize_update_group_member!, only: [:update, :override]
end
......
......@@ -3,14 +3,12 @@ module EE
extend ActiveSupport::Concern
extend ::Gitlab::Utils::Override
included do
include ::Emails::AdminNotification
include ::Emails::CsvExport
include ::Emails::ServiceDesk
include ::Emails::Epics
include ::Emails::AdminNotification
include ::Emails::CsvExport
include ::Emails::ServiceDesk
include ::Emails::Epics
attr_reader :group
end
attr_reader :group
private
......
......@@ -2,7 +2,7 @@ module EE
module ProtectedBranch
extend ActiveSupport::Concern
included do
prepended do
protected_ref_access_levels :unprotect
end
......
......@@ -10,7 +10,7 @@ module EE
extend ActiveSupport::Concern
extend ::Gitlab::Utils::Override
included do
prepended do
belongs_to :user
belongs_to :group
......
......@@ -19,7 +19,15 @@ module EE
CONTAINER_SCANNING_FILE = 'gl-container-scanning-report.json'.freeze
DAST_FILE = 'gl-dast-report.json'.freeze
included do
prepended do
scope :code_quality, -> { where(name: %w[codeclimate codequality code_quality]) }
scope :performance, -> { where(name: %w[performance deploy]) }
scope :sast, -> { where(name: 'sast') }
scope :dependency_scanning, -> { where(name: 'dependency_scanning') }
scope :license_management, -> { where(name: 'license_management') }
scope :sast_container, -> { where(name: %w[sast:container container_scanning]) }
scope :dast, -> { where(name: 'dast') }
after_save :stick_build_if_status_changed
end
......
......@@ -8,7 +8,7 @@ module EE
size_limit_exceeded: 21
}.freeze
included do
prepended do
has_one :chat_data, class_name: 'Ci::PipelineChatData'
scope :with_security_reports, -> {
......
......@@ -4,7 +4,7 @@ module EE
include ::Approvable
included do
prepended do
has_many :approvals, dependent: :delete_all # rubocop:disable Cop/ActiveRecordDependent
has_many :approved_by_users, through: :approvals, source: :user
has_many :approvers, as: :target, dependent: :delete_all # rubocop:disable Cop/ActiveRecordDependent
......
......@@ -17,7 +17,7 @@ module EE
extend ActiveSupport::Concern
included do
prepended do
validates :auth_method, inclusion: { in: %w[password ssh_public_key] }, allow_blank: true
# We should generate a key even if there's no SSH URL present
......
......@@ -9,7 +9,7 @@ module EE
MIRROR_REMOTE = "upstream".freeze
included do
prepended do
delegate :checksum, to: :raw_repository
end
......
......@@ -11,7 +11,7 @@ module EE
DEFAULT_ROADMAP_LAYOUT = 'months'.freeze
included do
prepended do
EMAIL_OPT_IN_SOURCE_ID_GITLAB_COM = 1
# We aren't using the `auditor?` method for the `if` condition here
......
......@@ -3,7 +3,7 @@ module EE
module BoardsResponses
extend ActiveSupport::Concern
included do
prepended do
helpers do
def create_board
forbidden! unless board_parent.multiple_issue_boards_available?
......
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