Commit f5707c27 authored by Sean Arnold's avatar Sean Arnold

Refactor to not use instance var

parent 0ce46ab4
...@@ -7,7 +7,9 @@ module ErrorTracking ...@@ -7,7 +7,9 @@ module ErrorTracking
def perform def perform
response = fetch response = fetch
update_related_issue unless parse_errors(response).present? unless parse_errors(response).present?
response[:closed_issue_iid] = update_related_issue&.iid
end
response response
end end
...@@ -23,7 +25,7 @@ module ErrorTracking ...@@ -23,7 +25,7 @@ module ErrorTracking
issue = related_issue issue = related_issue
return unless issue return unless issue
@closed_issue = close_and_create_note(issue) close_and_create_note(issue)
end end
def close_and_create_note(issue) def close_and_create_note(issue)
...@@ -64,7 +66,7 @@ module ErrorTracking ...@@ -64,7 +66,7 @@ module ErrorTracking
def parse_response(response) def parse_response(response)
{ {
updated: response[:updated].present?, updated: response[:updated].present?,
closed_issue_iid: @closed_issue&.iid closed_issue_iid: response[:closed_issue_iid]
} }
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment