{"action":"created","comment":{"url":"https://api.github.com/repos/aergonaut/cody/pulls/comments/58655301","id":58655301,"diff_hunk":"@@ -67,19 +82,63 @@\n         expect { rule.add_reviewer(pr) }.to_not change { pr.pending_reviews }\n       end\n     end\n+    \n+    context \"when the reviewer is the commit author\" do\n+      before do\n+        stub_request(:get, %r{https?://api.github.com/repos/aergonaut/testrepo/pulls/#{pr.number}/commits}).to_return(","path":"spec/models/review_rule_spec.rb","position":36,"original_position":36,"commit_id":"4210382eef8330cf140edd30a4bc6de4cdef9607","original_commit_id":"4210382eef8330cf140edd30a4bc6de4cdef9607","user":{"login":"houndci-bot","id":6697940,"avatar_url":"https://avatars.githubusercontent.com/u/6697940?v=3","gravatar_id":"","url":"https://api.github.com/users/houndci-bot","html_url":"https://github.com/houndci-bot","followers_url":"https://api.github.com/users/houndci-bot/followers","following_url":"https://api.github.com/users/houndci-bot/following{/other_user}","gists_url":"https://api.github.com/users/houndci-bot/gists{/gist_id}","starred_url":"https://api.github.com/users/houndci-bot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/houndci-bot/subscriptions","organizations_url":"https://api.github.com/users/houndci-bot/orgs","repos_url":"https://api.github.com/users/houndci-bot/repos","events_url":"https://api.github.com/users/houndci-bot/events{/privacy}","received_events_url":"https://api.github.com/users/houndci-bot/received_events","type":"User","site_admin":false},"body":"Line is too long. [118/80]","created_at":"2016-04-06T06:06:56Z","updated_at":"2016-04-06T06:06:56Z","html_url":"https://github.com/aergonaut/cody/pull/31#discussion_r58655301","pull_request_url":"https://api.github.com/repos/aergonaut/cody/pulls/31","_links":{"self":{"href":"https://api.github.com/repos/aergonaut/cody/pulls/comments/58655301"},"html":{"href":"https://github.com/aergonaut/cody/pull/31#discussion_r58655301"},"pull_request":{"href":"https://api.github.com/repos/aergonaut/cody/pulls/31"}}},"pull_request":{"url":"https://api.github.com/repos/aergonaut/cody/pulls/31","id":65391473,"html_url":"https://github.com/aergonaut/cody/pull/31","diff_url":"https://github.com/aergonaut/cody/pull/31.diff","patch_url":"https://github.com/aergonaut/cody/pull/31.patch","issue_url":"https://api.github.com/repos/aergonaut/cody/issues/31","number":31,"state":"open","locked":false,"title":"Repository column for PullRequest and Avoid Commit Author as ReviewRule reviewer","user":{"login":"mrpasquini","id":991719,"avatar_url":"https://avatars.githubusercontent.com/u/991719?v=3","gravatar_id":"","url":"https://api.github.com/users/mrpasquini","html_url":"https://github.com/mrpasquini","followers_url":"https://api.github.com/users/mrpasquini/followers","following_url":"https://api.github.com/users/mrpasquini/following{/other_user}","gists_url":"https://api.github.com/users/mrpasquini/gists{/gist_id}","starred_url":"https://api.github.com/users/mrpasquini/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mrpasquini/subscriptions","organizations_url":"https://api.github.com/users/mrpasquini/orgs","repos_url":"https://api.github.com/users/mrpasquini/repos","events_url":"https://api.github.com/users/mrpasquini/events{/privacy}","received_events_url":"https://api.github.com/users/mrpasquini/received_events","type":"User","site_admin":false},"body":"\"Add Repository field to PullRequest\" is a column to hold the repo name (like \"aergonaut/cody\") for a pull request. This will aid in future support for multiple repos in a single Cody instance and supports making queries against a PullRequest record in the future since we don't otherwise have the repo available.\r\n\r\n\"Avoid Commit Authors as Reviewers for ReviewRules\" uses the new repository column on the PR to query for commits against the PR and return a list of authors. This allows us prioritize how we add reviewers from ReviewRules such that we choose:\r\n1 - Any potential reviewer that is not a commit author or current reviewer\r\n2 - Any potential reviewer that is not a current reviewer\r\n3 - Any potential reviewer\r\n","created_at":"2016-04-06T00:02:34Z","updated_at":"2016-04-06T06:06:56Z","closed_at":null,"merged_at":null,"merge_commit_sha":"207d25fd86cd30e25eb10d9d06e928133aa32848","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/aergonaut/cody/pulls/31/commits","review_comments_url":"https://api.github.com/repos/aergonaut/cody/pulls/31/comments","review_comment_url":"https://api.github.com/repos/aergonaut/cody/pulls/comments{/number}","comments_url":"https://api.github.com/repos/aergonaut/cody/issues/31/comments","statuses_url":"https://api.github.com/repos/aergonaut/cody/statuses/4210382eef8330cf140edd30a4bc6de4cdef9607","head":{"label":"mrpasquini:master","ref":"master","sha":"4210382eef8330cf140edd30a4bc6de4cdef9607","user":{"login":"mrpasquini","id":991719,"avatar_url":"https://avatars.githubusercontent.com/u/991719?v=3","gravatar_id":"","url":"https://api.github.com/users/mrpasquini","html_url":"https://github.com/mrpasquini","followers_url":"https://api.github.com/users/mrpasquini/followers","following_url":"https://api.github.com/users/mrpasquini/following{/other_user}","gists_url":"https://api.github.com/users/mrpasquini/gists{/gist_id}","starred_url":"https://api.github.com/users/mrpasquini/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mrpasquini/subscriptions","organizations_url":"https://api.github.com/users/mrpasquini/orgs","repos_url":"https://api.github.com/users/mrpasquini/repos","events_url":"https://api.github.com/users/mrpasquini/events{/privacy}","received_events_url":"https://api.github.com/users/mrpasquini/received_events","type":"User","site_admin":false},"repo":{"id":49095654,"name":"cody","full_name":"mrpasquini/cody","owner":{"login":"mrpasquini","id":991719,"avatar_url":"https://avatars.githubusercontent.com/u/991719?v=3","gravatar_id":"","url":"https://api.github.com/users/mrpasquini","html_url":"https://github.com/mrpasquini","followers_url":"https://api.github.com/users/mrpasquini/followers","following_url":"https://api.github.com/users/mrpasquini/following{/other_user}","gists_url":"https://api.github.com/users/mrpasquini/gists{/gist_id}","starred_url":"https://api.github.com/users/mrpasquini/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mrpasquini/subscriptions","organizations_url":"https://api.github.com/users/mrpasquini/orgs","repos_url":"https://api.github.com/users/mrpasquini/repos","events_url":"https://api.github.com/users/mrpasquini/events{/privacy}","received_events_url":"https://api.github.com/users/mrpasquini/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mrpasquini/cody","description":"Your friendly neighborhood code review bot","fork":true,"url":"https://api.github.com/repos/mrpasquini/cody","forks_url":"https://api.github.com/repos/mrpasquini/cody/forks","keys_url":"https://api.github.com/repos/mrpasquini/cody/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mrpasquini/cody/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mrpasquini/cody/teams","hooks_url":"https://api.github.com/repos/mrpasquini/cody/hooks","issue_events_url":"https://api.github.com/repos/mrpasquini/cody/issues/events{/number}","events_url":"https://api.github.com/repos/mrpasquini/cody/events","assignees_url":"https://api.github.com/repos/mrpasquini/cody/assignees{/user}","branches_url":"https://api.github.com/repos/mrpasquini/cody/branches{/branch}","tags_url":"https://api.github.com/repos/mrpasquini/cody/tags","blobs_url":"https://api.github.com/repos/mrpasquini/cody/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mrpasquini/cody/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mrpasquini/cody/git/refs{/sha}","trees_url":"https://api.github.com/repos/mrpasquini/cody/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mrpasquini/cody/statuses/{sha}","languages_url":"https://api.github.com/repos/mrpasquini/cody/languages","stargazers_url":"https://api.github.com/repos/mrpasquini/cody/stargazers","contributors_url":"https://api.github.com/repos/mrpasquini/cody/contributors","subscribers_url":"https://api.github.com/repos/mrpasquini/cody/subscribers","subscription_url":"https://api.github.com/repos/mrpasquini/cody/subscription","commits_url":"https://api.github.com/repos/mrpasquini/cody/commits{/sha}","git_commits_url":"https://api.github.com/repos/mrpasquini/cody/git/commits{/sha}","comments_url":"https://api.github.com/repos/mrpasquini/cody/comments{/number}","issue_comment_url":"https://api.github.com/repos/mrpasquini/cody/issues/comments{/number}","contents_url":"https://api.github.com/repos/mrpasquini/cody/contents/{+path}","compare_url":"https://api.github.com/repos/mrpasquini/cody/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mrpasquini/cody/merges","archive_url":"https://api.github.com/repos/mrpasquini/cody/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mrpasquini/cody/downloads","issues_url":"https://api.github.com/repos/mrpasquini/cody/issues{/number}","pulls_url":"https://api.github.com/repos/mrpasquini/cody/pulls{/number}","milestones_url":"https://api.github.com/repos/mrpasquini/cody/milestones{/number}","notifications_url":"https://api.github.com/repos/mrpasquini/cody/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mrpasquini/cody/labels{/name}","releases_url":"https://api.github.com/repos/mrpasquini/cody/releases{/id}","deployments_url":"https://api.github.com/repos/mrpasquini/cody/deployments","created_at":"2016-01-05T22:07:00Z","updated_at":"2016-04-05T18:06:26Z","pushed_at":"2016-04-06T06:06:50Z","git_url":"git://github.com/mrpasquini/cody.git","ssh_url":"git@github.com:mrpasquini/cody.git","clone_url":"https://github.com/mrpasquini/cody.git","svn_url":"https://github.com/mrpasquini/cody","homepage":"","size":127,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"aergonaut:master","ref":"master","sha":"f0b5b9f83dc5901f84c64556dd2d564e38562980","user":{"login":"aergonaut","id":284007,"avatar_url":"https://avatars.githubusercontent.com/u/284007?v=3","gravatar_id":"","url":"https://api.github.com/users/aergonaut","html_url":"https://github.com/aergonaut","followers_url":"https://api.github.com/users/aergonaut/followers","following_url":"https://api.github.com/users/aergonaut/following{/other_user}","gists_url":"https://api.github.com/users/aergonaut/gists{/gist_id}","starred_url":"https://api.github.com/users/aergonaut/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aergonaut/subscriptions","organizations_url":"https://api.github.com/users/aergonaut/orgs","repos_url":"https://api.github.com/users/aergonaut/repos","events_url":"https://api.github.com/users/aergonaut/events{/privacy}","received_events_url":"https://api.github.com/users/aergonaut/received_events","type":"User","site_admin":false},"repo":{"id":48143718,"name":"cody","full_name":"aergonaut/cody","owner":{"login":"aergonaut","id":284007,"avatar_url":"https://avatars.githubusercontent.com/u/284007?v=3","gravatar_id":"","url":"https://api.github.com/users/aergonaut","html_url":"https://github.com/aergonaut","followers_url":"https://api.github.com/users/aergonaut/followers","following_url":"https://api.github.com/users/aergonaut/following{/other_user}","gists_url":"https://api.github.com/users/aergonaut/gists{/gist_id}","starred_url":"https://api.github.com/users/aergonaut/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aergonaut/subscriptions","organizations_url":"https://api.github.com/users/aergonaut/orgs","repos_url":"https://api.github.com/users/aergonaut/repos","events_url":"https://api.github.com/users/aergonaut/events{/privacy}","received_events_url":"https://api.github.com/users/aergonaut/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/aergonaut/cody","description":"Your friendly neighborhood code review bot","fork":false,"url":"https://api.github.com/repos/aergonaut/cody","forks_url":"https://api.github.com/repos/aergonaut/cody/forks","keys_url":"https://api.github.com/repos/aergonaut/cody/keys{/key_id}","collaborators_url":"https://api.github.com/repos/aergonaut/cody/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/aergonaut/cody/teams","hooks_url":"https://api.github.com/repos/aergonaut/cody/hooks","issue_events_url":"https://api.github.com/repos/aergonaut/cody/issues/events{/number}","events_url":"https://api.github.com/repos/aergonaut/cody/events","assignees_url":"https://api.github.com/repos/aergonaut/cody/assignees{/user}","branches_url":"https://api.github.com/repos/aergonaut/cody/branches{/branch}","tags_url":"https://api.github.com/repos/aergonaut/cody/tags","blobs_url":"https://api.github.com/repos/aergonaut/cody/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/aergonaut/cody/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/aergonaut/cody/git/refs{/sha}","trees_url":"https://api.github.com/repos/aergonaut/cody/git/trees{/sha}","statuses_url":"https://api.github.com/repos/aergonaut/cody/statuses/{sha}","languages_url":"https://api.github.com/repos/aergonaut/cody/languages","stargazers_url":"https://api.github.com/repos/aergonaut/cody/stargazers","contributors_url":"https://api.github.com/repos/aergonaut/cody/contributors","subscribers_url":"https://api.github.com/repos/aergonaut/cody/subscribers","subscription_url":"https://api.github.com/repos/aergonaut/cody/subscription","commits_url":"https://api.github.com/repos/aergonaut/cody/commits{/sha}","git_commits_url":"https://api.github.com/repos/aergonaut/cody/git/commits{/sha}","comments_url":"https://api.github.com/repos/aergonaut/cody/comments{/number}","issue_comment_url":"https://api.github.com/repos/aergonaut/cody/issues/comments{/number}","contents_url":"https://api.github.com/repos/aergonaut/cody/contents/{+path}","compare_url":"https://api.github.com/repos/aergonaut/cody/compare/{base}...{head}","merges_url":"https://api.github.com/repos/aergonaut/cody/merges","archive_url":"https://api.github.com/repos/aergonaut/cody/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/aergonaut/cody/downloads","issues_url":"https://api.github.com/repos/aergonaut/cody/issues{/number}","pulls_url":"https://api.github.com/repos/aergonaut/cody/pulls{/number}","milestones_url":"https://api.github.com/repos/aergonaut/cody/milestones{/number}","notifications_url":"https://api.github.com/repos/aergonaut/cody/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/aergonaut/cody/labels{/name}","releases_url":"https://api.github.com/repos/aergonaut/cody/releases{/id}","deployments_url":"https://api.github.com/repos/aergonaut/cody/deployments","created_at":"2015-12-17T00:53:40Z","updated_at":"2016-04-03T02:16:43Z","pushed_at":"2016-04-06T06:06:51Z","git_url":"git://github.com/aergonaut/cody.git","ssh_url":"git@github.com:aergonaut/cody.git","clone_url":"https://github.com/aergonaut/cody.git","svn_url":"https://github.com/aergonaut/cody","homepage":"","size":124,"stargazers_count":9,"watchers_count":9,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":7,"mirror_url":null,"open_issues_count":10,"forks":7,"open_issues":10,"watchers":9,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/aergonaut/cody/pulls/31"},"html":{"href":"https://github.com/aergonaut/cody/pull/31"},"issue":{"href":"https://api.github.com/repos/aergonaut/cody/issues/31"},"comments":{"href":"https://api.github.com/repos/aergonaut/cody/issues/31/comments"},"review_comments":{"href":"https://api.github.com/repos/aergonaut/cody/pulls/31/comments"},"review_comment":{"href":"https://api.github.com/repos/aergonaut/cody/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/aergonaut/cody/pulls/31/commits"},"statuses":{"href":"https://api.github.com/repos/aergonaut/cody/statuses/4210382eef8330cf140edd30a4bc6de4cdef9607"}}}}