Module: MetaProject::Tracker::DigitIssues
- Included in:
- Trac::TracTracker, XForge::XForgeTracker
- Defined in:
- lib/meta_project/tracker/digit_issues.rb
Overview
This module should be included by trackers that follow a digit-based issue scheme
Instance Method Summary collapse
- #identifier_examples ⇒ Object
- #identifier_regexp ⇒ Object
-
#markup(text) ⇒ Object
TODO: find a way to extract just the issue summaries so they can be stored in dc as an array embedded in the revision object.
Instance Method Details
#identifier_examples ⇒ Object
9 10 11 |
# File 'lib/meta_project/tracker/digit_issues.rb', line 9 def identifier_examples ["#1926", "#1446"] end |
#identifier_regexp ⇒ Object
5 6 7 |
# File 'lib/meta_project/tracker/digit_issues.rb', line 5 def identifier_regexp /#(\d+)/ end |
#markup(text) ⇒ Object
TODO: find a way to extract just the issue summaries so they can be stored in dc as an array embedded in the revision object. that way we don’t alter the original commit message
15 16 17 18 19 20 21 |
# File 'lib/meta_project/tracker/digit_issues.rb', line 15 def markup(text) text.gsub(identifier_regexp) do |match| issue_identifier = $1 issue = issue(issue_identifier) issue ? "<a href=\"#{issue.uri}\">#{issue.summary}</a>" : "\##{issue_identifier}" end end |