class Gitlab::Dangerfiles::Config

Constants

DEFAULT_CHANGES_SIZE_THRESHOLDS
DEFAULT_COMMIT_MESSAGES_MAX_COMMITS_COUNT

Attributes

code_size_thresholds[RW]

@!attribute code_size_thresholds

@return [{ high: Integer, medium: Integer }] a hash of the form +{ high: 42, medium: 12 }+ where +:high+ is the lines changed threshold which triggers an error, and +:medium+ is the lines changed threshold which triggers a warning. Also, see +DEFAULT_CHANGES_SIZE_THRESHOLDS+ for the format of the hash.
max_commits_count[RW]

@!attribute max_commits_count

@return [Integer] the maximum number of allowed non-squashed/non-fixup commits for a given MR. A warning is triggered if the MR has more commits.

Public Class Methods

new() click to toggle source
# File lib/gitlab/dangerfiles/config.rb, line 17
def initialize
  @code_size_thresholds = DEFAULT_CHANGES_SIZE_THRESHOLDS
  @max_commits_count = DEFAULT_COMMIT_MESSAGES_MAX_COMMITS_COUNT
end