GitHub PullRequestReviewCommentEvent at 2014-04-07 21:08:02
Repository: travis-core
Actor: henrikhodne
Payload: {"comment":{"url":"https://api.github.com/repos/travis-ci/travis-core/pulls/comments/11365617","id":11365617,"diff_hunk":"@@ -33,19 +33,18 @@ def matrix_duration\n     end\n \n     def matrix_state\n-      tests = matrix.reject { |test| test.allow_failure? }\n-      if tests.blank?\n+      if required_jobs.blank?\n         :passed\n-      elsif tests.any?(&:canceled?)\n+      elsif required_jobs.any?(&:canceled?)\n         :canceled\n-      elsif tests.any?(&:errored?)\n+      elsif required_jobs.any?(&:errored?)\n         :errored\n-      elsif tests.any?(&:failed?)\n+      elsif required_jobs.any?(&:failed?)\n         :failed\n-      elsif tests.all?(&:passed?)\n+      elsif required_jobs.all?(&:passed?)\n         :passed\n       else\n-        raise InvalidMatrixStateException.new(tests)\n+        raise InvalidMatrixStateException.new(required_jobs)","path":"lib/travis/model/build/matrix.rb","position":34,"original_position":34,"commit_id":"8e162d52fa4697e3c7604f46fd0bb4bbfea03389","original_commit_id":"8e162d52fa4697e3c7604f46fd0bb4bbfea03389","user":{"login":"henrikhodne","id":24421,"avatar_url":"https://avatars.githubusercontent.com/u/24421?","gravatar_id":"d036be96167a38393d657c66a25ec85c","url":"https://api.github.com/users/henrikhodne","html_url":"https://github.com/henrikhodne","followers_url":"https://api.github.com/users/henrikhodne/followers","following_url":"https://api.github.com/users/henrikhodne/following{/other_user}","gists_url":"https://api.github.com/users/henrikhodne/gists{/gist_id}","starred_url":"https://api.github.com/users/henrikhodne/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/henrikhodne/subscriptions","organizations_url":"https://api.github.com/users/henrikhodne/orgs","repos_url":"https://api.github.com/users/henrikhodne/repos","events_url":"https://api.github.com/users/henrikhodne/events{/privacy}","received_events_url":"https://api.github.com/users/henrikhodne/received_events","type":"User","site_admin":false},"body":"I agree. The latest errors were confusing because the job that caused `matrix_state` to be called (and raise the error) was an allowed failure, and as such not included in the exception output.","created_at":"2014-04-07T21:08:02Z","updated_at":"2014-04-07T21:08:02Z","html_url":"https://github.com/travis-ci/travis-core/pull/371#discussion_r11365617","pull_request_url":"https://api.github.com/repos/travis-ci/travis-core/pulls/371","_links":{"self":{"href":"https://api.github.com/repos/travis-ci/travis-core/pulls/comments/11365617"},"html":{"href":"https://github.com/travis-ci/travis-core/pull/371#discussion_r11365617"},"pull_request":{"href":"https://api.github.com/repos/travis-ci/travis-core/pulls/371"}}}}