{"action":"created","comment":{"url":"https://api.github.com/repos/artsy/exchange/pulls/comments/217046228","pull_request_review_id":154666491,"id":217046228,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIxNzA0NjIyOA==","diff_hunk":"@@ -3,7 +3,6 @@ class Types::OrderStateEnum < Types::BaseEnum\n   value 'PENDING', 'order is still pending submission by collector', value: Order::PENDING\n   value 'SUBMITTED', 'order is submitted by collector', value: Order::SUBMITTED","path":"app/graphql/types/order_state_enum.rb","position":2,"original_position":2,"commit_id":"48788ba23a239824cd165142750ef3072d65050a","original_commit_id":"48788ba23a239824cd165142750ef3072d65050a","user":{"login":"williardx","id":4432348,"node_id":"MDQ6VXNlcjQ0MzIzNDg=","avatar_url":"https://avatars1.githubusercontent.com/u/4432348?v=4","gravatar_id":"","url":"https://api.github.com/users/williardx","html_url":"https://github.com/williardx","followers_url":"https://api.github.com/users/williardx/followers","following_url":"https://api.github.com/users/williardx/following{/other_user}","gists_url":"https://api.github.com/users/williardx/gists{/gist_id}","starred_url":"https://api.github.com/users/williardx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/williardx/subscriptions","organizations_url":"https://api.github.com/users/williardx/orgs","repos_url":"https://api.github.com/users/williardx/repos","events_url":"https://api.github.com/users/williardx/events{/privacy}","received_events_url":"https://api.github.com/users/williardx/received_events","type":"User","site_admin":false},"body":"Don't need to fix this in this PR but we should change `collector` in this file to `buyer`","created_at":"2018-09-12T14:07:41Z","updated_at":"2018-09-12T14:07:41Z","html_url":"https://github.com/artsy/exchange/pull/169#discussion_r217046228","pull_request_url":"https://api.github.com/repos/artsy/exchange/pulls/169","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/artsy/exchange/pulls/comments/217046228"},"html":{"href":"https://github.com/artsy/exchange/pull/169#discussion_r217046228"},"pull_request":{"href":"https://api.github.com/repos/artsy/exchange/pulls/169"}}},"pull_request":{"url":"https://api.github.com/repos/artsy/exchange/pulls/169","id":214487530,"node_id":"MDExOlB1bGxSZXF1ZXN0MjE0NDg3NTMw","html_url":"https://github.com/artsy/exchange/pull/169","diff_url":"https://github.com/artsy/exchange/pull/169.diff","patch_url":"https://github.com/artsy/exchange/pull/169.patch","issue_url":"https://api.github.com/repos/artsy/exchange/issues/169","number":169,"state":"open","locked":false,"title":"Add State Reason","user":{"login":"ashkan18","id":1230819,"node_id":"MDQ6VXNlcjEyMzA4MTk=","avatar_url":"https://avatars0.githubusercontent.com/u/1230819?v=4","gravatar_id":"","url":"https://api.github.com/users/ashkan18","html_url":"https://github.com/ashkan18","followers_url":"https://api.github.com/users/ashkan18/followers","following_url":"https://api.github.com/users/ashkan18/following{/other_user}","gists_url":"https://api.github.com/users/ashkan18/gists{/gist_id}","starred_url":"https://api.github.com/users/ashkan18/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ashkan18/subscriptions","organizations_url":"https://api.github.com/users/ashkan18/orgs","repos_url":"https://api.github.com/users/ashkan18/repos","events_url":"https://api.github.com/users/ashkan18/events{/privacy}","received_events_url":"https://api.github.com/users/ashkan18/received_events","type":"User","site_admin":false},"body":"# Changes\r\nFollowing our previous discussions, we want to combine few states and add `reason` as separate field to describe why we ended up in this combined states. \r\nhttps://docs.google.com/drawings/d/1WIcdO7GygNICfePxMF1cdrKkUDu-26ZJDU0irYlYMcw/edit\r\n\r\nFor this to work, we added `state_reason` to `Order` and also `reason` to `StateHistory`.\r\n\r\nThe idea here is to define a set of possible _reasons_ for states that require reasons.\r\nWhen transitioning to one of this state that requires reason, you need to provide a valid reason from the all possible reasons for that state.\r\n\r\nCurrently only `canceled` state requires reason and there are two:\r\n- `seller_lapsed`\r\n- `seller_rejected`\r\nreasons.\r\n\r\nWe kept `seller_lapse` and `rejected` actions which will basically go to `canceled` state now but they will set the reason properly.\r\n\r\n","created_at":"2018-09-11T01:25:40Z","updated_at":"2018-09-12T14:07:41Z","closed_at":null,"merged_at":null,"merge_commit_sha":"7bc57eb43ce7b4bc9a3219aec244c41888fa1992","assignee":{"login":"williardx","id":4432348,"node_id":"MDQ6VXNlcjQ0MzIzNDg=","avatar_url":"https://avatars1.githubusercontent.com/u/4432348?v=4","gravatar_id":"","url":"https://api.github.com/users/williardx","html_url":"https://github.com/williardx","followers_url":"https://api.github.com/users/williardx/followers","following_url":"https://api.github.com/users/williardx/following{/other_user}","gists_url":"https://api.github.com/users/williardx/gists{/gist_id}","starred_url":"https://api.github.com/users/williardx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/williardx/subscriptions","organizations_url":"https://api.github.com/users/williardx/orgs","repos_url":"https://api.github.com/users/williardx/repos","events_url":"https://api.github.com/users/williardx/events{/privacy}","received_events_url":"https://api.github.com/users/williardx/received_events","type":"User","site_admin":false},"assignees":[{"login":"williardx","id":4432348,"node_id":"MDQ6VXNlcjQ0MzIzNDg=","avatar_url":"https://avatars1.githubusercontent.com/u/4432348?v=4","gravatar_id":"","url":"https://api.github.com/users/williardx","html_url":"https://github.com/williardx","followers_url":"https://api.github.com/users/williardx/followers","following_url":"https://api.github.com/users/williardx/following{/other_user}","gists_url":"https://api.github.com/users/williardx/gists{/gist_id}","starred_url":"https://api.github.com/users/williardx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/williardx/subscriptions","organizations_url":"https://api.github.com/users/williardx/orgs","repos_url":"https://api.github.com/users/williardx/repos","events_url":"https://api.github.com/users/williardx/events{/privacy}","received_events_url":"https://api.github.com/users/williardx/received_events","type":"User","site_admin":false}],"requested_reviewers":[{"login":"sweir27","id":2081340,"node_id":"MDQ6VXNlcjIwODEzNDA=","avatar_url":"https://avatars3.githubusercontent.com/u/2081340?v=4","gravatar_id":"","url":"https://api.github.com/users/sweir27","html_url":"https://github.com/sweir27","followers_url":"https://api.github.com/users/sweir27/followers","following_url":"https://api.github.com/users/sweir27/following{/other_user}","gists_url":"https://api.github.com/users/sweir27/gists{/gist_id}","starred_url":"https://api.github.com/users/sweir27/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sweir27/subscriptions","organizations_url":"https://api.github.com/users/sweir27/orgs","repos_url":"https://api.github.com/users/sweir27/repos","events_url":"https://api.github.com/users/sweir27/events{/privacy}","received_events_url":"https://api.github.com/users/sweir27/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/artsy/exchange/pulls/169/commits","review_comments_url":"https://api.github.com/repos/artsy/exchange/pulls/169/comments","review_comment_url":"https://api.github.com/repos/artsy/exchange/pulls/comments{/number}","comments_url":"https://api.github.com/repos/artsy/exchange/issues/169/comments","statuses_url":"https://api.github.com/repos/artsy/exchange/statuses/48788ba23a239824cd165142750ef3072d65050a","head":{"label":"ashkan18:reasoning","ref":"reasoning","sha":"48788ba23a239824cd165142750ef3072d65050a","user":{"login":"ashkan18","id":1230819,"node_id":"MDQ6VXNlcjEyMzA4MTk=","avatar_url":"https://avatars0.githubusercontent.com/u/1230819?v=4","gravatar_id":"","url":"https://api.github.com/users/ashkan18","html_url":"https://github.com/ashkan18","followers_url":"https://api.github.com/users/ashkan18/followers","following_url":"https://api.github.com/users/ashkan18/following{/other_user}","gists_url":"https://api.github.com/users/ashkan18/gists{/gist_id}","starred_url":"https://api.github.com/users/ashkan18/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ashkan18/subscriptions","organizations_url":"https://api.github.com/users/ashkan18/orgs","repos_url":"https://api.github.com/users/ashkan18/repos","events_url":"https://api.github.com/users/ashkan18/events{/privacy}","received_events_url":"https://api.github.com/users/ashkan18/received_events","type":"User","site_admin":false},"repo":{"id":138088009,"node_id":"MDEwOlJlcG9zaXRvcnkxMzgwODgwMDk=","name":"exchange","full_name":"ashkan18/exchange","owner":{"login":"ashkan18","id":1230819,"node_id":"MDQ6VXNlcjEyMzA4MTk=","avatar_url":"https://avatars0.githubusercontent.com/u/1230819?v=4","gravatar_id":"","url":"https://api.github.com/users/ashkan18","html_url":"https://github.com/ashkan18","followers_url":"https://api.github.com/users/ashkan18/followers","following_url":"https://api.github.com/users/ashkan18/following{/other_user}","gists_url":"https://api.github.com/users/ashkan18/gists{/gist_id}","starred_url":"https://api.github.com/users/ashkan18/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ashkan18/subscriptions","organizations_url":"https://api.github.com/users/ashkan18/orgs","repos_url":"https://api.github.com/users/ashkan18/repos","events_url":"https://api.github.com/users/ashkan18/events{/privacy}","received_events_url":"https://api.github.com/users/ashkan18/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ashkan18/exchange","description":"Artsy Order Management","fork":true,"url":"https://api.github.com/repos/ashkan18/exchange","forks_url":"https://api.github.com/repos/ashkan18/exchange/forks","keys_url":"https://api.github.com/repos/ashkan18/exchange/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ashkan18/exchange/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ashkan18/exchange/teams","hooks_url":"https://api.github.com/repos/ashkan18/exchange/hooks","issue_events_url":"https://api.github.com/repos/ashkan18/exchange/issues/events{/number}","events_url":"https://api.github.com/repos/ashkan18/exchange/events","assignees_url":"https://api.github.com/repos/ashkan18/exchange/assignees{/user}","branches_url":"https://api.github.com/repos/ashkan18/exchange/branches{/branch}","tags_url":"https://api.github.com/repos/ashkan18/exchange/tags","blobs_url":"https://api.github.com/repos/ashkan18/exchange/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ashkan18/exchange/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ashkan18/exchange/git/refs{/sha}","trees_url":"https://api.github.com/repos/ashkan18/exchange/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ashkan18/exchange/statuses/{sha}","languages_url":"https://api.github.com/repos/ashkan18/exchange/languages","stargazers_url":"https://api.github.com/repos/ashkan18/exchange/stargazers","contributors_url":"https://api.github.com/repos/ashkan18/exchange/contributors","subscribers_url":"https://api.github.com/repos/ashkan18/exchange/subscribers","subscription_url":"https://api.github.com/repos/ashkan18/exchange/subscription","commits_url":"https://api.github.com/repos/ashkan18/exchange/commits{/sha}","git_commits_url":"https://api.github.com/repos/ashkan18/exchange/git/commits{/sha}","comments_url":"https://api.github.com/repos/ashkan18/exchange/comments{/number}","issue_comment_url":"https://api.github.com/repos/ashkan18/exchange/issues/comments{/number}","contents_url":"https://api.github.com/repos/ashkan18/exchange/contents/{+path}","compare_url":"https://api.github.com/repos/ashkan18/exchange/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ashkan18/exchange/merges","archive_url":"https://api.github.com/repos/ashkan18/exchange/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ashkan18/exchange/downloads","issues_url":"https://api.github.com/repos/ashkan18/exchange/issues{/number}","pulls_url":"https://api.github.com/repos/ashkan18/exchange/pulls{/number}","milestones_url":"https://api.github.com/repos/ashkan18/exchange/milestones{/number}","notifications_url":"https://api.github.com/repos/ashkan18/exchange/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ashkan18/exchange/labels{/name}","releases_url":"https://api.github.com/repos/ashkan18/exchange/releases{/id}","deployments_url":"https://api.github.com/repos/ashkan18/exchange/deployments","created_at":"2018-06-20T21:32:30Z","updated_at":"2018-06-20T21:32:32Z","pushed_at":"2018-09-12T01:04:03Z","git_url":"git://github.com/ashkan18/exchange.git","ssh_url":"git@github.com:ashkan18/exchange.git","clone_url":"https://github.com/ashkan18/exchange.git","svn_url":"https://github.com/ashkan18/exchange","homepage":"","size":723,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"artsy:master","ref":"master","sha":"014227c476f3d78283495bcfa85ec2ebd8a00087","user":{"login":"artsy","id":546231,"node_id":"MDEyOk9yZ2FuaXphdGlvbjU0NjIzMQ==","avatar_url":"https://avatars3.githubusercontent.com/u/546231?v=4","gravatar_id":"","url":"https://api.github.com/users/artsy","html_url":"https://github.com/artsy","followers_url":"https://api.github.com/users/artsy/followers","following_url":"https://api.github.com/users/artsy/following{/other_user}","gists_url":"https://api.github.com/users/artsy/gists{/gist_id}","starred_url":"https://api.github.com/users/artsy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/artsy/subscriptions","organizations_url":"https://api.github.com/users/artsy/orgs","repos_url":"https://api.github.com/users/artsy/repos","events_url":"https://api.github.com/users/artsy/events{/privacy}","received_events_url":"https://api.github.com/users/artsy/received_events","type":"Organization","site_admin":false},"repo":{"id":136387707,"node_id":"MDEwOlJlcG9zaXRvcnkxMzYzODc3MDc=","name":"exchange","full_name":"artsy/exchange","owner":{"login":"artsy","id":546231,"node_id":"MDEyOk9yZ2FuaXphdGlvbjU0NjIzMQ==","avatar_url":"https://avatars3.githubusercontent.com/u/546231?v=4","gravatar_id":"","url":"https://api.github.com/users/artsy","html_url":"https://github.com/artsy","followers_url":"https://api.github.com/users/artsy/followers","following_url":"https://api.github.com/users/artsy/following{/other_user}","gists_url":"https://api.github.com/users/artsy/gists{/gist_id}","starred_url":"https://api.github.com/users/artsy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/artsy/subscriptions","organizations_url":"https://api.github.com/users/artsy/orgs","repos_url":"https://api.github.com/users/artsy/repos","events_url":"https://api.github.com/users/artsy/events{/privacy}","received_events_url":"https://api.github.com/users/artsy/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/artsy/exchange","description":"Artsy Order Management","fork":false,"url":"https://api.github.com/repos/artsy/exchange","forks_url":"https://api.github.com/repos/artsy/exchange/forks","keys_url":"https://api.github.com/repos/artsy/exchange/keys{/key_id}","collaborators_url":"https://api.github.com/repos/artsy/exchange/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/artsy/exchange/teams","hooks_url":"https://api.github.com/repos/artsy/exchange/hooks","issue_events_url":"https://api.github.com/repos/artsy/exchange/issues/events{/number}","events_url":"https://api.github.com/repos/artsy/exchange/events","assignees_url":"https://api.github.com/repos/artsy/exchange/assignees{/user}","branches_url":"https://api.github.com/repos/artsy/exchange/branches{/branch}","tags_url":"https://api.github.com/repos/artsy/exchange/tags","blobs_url":"https://api.github.com/repos/artsy/exchange/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/artsy/exchange/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/artsy/exchange/git/refs{/sha}","trees_url":"https://api.github.com/repos/artsy/exchange/git/trees{/sha}","statuses_url":"https://api.github.com/repos/artsy/exchange/statuses/{sha}","languages_url":"https://api.github.com/repos/artsy/exchange/languages","stargazers_url":"https://api.github.com/repos/artsy/exchange/stargazers","contributors_url":"https://api.github.com/repos/artsy/exchange/contributors","subscribers_url":"https://api.github.com/repos/artsy/exchange/subscribers","subscription_url":"https://api.github.com/repos/artsy/exchange/subscription","commits_url":"https://api.github.com/repos/artsy/exchange/commits{/sha}","git_commits_url":"https://api.github.com/repos/artsy/exchange/git/commits{/sha}","comments_url":"https://api.github.com/repos/artsy/exchange/comments{/number}","issue_comment_url":"https://api.github.com/repos/artsy/exchange/issues/comments{/number}","contents_url":"https://api.github.com/repos/artsy/exchange/contents/{+path}","compare_url":"https://api.github.com/repos/artsy/exchange/compare/{base}...{head}","merges_url":"https://api.github.com/repos/artsy/exchange/merges","archive_url":"https://api.github.com/repos/artsy/exchange/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/artsy/exchange/downloads","issues_url":"https://api.github.com/repos/artsy/exchange/issues{/number}","pulls_url":"https://api.github.com/repos/artsy/exchange/pulls{/number}","milestones_url":"https://api.github.com/repos/artsy/exchange/milestones{/number}","notifications_url":"https://api.github.com/repos/artsy/exchange/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/artsy/exchange/labels{/name}","releases_url":"https://api.github.com/repos/artsy/exchange/releases{/id}","deployments_url":"https://api.github.com/repos/artsy/exchange/deployments","created_at":"2018-06-06T21:24:37Z","updated_at":"2018-09-11T01:14:22Z","pushed_at":"2018-09-12T01:05:38Z","git_url":"git://github.com/artsy/exchange.git","ssh_url":"git@github.com:artsy/exchange.git","clone_url":"https://github.com/artsy/exchange.git","svn_url":"https://github.com/artsy/exchange","homepage":"","size":676,"stargazers_count":7,"watchers_count":7,"language":"Ruby","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":16,"mirror_url":null,"archived":false,"open_issues_count":10,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":16,"open_issues":10,"watchers":7,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/artsy/exchange/pulls/169"},"html":{"href":"https://github.com/artsy/exchange/pull/169"},"issue":{"href":"https://api.github.com/repos/artsy/exchange/issues/169"},"comments":{"href":"https://api.github.com/repos/artsy/exchange/issues/169/comments"},"review_comments":{"href":"https://api.github.com/repos/artsy/exchange/pulls/169/comments"},"review_comment":{"href":"https://api.github.com/repos/artsy/exchange/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/artsy/exchange/pulls/169/commits"},"statuses":{"href":"https://api.github.com/repos/artsy/exchange/statuses/48788ba23a239824cd165142750ef3072d65050a"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"williardx"}}