{"action":"created","issue":{"url":"https://api.github.com/repos/tyarkoni/transitions/issues/125","repository_url":"https://api.github.com/repos/tyarkoni/transitions","labels_url":"https://api.github.com/repos/tyarkoni/transitions/issues/125/labels{/name}","comments_url":"https://api.github.com/repos/tyarkoni/transitions/issues/125/comments","events_url":"https://api.github.com/repos/tyarkoni/transitions/issues/125/events","html_url":"https://github.com/tyarkoni/transitions/issues/125","id":167050651,"number":125,"title":"add aliases","user":{"login":"julianhille","id":741067,"avatar_url":"https://avatars.githubusercontent.com/u/741067?v=3","gravatar_id":"","url":"https://api.github.com/users/julianhille","html_url":"https://github.com/julianhille","followers_url":"https://api.github.com/users/julianhille/followers","following_url":"https://api.github.com/users/julianhille/following{/other_user}","gists_url":"https://api.github.com/users/julianhille/gists{/gist_id}","starred_url":"https://api.github.com/users/julianhille/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/julianhille/subscriptions","organizations_url":"https://api.github.com/users/julianhille/orgs","repos_url":"https://api.github.com/users/julianhille/repos","events_url":"https://api.github.com/users/julianhille/events{/privacy}","received_events_url":"https://api.github.com/users/julianhille/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":9,"created_at":"2016-07-22T13:55:44Z","updated_at":"2016-08-14T13:27:43Z","closed_at":null,"body":"i would like to see aliases which are just another name for the exact same transition."},"comment":{"url":"https://api.github.com/repos/tyarkoni/transitions/issues/comments/239673508","html_url":"https://github.com/tyarkoni/transitions/issues/125#issuecomment-239673508","issue_url":"https://api.github.com/repos/tyarkoni/transitions/issues/125","id":239673508,"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-08-14T13:27:43Z","updated_at":"2016-08-14T13:27:43Z","body":"Good point,\r\n\r\nin this case it gets a bit more messy:\r\n```python\r\nclass Model(object):\r\n        ...\r\n        else:\r\n            target_func = getattr(self, target)\r\n            def alias_func(*args, **kwargs):\r\n                logger.info(\"Calling alias %s for trigger %s\" % (alias, target))\r\n                target_func(*args,  **kwargs)\r\n            setattr(self, alias, alias_func)\r\n```\r\nOutput would be something like:\r\n\r\n```\r\nMacBook-Pro-3:transitions alneuman$ python aliastest.py \r\n...\r\nwalking\r\nINFO:__main__:Calling alias pause for trigger stop\r\nINFO:transitions.core:Initiating transition from state walking to state stopped...\r\nINFO:transitions.core:Exited state walking\r\nINFO:transitions.core:Entered state stopped\r\nstopped\r\nINFO:__main__:Calling alias stroll for trigger walk\r\nINFO:transitions.core:Initiating transition from state stopped to state walking...\r\nINFO:transitions.core:Exited state stopped\r\nINFO:transitions.core:Entered state walking\r\nwalking\r\n```"}}
{"actor":{"display_login":"aleneum"}}