{"action":"created","issue":{"url":"https://api.github.com/repos/tyarkoni/transitions/issues/40","labels_url":"https://api.github.com/repos/tyarkoni/transitions/issues/40/labels{/name}","comments_url":"https://api.github.com/repos/tyarkoni/transitions/issues/40/comments","events_url":"https://api.github.com/repos/tyarkoni/transitions/issues/40/events","html_url":"https://github.com/tyarkoni/transitions/issues/40","id":116292841,"number":40,"title":"Before and after state change","user":{"login":"omago","id":3735598,"avatar_url":"https://avatars.githubusercontent.com/u/3735598?v=3","gravatar_id":"","url":"https://api.github.com/users/omago","html_url":"https://github.com/omago","followers_url":"https://api.github.com/users/omago/followers","following_url":"https://api.github.com/users/omago/following{/other_user}","gists_url":"https://api.github.com/users/omago/gists{/gist_id}","starred_url":"https://api.github.com/users/omago/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/omago/subscriptions","organizations_url":"https://api.github.com/users/omago/orgs","repos_url":"https://api.github.com/users/omago/repos","events_url":"https://api.github.com/users/omago/events{/privacy}","received_events_url":"https://api.github.com/users/omago/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/tyarkoni/transitions/labels/question","name":"question","color":"cc317c"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":14,"created_at":"2015-11-11T09:03:38Z","updated_at":"2016-02-01T08:30:46Z","closed_at":null,"body":"Hi everybody,\r\n\r\nI noticed one thing, \"condition\" callback is triggered before \"before\" callback. I expected that \"before\" is called before \"condition\"? Does my logic make any sense?"},"comment":{"url":"https://api.github.com/repos/tyarkoni/transitions/issues/comments/177842980","html_url":"https://github.com/tyarkoni/transitions/issues/40#issuecomment-177842980","issue_url":"https://api.github.com/repos/tyarkoni/transitions/issues/40","id":177842980,"user":{"login":"aleneum","id":205986,"avatar_url":"https://avatars.githubusercontent.com/u/205986?v=3","gravatar_id":"","url":"https://api.github.com/users/aleneum","html_url":"https://github.com/aleneum","followers_url":"https://api.github.com/users/aleneum/followers","following_url":"https://api.github.com/users/aleneum/following{/other_user}","gists_url":"https://api.github.com/users/aleneum/gists{/gist_id}","starred_url":"https://api.github.com/users/aleneum/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aleneum/subscriptions","organizations_url":"https://api.github.com/users/aleneum/orgs","repos_url":"https://api.github.com/users/aleneum/repos","events_url":"https://api.github.com/users/aleneum/events{/privacy}","received_events_url":"https://api.github.com/users/aleneum/received_events","type":"User","site_admin":false},"created_at":"2016-02-01T08:30:46Z","updated_at":"2016-02-01T08:30:46Z","body":"Yeah, I am also convinced that this is a useful addition. Concerning naming: I think `before_transition`/`before_check` is a good solution. It might raise questions why there is no `after_check` and `after_transition` though. `action` is a bit more generic which is good (not focused on check) but also bad (semantically not as well embedded in the execution timeline as `before_check`). From these two I'd go with `before_*` and let time decide if we have to think about proper `after_*` handling. \r\nA third option could be thinking in events and let the keyword reference the transition. In this case I'd name it `on_triggered`, `on_executed` (`before_execute`?) or similar."}}