GitHub PullRequestReviewCommentEvent at 2014-05-24 14:51:07
Repository: hubot-scripts
Actor: technicalpickles
Payload: {"comment":{"url":"https://api.github.com/repos/github/hubot-scripts/pulls/comments/13026638","id":13026638,"diff_hunk":"@@ -42,8 +52,20 @@ module.exports = (robot) ->\n         robot.send user, \"Got #{push.commits.length} new #{commitWord} from #{push.commits[0].author.name} on #{push.repository.name}\"\n         for commit in push.commits\n           do (commit) ->\n-            gitio commit.url, (err, data) ->\n-              robot.send user, \"  * #{commit.message} (#{if err then commit.url else data})\"\n+            if process.env.HUBOT_GITIO\n+              gitio commit.url, (err, data) ->","path":"src/scripts/github-commits.coffee","position":39,"original_position":39,"commit_id":"3237f88b605e47fabd977a7bda8c4ec91b9f2926","original_commit_id":"3237f88b605e47fabd977a7bda8c4ec91b9f2926","user":{"login":"technicalpickles","id":159,"avatar_url":"https://avatars.githubusercontent.com/u/159?","gravatar_id":"1c1aabc1abed5cce37b192dd00f0f28c","url":"https://api.github.com/users/technicalpickles","html_url":"https://github.com/technicalpickles","followers_url":"https://api.github.com/users/technicalpickles/followers","following_url":"https://api.github.com/users/technicalpickles/following{/other_user}","gists_url":"https://api.github.com/users/technicalpickles/gists{/gist_id}","starred_url":"https://api.github.com/users/technicalpickles/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/technicalpickles/subscriptions","organizations_url":"https://api.github.com/users/technicalpickles/orgs","repos_url":"https://api.github.com/users/technicalpickles/repos","events_url":"https://api.github.com/users/technicalpickles/events{/privacy}","received_events_url":"https://api.github.com/users/technicalpickles/received_events","type":"User","site_admin":true},"body":"This is done asynchronously, so if you set `process.env.HUBOT_GITIO`, this updated commit.url isn't ensured to be set by the time `robot.send` is called.\r\n\r\nTo get around that, I'd suggest refactoring most of the logic to it's own function, so it can either be called in a callback for `gitio` if  `process.env.HUBOT_GITIO` or by itself.","created_at":"2014-05-24T14:51:07Z","updated_at":"2014-05-24T14:51:07Z","html_url":"https://github.com/github/hubot-scripts/pull/1461#discussion_r13026638","pull_request_url":"https://api.github.com/repos/github/hubot-scripts/pulls/1461","_links":{"self":{"href":"https://api.github.com/repos/github/hubot-scripts/pulls/comments/13026638"},"html":{"href":"https://github.com/github/hubot-scripts/pull/1461#discussion_r13026638"},"pull_request":{"href":"https://api.github.com/repos/github/hubot-scripts/pulls/1461"}}}}