Class: Stove::JIRA
- Inherits:
-
Object
- Object
- Stove::JIRA
- Defined in:
- lib/stove/jira.rb
Constant Summary collapse
- JIRA_URL =
'https://tickets.opscode.com'
Class Method Summary collapse
-
.comment_and_close(ticket, cookbook) ⇒ Object
Comment and close a particular issue.
- .unreleased_tickets_for(component) ⇒ Object
Class Method Details
.comment_and_close(ticket, cookbook) ⇒ Object
Comment and close a particular issue.
33 34 35 36 37 38 39 40 41 |
# File 'lib/stove/jira.rb', line 33 def comment_and_close(ticket, cookbook) comment = "Released in [#{cookbook.version}|#{cookbook.url}]" transition = Jiralicious::Issue::Transitions.find(ticket.jira_key).find do |key, value| !value.is_a?(String) && value.name == 'Close' end.last Jiralicious::Issue::Transitions.go(ticket.jira_key, transition.id, { comment: comment }) end |
.unreleased_tickets_for(component) ⇒ Object
15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/stove/jira.rb', line 15 def unreleased_tickets_for(component) jql = [ 'project = COOK', 'resolution = Fixed', 'status = "Fix Committed"', 'component = ' + component.inspect ].join(' AND ') Stove::Logger.debug "JQL: #{jql.inspect}" Jiralicious.search(jql).issues end |