Class: Watch::Keeper::Jira
- Inherits:
-
Object
- Object
- Watch::Keeper::Jira
- Defined in:
- lib/watch/keeper/jira.rb
Instance Method Summary collapse
-
#initialize(settings) ⇒ Jira
constructor
A new instance of Jira.
- #report(project_id, issue_type, summary) ⇒ Object
Constructor Details
#initialize(settings) ⇒ Jira
Returns a new instance of Jira.
6 7 8 |
# File 'lib/watch/keeper/jira.rb', line 6 def initialize(settings) @client = JIRA::Client.new(settings) end |
Instance Method Details
#report(project_id, issue_type, summary) ⇒ Object
10 11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/watch/keeper/jira.rb', line 10 def report(project_id, issue_type, summary) project = find_project(project_id) issue = @client.Issue.build template = { "fields" => { "project" => { "id" => project_id }, "issuetype" => { "id" => issue_type }, "summary" => summary } } issue.save(template) end |