Improve code quality in lib/api/triggers.rb
When we were working on https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/13792#note_38994572, we found a couple of culprit-ish things.
The following discussion from gitlab-ce!13792 should be addressed:
-
@godfat started a discussion: (+6 comments) I think we should be checking against
result[:status] == :error
Also suggestions from @godfat.
Sure, but I still think we need to provide a default because the service might not always provide
result[:http_status]
. In my opinion this design is quite bad so I wish we could escape from this at some point :/