Sha256: 230f67d2f09a3cc2b002b6aa270ab3adf153a413e79e58b83f0892f53232dfd7
Contents?: true
Size: 638 Bytes
Versions: 9
Compression:
Stored size: 638 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[:input] def initialize(key: "Issue", model: Models::Link, **) @key = key @model = model super(**) end def call commit commit.trailer_value_for(key) .fmap { |value| model[id: value, uri: format(input.tracker_uri, id: value)] } .value_or(model.new) end private attr_reader :key, :model end end end end
Version data entries
9 entries across 9 versions & 1 rubygems