Sha256: 66fa52b7fd770881f09cba9d35f4efd238c756f2fd46e4a9219ed529616d5be4

Contents?: true

Size: 719 Bytes

Versions: 1

Compression:

Stored size: 719 Bytes

Contents

module Gitlab
  module Release
    module Changelog
      class Entry
        attr_reader :title, :id

        # @param [Integer] id
        # @param [String] title
        def initialize(id, title)
          @id = id
          @title = title
        end

        # @param [Boolean] with_reference
        def to_s_with_reference(with_reference)
          "- #{title}"
        end
      end

      class MergeRequest < Entry
        def to_s_with_reference(with_reference)
          with_reference ? "- #{title} !#{id}" : super
        end
      end

      class Issue < Entry
        def to_s_with_reference(with_reference)
          with_reference ? "- #{title} ##{id}" : super
        end
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
gitlab-release-tools-0.2.0 lib/gitlab/release/changelog/entry.rb