Sha256: c577a1c6a3e552064c7dc78f9cf8270e2bced76b38768d25139ee62ddd54036a
Contents?: true
Size: 709 Bytes
Versions: 13
Compression:
Stored size: 709 Bytes
Contents
# frozen_string_literal: true module Milestoner module Commits module Enrichers # Enriches a commit issue based on trailer information. class Issue include Milestoner::Import[:settings] def initialize(key: "Issue", model: Models::Link, **) @key = key @model = model super(**) end def call commit uri = settings.tracker_uri commit.trailer_value_for(key) .either -> value { model[id: value, uri: format(uri, id: value)] }, proc { model[id: "All", uri: format(uri, id: nil)] } end private attr_reader :key, :model end end end end
Version data entries
13 entries across 13 versions & 1 rubygems