Sha256: 957897081ccc78b306e46a58a22a306b8d7f37e1e7688fae97a41938bbd3ec7e

Contents?: true

Size: 1 KB

Versions: 13

Compression:

Stored size: 1 KB

Contents

# frozen_string_literal: true

module Gitlab
  module Dangerfiles
    class Config
      # @!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.
      attr_accessor :code_size_thresholds

      # @!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.
      attr_accessor :max_commits_count

      DEFAULT_CHANGES_SIZE_THRESHOLDS = { high: 2_000, medium: 500 }.freeze
      DEFAULT_COMMIT_MESSAGES_MAX_COMMITS_COUNT = 10

      def initialize
        @code_size_thresholds = DEFAULT_CHANGES_SIZE_THRESHOLDS
        @max_commits_count = DEFAULT_COMMIT_MESSAGES_MAX_COMMITS_COUNT
      end
    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
gitlab-dangerfiles-2.5.0 lib/gitlab/dangerfiles/config.rb
gitlab-dangerfiles-2.4.0 lib/gitlab/dangerfiles/config.rb
gitlab-dangerfiles-2.3.2 lib/gitlab/dangerfiles/config.rb
gitlab-dangerfiles-2.3.1 lib/gitlab/dangerfiles/config.rb
gitlab-dangerfiles-2.3.0 lib/gitlab/dangerfiles/config.rb
gitlab-dangerfiles-2.2.2 lib/gitlab/dangerfiles/config.rb
gitlab-dangerfiles-2.2.1 lib/gitlab/dangerfiles/config.rb
gitlab-dangerfiles-2.2.0 lib/gitlab/dangerfiles/config.rb
gitlab-dangerfiles-2.1.4 lib/gitlab/dangerfiles/config.rb
gitlab-dangerfiles-2.1.3 lib/gitlab/dangerfiles/config.rb
gitlab-dangerfiles-2.1.2 lib/gitlab/dangerfiles/config.rb
gitlab-dangerfiles-2.1.1 lib/gitlab/dangerfiles/config.rb
gitlab-dangerfiles-2.1.0 lib/gitlab/dangerfiles/config.rb