{"action":"created","issue":{"url":"https://api.github.com/repos/yahoo/fluxible/issues/71","labels_url":"https://api.github.com/repos/yahoo/fluxible/issues/71/labels{/name}","comments_url":"https://api.github.com/repos/yahoo/fluxible/issues/71/comments","events_url":"https://api.github.com/repos/yahoo/fluxible/issues/71/events","html_url":"https://github.com/yahoo/fluxible/pull/71","id":62873481,"number":71,"title":"Support promises in actions","user":{"login":"cesarandreu","id":656870,"avatar_url":"https://avatars.githubusercontent.com/u/656870?v=3","gravatar_id":"","url":"https://api.github.com/users/cesarandreu","html_url":"https://github.com/cesarandreu","followers_url":"https://api.github.com/users/cesarandreu/followers","following_url":"https://api.github.com/users/cesarandreu/following{/other_user}","gists_url":"https://api.github.com/users/cesarandreu/gists{/gist_id}","starred_url":"https://api.github.com/users/cesarandreu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cesarandreu/subscriptions","organizations_url":"https://api.github.com/users/cesarandreu/orgs","repos_url":"https://api.github.com/users/cesarandreu/repos","events_url":"https://api.github.com/users/cesarandreu/events{/privacy}","received_events_url":"https://api.github.com/users/cesarandreu/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/yahoo/fluxible/labels/ready","name":"ready","color":"ededed"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":8,"created_at":"2015-03-19T04:35:11Z","updated_at":"2015-03-31T20:34:19Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/yahoo/fluxible/pulls/71","html_url":"https://github.com/yahoo/fluxible/pull/71","diff_url":"https://github.com/yahoo/fluxible/pull/71.diff","patch_url":"https://github.com/yahoo/fluxible/pull/71.patch"},"body":"Closes #69.\r\n\r\nI added lots of tests to executeAction. New behavior:\r\n\r\n* Execute action returns a promise\r\n* If done callback is passed to execute action, it'll be called when the promise is resolved or rejected\r\n* If action returns a promise, resolve/reject execute action promise with result/error\r\n* If action takes less than 3 params, execute action promise will be resolved with action return value\r\n* If action throws an error, execute action promise will be rejected with thrown value\r\n* When action takes 3 params, it'll receive a callback that can reject/resolve the execute action promise\r\n\r\nShould be almost entirely backwards compatible. While writing this I realized that my change to `componentAction.executeAction` actually breaks backwards compatibility with component action handler, since now it'll only get executed when there's errors. Should I revert this change? \r\n\r\n* I'm not sure what your styleguide is like... I tried to replicate existing code and follow the linter's suggestions.\r\n* Should I update the docs as well?\r\n* Is my jsdoc-style comment alright? I'm not sure how to explain the different branches, so I just added a few lines on top of the method.\r\n* Is the goal to keep both promises and callbacks or are you gonna deprecate callbacks? (I'd vote for deprecating em)\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/yahoo/fluxible/issues/comments/88236132","html_url":"https://github.com/yahoo/fluxible/pull/71#issuecomment-88236132","issue_url":"https://api.github.com/repos/yahoo/fluxible/issues/71","id":88236132,"user":{"login":"mridgway","id":191142,"avatar_url":"https://avatars.githubusercontent.com/u/191142?v=3","gravatar_id":"","url":"https://api.github.com/users/mridgway","html_url":"https://github.com/mridgway","followers_url":"https://api.github.com/users/mridgway/followers","following_url":"https://api.github.com/users/mridgway/following{/other_user}","gists_url":"https://api.github.com/users/mridgway/gists{/gist_id}","starred_url":"https://api.github.com/users/mridgway/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mridgway/subscriptions","organizations_url":"https://api.github.com/users/mridgway/orgs","repos_url":"https://api.github.com/users/mridgway/repos","events_url":"https://api.github.com/users/mridgway/events{/privacy}","received_events_url":"https://api.github.com/users/mridgway/received_events","type":"User","site_admin":false},"created_at":"2015-03-31T20:34:19Z","updated_at":"2015-03-31T20:34:19Z","body":"@cesarandreu This looks good :+1: . I'm looking to pull this in today."}}