Class: Pipeline::JiraOneTimeFilter
- Inherits:
-
BaseFilter
- Object
- BaseFilter
- Pipeline::JiraOneTimeFilter
- Defined in:
- lib/pipeline/filters/jira_one_time_filter.rb
Instance Attribute Summary
Attributes inherited from BaseFilter
Instance Method Summary collapse
- #filter(tracker) ⇒ Object
-
#initialize ⇒ JiraOneTimeFilter
constructor
Pipeline::Filters.add self.
Constructor Details
#initialize ⇒ JiraOneTimeFilter
Pipeline::Filters.add self
9 10 11 12 |
# File 'lib/pipeline/filters/jira_one_time_filter.rb', line 9 def initialize @name = "Jira One Time Filter" @description = "Checks that each issue that will be reported doesn't already exist in JIRA." end |
Instance Method Details
#filter(tracker) ⇒ Object
14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
# File 'lib/pipeline/filters/jira_one_time_filter.rb', line 14 def filter tracker @project = tracker.[:jira_project.to_s] @api = tracker.[:jira_api_url.to_s] @cookie = tracker.[:jira_cookie.to_s] @component = tracker.[:jira_component.to_s] @appname = tracker.[:appname] potential_findings = Array.new(tracker.findings) tracker.findings.clear potential_findings.each do |finding| if confirm_new finding tracker.report finding end end end |