{"action":"created","comment":{"url":"https://api.github.com/repos/zooniverse/Panoptes/pulls/comments/61146456","id":61146456,"diff_hunk":"@@ -535,6 +535,18 @@\n       expect(subject.retired_for_workflow?(workflow)).to be_truthy\n     end\n \n+    context \"when the retirement_reason param is invalid\" do\n+      it 'throws an API error' do\n+        post :retire_subjects, workflow_id: workflow.id, subject_id: subject.id, retirement_reason: \"notreal\" ","path":"spec/controllers/api/v1/workflows_controller_spec.rb","position":6,"original_position":6,"commit_id":"40a27cceebdfa07a5cce4a2f6851b071e0e0762e","original_commit_id":"40a27cceebdfa07a5cce4a2f6851b071e0e0762e","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":"Trailing whitespace detected.","created_at":"2016-04-26T19:12:42Z","updated_at":"2016-04-26T19:12:42Z","html_url":"https://github.com/zooniverse/Panoptes/pull/1787#discussion_r61146456","pull_request_url":"https://api.github.com/repos/zooniverse/Panoptes/pulls/1787","_links":{"self":{"href":"https://api.github.com/repos/zooniverse/Panoptes/pulls/comments/61146456"},"html":{"href":"https://github.com/zooniverse/Panoptes/pull/1787#discussion_r61146456"},"pull_request":{"href":"https://api.github.com/repos/zooniverse/Panoptes/pulls/1787"}}},"pull_request":{"url":"https://api.github.com/repos/zooniverse/Panoptes/pulls/1787","id":67794130,"html_url":"https://github.com/zooniverse/Panoptes/pull/1787","diff_url":"https://github.com/zooniverse/Panoptes/pull/1787.diff","patch_url":"https://github.com/zooniverse/Panoptes/pull/1787.patch","issue_url":"https://api.github.com/repos/zooniverse/Panoptes/issues/1787","number":1787,"state":"open","locked":false,"title":"Record a reason when a subject is retired","user":{"login":"zwolf","id":374835,"avatar_url":"https://avatars.githubusercontent.com/u/374835?v=3","gravatar_id":"","url":"https://api.github.com/users/zwolf","html_url":"https://github.com/zwolf","followers_url":"https://api.github.com/users/zwolf/followers","following_url":"https://api.github.com/users/zwolf/following{/other_user}","gists_url":"https://api.github.com/users/zwolf/gists{/gist_id}","starred_url":"https://api.github.com/users/zwolf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zwolf/subscriptions","organizations_url":"https://api.github.com/users/zwolf/orgs","repos_url":"https://api.github.com/users/zwolf/repos","events_url":"https://api.github.com/users/zwolf/events{/privacy}","received_events_url":"https://api.github.com/users/zwolf/received_events","type":"User","site_admin":false},"body":"Reasons for retirement are stored in an enum on the SubjectWorkflowCount model. The current list of possible reasons looks like this:\r\n\r\n[ :classification_count, :flagged, :blank, :consensus, :other ]\r\n\r\nNil is also still fine. Nero can set this value when it retires a subject after it detects it in a classification.\r\n\r\n# Review checklist\r\n\r\n- [ ] First, the most important one: is this PR small enough that you can actually review it? Feel free to just reject a branch if the changes are hard to review due to the length of the diff.\r\n- [ ] If there are any migrations, will they the previous version of the app work correctly after they've been run (e.g. the don't remove columns still known about by ActiveRecord).\r\n- [ ] If anything changed with regards to the public API, are those changes also documented in the `apiary.apib` file?\r\n- [ ] Are all the changes covered by tests? Think about any possible edge cases that might be left untested.\r\n\r\n","created_at":"2016-04-25T21:48:36Z","updated_at":"2016-04-26T19:12:42Z","closed_at":null,"merged_at":null,"merge_commit_sha":"5e6070496f40d59212bd7d73d477b1ad795bea95","assignee":{"login":"camallen","id":295329,"avatar_url":"https://avatars.githubusercontent.com/u/295329?v=3","gravatar_id":"","url":"https://api.github.com/users/camallen","html_url":"https://github.com/camallen","followers_url":"https://api.github.com/users/camallen/followers","following_url":"https://api.github.com/users/camallen/following{/other_user}","gists_url":"https://api.github.com/users/camallen/gists{/gist_id}","starred_url":"https://api.github.com/users/camallen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/camallen/subscriptions","organizations_url":"https://api.github.com/users/camallen/orgs","repos_url":"https://api.github.com/users/camallen/repos","events_url":"https://api.github.com/users/camallen/events{/privacy}","received_events_url":"https://api.github.com/users/camallen/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/zooniverse/Panoptes/pulls/1787/commits","review_comments_url":"https://api.github.com/repos/zooniverse/Panoptes/pulls/1787/comments","review_comment_url":"https://api.github.com/repos/zooniverse/Panoptes/pulls/comments{/number}","comments_url":"https://api.github.com/repos/zooniverse/Panoptes/issues/1787/comments","statuses_url":"https://api.github.com/repos/zooniverse/Panoptes/statuses/40a27cceebdfa07a5cce4a2f6851b071e0e0762e","head":{"label":"zwolf:retirement-reason","ref":"retirement-reason","sha":"40a27cceebdfa07a5cce4a2f6851b071e0e0762e","user":{"login":"zwolf","id":374835,"avatar_url":"https://avatars.githubusercontent.com/u/374835?v=3","gravatar_id":"","url":"https://api.github.com/users/zwolf","html_url":"https://github.com/zwolf","followers_url":"https://api.github.com/users/zwolf/followers","following_url":"https://api.github.com/users/zwolf/following{/other_user}","gists_url":"https://api.github.com/users/zwolf/gists{/gist_id}","starred_url":"https://api.github.com/users/zwolf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zwolf/subscriptions","organizations_url":"https://api.github.com/users/zwolf/orgs","repos_url":"https://api.github.com/users/zwolf/repos","events_url":"https://api.github.com/users/zwolf/events{/privacy}","received_events_url":"https://api.github.com/users/zwolf/received_events","type":"User","site_admin":false},"repo":{"id":56798240,"name":"Panoptes","full_name":"zwolf/Panoptes","owner":{"login":"zwolf","id":374835,"avatar_url":"https://avatars.githubusercontent.com/u/374835?v=3","gravatar_id":"","url":"https://api.github.com/users/zwolf","html_url":"https://github.com/zwolf","followers_url":"https://api.github.com/users/zwolf/followers","following_url":"https://api.github.com/users/zwolf/following{/other_user}","gists_url":"https://api.github.com/users/zwolf/gists{/gist_id}","starred_url":"https://api.github.com/users/zwolf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zwolf/subscriptions","organizations_url":"https://api.github.com/users/zwolf/orgs","repos_url":"https://api.github.com/users/zwolf/repos","events_url":"https://api.github.com/users/zwolf/events{/privacy}","received_events_url":"https://api.github.com/users/zwolf/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/zwolf/Panoptes","description":"It sees everything","fork":true,"url":"https://api.github.com/repos/zwolf/Panoptes","forks_url":"https://api.github.com/repos/zwolf/Panoptes/forks","keys_url":"https://api.github.com/repos/zwolf/Panoptes/keys{/key_id}","collaborators_url":"https://api.github.com/repos/zwolf/Panoptes/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/zwolf/Panoptes/teams","hooks_url":"https://api.github.com/repos/zwolf/Panoptes/hooks","issue_events_url":"https://api.github.com/repos/zwolf/Panoptes/issues/events{/number}","events_url":"https://api.github.com/repos/zwolf/Panoptes/events","assignees_url":"https://api.github.com/repos/zwolf/Panoptes/assignees{/user}","branches_url":"https://api.github.com/repos/zwolf/Panoptes/branches{/branch}","tags_url":"https://api.github.com/repos/zwolf/Panoptes/tags","blobs_url":"https://api.github.com/repos/zwolf/Panoptes/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/zwolf/Panoptes/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/zwolf/Panoptes/git/refs{/sha}","trees_url":"https://api.github.com/repos/zwolf/Panoptes/git/trees{/sha}","statuses_url":"https://api.github.com/repos/zwolf/Panoptes/statuses/{sha}","languages_url":"https://api.github.com/repos/zwolf/Panoptes/languages","stargazers_url":"https://api.github.com/repos/zwolf/Panoptes/stargazers","contributors_url":"https://api.github.com/repos/zwolf/Panoptes/contributors","subscribers_url":"https://api.github.com/repos/zwolf/Panoptes/subscribers","subscription_url":"https://api.github.com/repos/zwolf/Panoptes/subscription","commits_url":"https://api.github.com/repos/zwolf/Panoptes/commits{/sha}","git_commits_url":"https://api.github.com/repos/zwolf/Panoptes/git/commits{/sha}","comments_url":"https://api.github.com/repos/zwolf/Panoptes/comments{/number}","issue_comment_url":"https://api.github.com/repos/zwolf/Panoptes/issues/comments{/number}","contents_url":"https://api.github.com/repos/zwolf/Panoptes/contents/{+path}","compare_url":"https://api.github.com/repos/zwolf/Panoptes/compare/{base}...{head}","merges_url":"https://api.github.com/repos/zwolf/Panoptes/merges","archive_url":"https://api.github.com/repos/zwolf/Panoptes/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/zwolf/Panoptes/downloads","issues_url":"https://api.github.com/repos/zwolf/Panoptes/issues{/number}","pulls_url":"https://api.github.com/repos/zwolf/Panoptes/pulls{/number}","milestones_url":"https://api.github.com/repos/zwolf/Panoptes/milestones{/number}","notifications_url":"https://api.github.com/repos/zwolf/Panoptes/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/zwolf/Panoptes/labels{/name}","releases_url":"https://api.github.com/repos/zwolf/Panoptes/releases{/id}","deployments_url":"https://api.github.com/repos/zwolf/Panoptes/deployments","created_at":"2016-04-21T18:54:29Z","updated_at":"2016-04-21T18:54:31Z","pushed_at":"2016-04-26T19:12:32Z","git_url":"git://github.com/zwolf/Panoptes.git","ssh_url":"git@github.com:zwolf/Panoptes.git","clone_url":"https://github.com/zwolf/Panoptes.git","svn_url":"https://github.com/zwolf/Panoptes","homepage":"","size":5455,"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":"zooniverse:master","ref":"master","sha":"cbd4cdff8ef6ccf7dd3e1951dc91a052fc880ec8","user":{"login":"zooniverse","id":106856,"avatar_url":"https://avatars.githubusercontent.com/u/106856?v=3","gravatar_id":"","url":"https://api.github.com/users/zooniverse","html_url":"https://github.com/zooniverse","followers_url":"https://api.github.com/users/zooniverse/followers","following_url":"https://api.github.com/users/zooniverse/following{/other_user}","gists_url":"https://api.github.com/users/zooniverse/gists{/gist_id}","starred_url":"https://api.github.com/users/zooniverse/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zooniverse/subscriptions","organizations_url":"https://api.github.com/users/zooniverse/orgs","repos_url":"https://api.github.com/users/zooniverse/repos","events_url":"https://api.github.com/users/zooniverse/events{/privacy}","received_events_url":"https://api.github.com/users/zooniverse/received_events","type":"Organization","site_admin":false},"repo":{"id":19036577,"name":"Panoptes","full_name":"zooniverse/Panoptes","owner":{"login":"zooniverse","id":106856,"avatar_url":"https://avatars.githubusercontent.com/u/106856?v=3","gravatar_id":"","url":"https://api.github.com/users/zooniverse","html_url":"https://github.com/zooniverse","followers_url":"https://api.github.com/users/zooniverse/followers","following_url":"https://api.github.com/users/zooniverse/following{/other_user}","gists_url":"https://api.github.com/users/zooniverse/gists{/gist_id}","starred_url":"https://api.github.com/users/zooniverse/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zooniverse/subscriptions","organizations_url":"https://api.github.com/users/zooniverse/orgs","repos_url":"https://api.github.com/users/zooniverse/repos","events_url":"https://api.github.com/users/zooniverse/events{/privacy}","received_events_url":"https://api.github.com/users/zooniverse/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/zooniverse/Panoptes","description":"It sees everything","fork":false,"url":"https://api.github.com/repos/zooniverse/Panoptes","forks_url":"https://api.github.com/repos/zooniverse/Panoptes/forks","keys_url":"https://api.github.com/repos/zooniverse/Panoptes/keys{/key_id}","collaborators_url":"https://api.github.com/repos/zooniverse/Panoptes/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/zooniverse/Panoptes/teams","hooks_url":"https://api.github.com/repos/zooniverse/Panoptes/hooks","issue_events_url":"https://api.github.com/repos/zooniverse/Panoptes/issues/events{/number}","events_url":"https://api.github.com/repos/zooniverse/Panoptes/events","assignees_url":"https://api.github.com/repos/zooniverse/Panoptes/assignees{/user}","branches_url":"https://api.github.com/repos/zooniverse/Panoptes/branches{/branch}","tags_url":"https://api.github.com/repos/zooniverse/Panoptes/tags","blobs_url":"https://api.github.com/repos/zooniverse/Panoptes/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/zooniverse/Panoptes/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/zooniverse/Panoptes/git/refs{/sha}","trees_url":"https://api.github.com/repos/zooniverse/Panoptes/git/trees{/sha}","statuses_url":"https://api.github.com/repos/zooniverse/Panoptes/statuses/{sha}","languages_url":"https://api.github.com/repos/zooniverse/Panoptes/languages","stargazers_url":"https://api.github.com/repos/zooniverse/Panoptes/stargazers","contributors_url":"https://api.github.com/repos/zooniverse/Panoptes/contributors","subscribers_url":"https://api.github.com/repos/zooniverse/Panoptes/subscribers","subscription_url":"https://api.github.com/repos/zooniverse/Panoptes/subscription","commits_url":"https://api.github.com/repos/zooniverse/Panoptes/commits{/sha}","git_commits_url":"https://api.github.com/repos/zooniverse/Panoptes/git/commits{/sha}","comments_url":"https://api.github.com/repos/zooniverse/Panoptes/comments{/number}","issue_comment_url":"https://api.github.com/repos/zooniverse/Panoptes/issues/comments{/number}","contents_url":"https://api.github.com/repos/zooniverse/Panoptes/contents/{+path}","compare_url":"https://api.github.com/repos/zooniverse/Panoptes/compare/{base}...{head}","merges_url":"https://api.github.com/repos/zooniverse/Panoptes/merges","archive_url":"https://api.github.com/repos/zooniverse/Panoptes/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/zooniverse/Panoptes/downloads","issues_url":"https://api.github.com/repos/zooniverse/Panoptes/issues{/number}","pulls_url":"https://api.github.com/repos/zooniverse/Panoptes/pulls{/number}","milestones_url":"https://api.github.com/repos/zooniverse/Panoptes/milestones{/number}","notifications_url":"https://api.github.com/repos/zooniverse/Panoptes/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/zooniverse/Panoptes/labels{/name}","releases_url":"https://api.github.com/repos/zooniverse/Panoptes/releases{/id}","deployments_url":"https://api.github.com/repos/zooniverse/Panoptes/deployments","created_at":"2014-04-22T16:16:02Z","updated_at":"2016-04-12T14:56:35Z","pushed_at":"2016-04-26T19:12:33Z","git_url":"git://github.com/zooniverse/Panoptes.git","ssh_url":"git@github.com:zooniverse/Panoptes.git","clone_url":"https://github.com/zooniverse/Panoptes.git","svn_url":"https://github.com/zooniverse/Panoptes","homepage":"","size":5740,"stargazers_count":45,"watchers_count":45,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":22,"mirror_url":null,"open_issues_count":96,"forks":22,"open_issues":96,"watchers":45,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/zooniverse/Panoptes/pulls/1787"},"html":{"href":"https://github.com/zooniverse/Panoptes/pull/1787"},"issue":{"href":"https://api.github.com/repos/zooniverse/Panoptes/issues/1787"},"comments":{"href":"https://api.github.com/repos/zooniverse/Panoptes/issues/1787/comments"},"review_comments":{"href":"https://api.github.com/repos/zooniverse/Panoptes/pulls/1787/comments"},"review_comment":{"href":"https://api.github.com/repos/zooniverse/Panoptes/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/zooniverse/Panoptes/pulls/1787/commits"},"statuses":{"href":"https://api.github.com/repos/zooniverse/Panoptes/statuses/40a27cceebdfa07a5cce4a2f6851b071e0e0762e"}}}}