Module: Labels
- Defined in:
- lib/extensions/utils/labels.rb
Overview
A simple helper method handles the status of the target text. This is used to display whether a GitHub issue or a Jira ticket is open or closed etc.
Class Method Summary collapse
-
.getstatus(attrs) ⇒ String
The status and/or label to be displayed.
Class Method Details
.getstatus(attrs) ⇒ String
Returns the status and/or label to be displayed.
9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/extensions/utils/labels.rb', line 9 def self.getstatus(attrs) status = attrs['status'] if status == ('done' || 'closed') label = 'success' elsif status == 'open' label = 'warning' else status = 'unknown' label = 'default' end end |