Class: Milestoner::Commits::Enrichers::Issue
- Inherits:
-
Object
- Object
- Milestoner::Commits::Enrichers::Issue
- Defined in:
- lib/milestoner/commits/enrichers/issue.rb
Overview
Enriches a commit issue based on trailer information.
Instance Method Summary collapse
- #call(commit) ⇒ Object
-
#initialize(key: "Issue", model: Models::Link) ⇒ Issue
constructor
A new instance of Issue.
Constructor Details
Instance Method Details
#call(commit) ⇒ Object
16 17 18 19 20 21 22 |
# File 'lib/milestoner/commits/enrichers/issue.rb', line 16 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 |