{"action":"created","issue":{"url":"https://api.github.com/repos/code-corps/code-corps-api/issues/105","labels_url":"https://api.github.com/repos/code-corps/code-corps-api/issues/105/labels{/name}","comments_url":"https://api.github.com/repos/code-corps/code-corps-api/issues/105/comments","events_url":"https://api.github.com/repos/code-corps/code-corps-api/issues/105/events","html_url":"https://github.com/code-corps/code-corps-api/pull/105","id":121178222,"number":105,"title":"Add state and allow skipping numbers","user":{"login":"JoshSmith","id":321667,"avatar_url":"https://avatars.githubusercontent.com/u/321667?v=3","gravatar_id":"","url":"https://api.github.com/users/JoshSmith","html_url":"https://github.com/JoshSmith","followers_url":"https://api.github.com/users/JoshSmith/followers","following_url":"https://api.github.com/users/JoshSmith/following{/other_user}","gists_url":"https://api.github.com/users/JoshSmith/gists{/gist_id}","starred_url":"https://api.github.com/users/JoshSmith/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JoshSmith/subscriptions","organizations_url":"https://api.github.com/users/JoshSmith/orgs","repos_url":"https://api.github.com/users/JoshSmith/repos","events_url":"https://api.github.com/users/JoshSmith/events{/privacy}","received_events_url":"https://api.github.com/users/JoshSmith/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/code-corps/code-corps-api/labels/awaiting%20review","name":"awaiting review","color":"5319e7"}],"state":"open","locked":false,"assignee":{"login":"begedin","id":1925540,"avatar_url":"https://avatars.githubusercontent.com/u/1925540?v=3","gravatar_id":"","url":"https://api.github.com/users/begedin","html_url":"https://github.com/begedin","followers_url":"https://api.github.com/users/begedin/followers","following_url":"https://api.github.com/users/begedin/following{/other_user}","gists_url":"https://api.github.com/users/begedin/gists{/gist_id}","starred_url":"https://api.github.com/users/begedin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/begedin/subscriptions","organizations_url":"https://api.github.com/users/begedin/orgs","repos_url":"https://api.github.com/users/begedin/repos","events_url":"https://api.github.com/users/begedin/events{/privacy}","received_events_url":"https://api.github.com/users/begedin/received_events","type":"User","site_admin":false},"milestone":null,"comments":9,"created_at":"2015-12-09T07:20:18Z","updated_at":"2015-12-09T18:03:09Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/code-corps/code-corps-api/pulls/105","html_url":"https://github.com/code-corps/code-corps-api/pull/105","diff_url":"https://github.com/code-corps/code-corps-api/pull/105.diff","patch_url":"https://github.com/code-corps/code-corps-api/pull/105.patch"},"body":"This will close #96, #98 and #104.\r\n\r\nInstead of refactoring out `sequenced`, I opted to keep it and instead use the `skip lambda`, which requires doing some things with the indexes (unfortunate but necessary) and adding a new validation. This should ideally prevent collisions. I think postgres' locking will also prevent it, which is implemented in the gem.\r\n\r\nAlso adds a `published` and `draft` state.\r\n\r\nWe should still:\r\n\r\n- [x] Fix couple of tests I lazily left failing\r\n- [x] Add an `edited` bool, or make it a state if we can scope published posts to both published/edited\r\n- [x] Add an `edited_at` timestamp whenever an `edited` post is saved\r\n- [x] Create `PATCH` method to update the published/edited states\r\n- [x] Write serializer specs to ensure the state is getting passed on. This shouldn't be named `aasm_state`, but wrapped somewhere (model?) to not be exposed directly\r\n- [x] Write API-level specs to ensure we're setting this information correctly\r\n\r\nAnd anything else I'm missing here."},"comment":{"url":"https://api.github.com/repos/code-corps/code-corps-api/issues/comments/163341959","html_url":"https://github.com/code-corps/code-corps-api/pull/105#issuecomment-163341959","issue_url":"https://api.github.com/repos/code-corps/code-corps-api/issues/105","id":163341959,"user":{"login":"scarfdestroyer","id":15225519,"avatar_url":"https://avatars.githubusercontent.com/u/15225519?v=3","gravatar_id":"","url":"https://api.github.com/users/scarfdestroyer","html_url":"https://github.com/scarfdestroyer","followers_url":"https://api.github.com/users/scarfdestroyer/followers","following_url":"https://api.github.com/users/scarfdestroyer/following{/other_user}","gists_url":"https://api.github.com/users/scarfdestroyer/gists{/gist_id}","starred_url":"https://api.github.com/users/scarfdestroyer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/scarfdestroyer/subscriptions","organizations_url":"https://api.github.com/users/scarfdestroyer/orgs","repos_url":"https://api.github.com/users/scarfdestroyer/repos","events_url":"https://api.github.com/users/scarfdestroyer/events{/privacy}","received_events_url":"https://api.github.com/users/scarfdestroyer/received_events","type":"User","site_admin":false},"created_at":"2015-12-09T18:03:09Z","updated_at":"2015-12-09T18:03:09Z","body":":raised_hands: :hankey: :+1: "}}