{"action":"created","issue":{"url":"https://api.github.com/repos/danger/danger/issues/264","repository_url":"https://api.github.com/repos/danger/danger","labels_url":"https://api.github.com/repos/danger/danger/issues/264/labels{/name}","comments_url":"https://api.github.com/repos/danger/danger/issues/264/comments","events_url":"https://api.github.com/repos/danger/danger/issues/264/events","html_url":"https://github.com/danger/danger/issues/264","id":159535340,"number":264,"title":"Update GitHub PR status does not work","user":{"login":"valeriomazzeo","id":1882080,"avatar_url":"https://avatars.githubusercontent.com/u/1882080?v=3","gravatar_id":"","url":"https://api.github.com/users/valeriomazzeo","html_url":"https://github.com/valeriomazzeo","followers_url":"https://api.github.com/users/valeriomazzeo/followers","following_url":"https://api.github.com/users/valeriomazzeo/following{/other_user}","gists_url":"https://api.github.com/users/valeriomazzeo/gists{/gist_id}","starred_url":"https://api.github.com/users/valeriomazzeo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/valeriomazzeo/subscriptions","organizations_url":"https://api.github.com/users/valeriomazzeo/orgs","repos_url":"https://api.github.com/users/valeriomazzeo/repos","events_url":"https://api.github.com/users/valeriomazzeo/events{/privacy}","received_events_url":"https://api.github.com/users/valeriomazzeo/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-06-10T00:09:49Z","updated_at":"2016-06-10T00:31:38Z","closed_at":null,"body":"This method always fails because `latest_pr_commit_ref` has never been set.\r\nAlso, the generated error is absolutely misleading :(\r\n\r\n```\r\ndef submit_pull_request_status!(warnings: nil, errors: nil, details_url: nil)\r\n        status = (errors.count == 0 ? 'success' : 'failure')\r\n        message = generate_github_description(warnings: warnings, errors: errors)\r\n        client.create_status(ci_source.repo_slug, latest_pr_commit_ref, status, {\r\n          description: message,\r\n          context: \"danger/danger\",\r\n          target_url: details_url\r\n        })\r\n      rescue\r\n        # This usually means the user has no commit access to this repo\r\n        # That's always the case for open source projects where you can only\r\n        # use a read-only GitHub account\r\n        if errors.count > 0\r\n          # We need to fail the actual build here\r\n          abort(\"\\nDanger has failed this build. \\nFound #{'error'.danger_pluralize(errors.count)} and I don't have write access to the PR set a PR status.\")\r\n        else\r\n          puts message\r\n        end\r\n      end\r\n```\r\n\r\nI think this is very critical as it's a major loss in functionality. How come no one noticed before? : O\r\n\r\n@orta, @KrauseFx, @segiddins "},"comment":{"url":"https://api.github.com/repos/danger/danger/issues/comments/225065344","html_url":"https://github.com/danger/danger/issues/264#issuecomment-225065344","issue_url":"https://api.github.com/repos/danger/danger/issues/264","id":225065344,"user":{"login":"valeriomazzeo","id":1882080,"avatar_url":"https://avatars.githubusercontent.com/u/1882080?v=3","gravatar_id":"","url":"https://api.github.com/users/valeriomazzeo","html_url":"https://github.com/valeriomazzeo","followers_url":"https://api.github.com/users/valeriomazzeo/followers","following_url":"https://api.github.com/users/valeriomazzeo/following{/other_user}","gists_url":"https://api.github.com/users/valeriomazzeo/gists{/gist_id}","starred_url":"https://api.github.com/users/valeriomazzeo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/valeriomazzeo/subscriptions","organizations_url":"https://api.github.com/users/valeriomazzeo/orgs","repos_url":"https://api.github.com/users/valeriomazzeo/repos","events_url":"https://api.github.com/users/valeriomazzeo/events{/privacy}","received_events_url":"https://api.github.com/users/valeriomazzeo/received_events","type":"User","site_admin":false},"created_at":"2016-06-10T00:31:38Z","updated_at":"2016-06-10T00:31:38Z","body":"Easy... I wasn't accusing anyone, just trying to help troubleshooting and pointing you guys to (possibly) the right direction.\r\n\r\n>... How come no one noticed before?\r\n\r\nIt was more intended as: \"is this not working only for me?\"\r\n\r\nI have reason to believe it wasn't working before either..\r\n\r\nUnfortunately, I have no way to check where `latest_pr_commit_ref` was previously set without fiddling in the project history. I am not asking anyone to fix it right now, just an heads up..."}}
{"actor":{"display_login":"valeriomazzeo"}}