{"action":"opened","number":8,"pull_request":{"url":"https://api.github.com/repos/marmelab/tree.js/pulls/8","id":29752813,"html_url":"https://github.com/marmelab/tree.js/pull/8","diff_url":"https://github.com/marmelab/tree.js/pull/8.diff","patch_url":"https://github.com/marmelab/tree.js/pull/8.patch","issue_url":"https://api.github.com/repos/marmelab/tree.js/issues/8","number":8,"state":"open","locked":false,"title":"[WIP] Better hook listeners process for 2.0","user":{"login":"RobinBressan","id":4641116,"avatar_url":"https://avatars.githubusercontent.com/u/4641116?v=3","gravatar_id":"","url":"https://api.github.com/users/RobinBressan","html_url":"https://github.com/RobinBressan","followers_url":"https://api.github.com/users/RobinBressan/followers","following_url":"https://api.github.com/users/RobinBressan/following{/other_user}","gists_url":"https://api.github.com/users/RobinBressan/gists{/gist_id}","starred_url":"https://api.github.com/users/RobinBressan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RobinBressan/subscriptions","organizations_url":"https://api.github.com/users/RobinBressan/orgs","repos_url":"https://api.github.com/users/RobinBressan/repos","events_url":"https://api.github.com/users/RobinBressan/events{/privacy}","received_events_url":"https://api.github.com/users/RobinBressan/received_events","type":"User","site_admin":false},"body":"Today we need to call a next callback inside each hook listener to run the next one or to stop the chain. It is not the best way to do it with promise.\r\n\r\nBecause of that, the `next` callback has to be removed.\r\n\r\n### Before\r\n\r\n```javascript\r\nhookableTree.registerListener(hookableTree.HOOK_PRE_APPEND, function(newNode) {\r\n    apiCall('/foo/bar').then(function() {\r\n        next();\r\n    }, next);\r\n});\r\n```\r\n\r\n### After\r\n\r\n```javascript\r\nhookableTree.registerListener(hookableTree.HOOK_PRE_APPEND, function(newNode) {\r\n    return apiCall('/foo/bar');\r\n});\r\n```\r\n\r\n- [x] Update hook dispatch\r\n- [x] Update tests ","created_at":"2015-02-21T12:04:45Z","updated_at":"2015-02-21T12:04:45Z","closed_at":null,"merged_at":null,"merge_commit_sha":"6f0e6dc92bcbec5146def070bcd8c7119b1a6c27","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/marmelab/tree.js/pulls/8/commits","review_comments_url":"https://api.github.com/repos/marmelab/tree.js/pulls/8/comments","review_comment_url":"https://api.github.com/repos/marmelab/tree.js/pulls/comments/{number}","comments_url":"https://api.github.com/repos/marmelab/tree.js/issues/8/comments","statuses_url":"https://api.github.com/repos/marmelab/tree.js/statuses/4a9144fcb2d79364ee430becd23df3e7b47e0b72","head":{"label":"marmelab:hooks_2.0","ref":"hooks_2.0","sha":"4a9144fcb2d79364ee430becd23df3e7b47e0b72","user":{"login":"marmelab","id":3116319,"avatar_url":"https://avatars.githubusercontent.com/u/3116319?v=3","gravatar_id":"","url":"https://api.github.com/users/marmelab","html_url":"https://github.com/marmelab","followers_url":"https://api.github.com/users/marmelab/followers","following_url":"https://api.github.com/users/marmelab/following{/other_user}","gists_url":"https://api.github.com/users/marmelab/gists{/gist_id}","starred_url":"https://api.github.com/users/marmelab/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marmelab/subscriptions","organizations_url":"https://api.github.com/users/marmelab/orgs","repos_url":"https://api.github.com/users/marmelab/repos","events_url":"https://api.github.com/users/marmelab/events{/privacy}","received_events_url":"https://api.github.com/users/marmelab/received_events","type":"Organization","site_admin":false},"repo":{"id":22261189,"name":"tree.js","full_name":"marmelab/tree.js","owner":{"login":"marmelab","id":3116319,"avatar_url":"https://avatars.githubusercontent.com/u/3116319?v=3","gravatar_id":"","url":"https://api.github.com/users/marmelab","html_url":"https://github.com/marmelab","followers_url":"https://api.github.com/users/marmelab/followers","following_url":"https://api.github.com/users/marmelab/following{/other_user}","gists_url":"https://api.github.com/users/marmelab/gists{/gist_id}","starred_url":"https://api.github.com/users/marmelab/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marmelab/subscriptions","organizations_url":"https://api.github.com/users/marmelab/orgs","repos_url":"https://api.github.com/users/marmelab/repos","events_url":"https://api.github.com/users/marmelab/events{/privacy}","received_events_url":"https://api.github.com/users/marmelab/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/marmelab/tree.js","description":"Tree.js is a JavaScript library to build and manipulate hookable trees.","fork":false,"url":"https://api.github.com/repos/marmelab/tree.js","forks_url":"https://api.github.com/repos/marmelab/tree.js/forks","keys_url":"https://api.github.com/repos/marmelab/tree.js/keys{/key_id}","collaborators_url":"https://api.github.com/repos/marmelab/tree.js/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/marmelab/tree.js/teams","hooks_url":"https://api.github.com/repos/marmelab/tree.js/hooks","issue_events_url":"https://api.github.com/repos/marmelab/tree.js/issues/events{/number}","events_url":"https://api.github.com/repos/marmelab/tree.js/events","assignees_url":"https://api.github.com/repos/marmelab/tree.js/assignees{/user}","branches_url":"https://api.github.com/repos/marmelab/tree.js/branches{/branch}","tags_url":"https://api.github.com/repos/marmelab/tree.js/tags","blobs_url":"https://api.github.com/repos/marmelab/tree.js/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/marmelab/tree.js/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/marmelab/tree.js/git/refs{/sha}","trees_url":"https://api.github.com/repos/marmelab/tree.js/git/trees{/sha}","statuses_url":"https://api.github.com/repos/marmelab/tree.js/statuses/{sha}","languages_url":"https://api.github.com/repos/marmelab/tree.js/languages","stargazers_url":"https://api.github.com/repos/marmelab/tree.js/stargazers","contributors_url":"https://api.github.com/repos/marmelab/tree.js/contributors","subscribers_url":"https://api.github.com/repos/marmelab/tree.js/subscribers","subscription_url":"https://api.github.com/repos/marmelab/tree.js/subscription","commits_url":"https://api.github.com/repos/marmelab/tree.js/commits{/sha}","git_commits_url":"https://api.github.com/repos/marmelab/tree.js/git/commits{/sha}","comments_url":"https://api.github.com/repos/marmelab/tree.js/comments{/number}","issue_comment_url":"https://api.github.com/repos/marmelab/tree.js/issues/comments/{number}","contents_url":"https://api.github.com/repos/marmelab/tree.js/contents/{+path}","compare_url":"https://api.github.com/repos/marmelab/tree.js/compare/{base}...{head}","merges_url":"https://api.github.com/repos/marmelab/tree.js/merges","archive_url":"https://api.github.com/repos/marmelab/tree.js/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/marmelab/tree.js/downloads","issues_url":"https://api.github.com/repos/marmelab/tree.js/issues{/number}","pulls_url":"https://api.github.com/repos/marmelab/tree.js/pulls{/number}","milestones_url":"https://api.github.com/repos/marmelab/tree.js/milestones{/number}","notifications_url":"https://api.github.com/repos/marmelab/tree.js/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/marmelab/tree.js/labels{/name}","releases_url":"https://api.github.com/repos/marmelab/tree.js/releases{/id}","created_at":"2014-07-25T15:16:03Z","updated_at":"2015-02-16T06:39:13Z","pushed_at":"2015-02-21T11:59:35Z","git_url":"git://github.com/marmelab/tree.js.git","ssh_url":"git@github.com:marmelab/tree.js.git","clone_url":"https://github.com/marmelab/tree.js.git","svn_url":"https://github.com/marmelab/tree.js","homepage":"","size":362,"stargazers_count":94,"watchers_count":94,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":5,"mirror_url":null,"open_issues_count":3,"forks":5,"open_issues":3,"watchers":94,"default_branch":"master"}},"base":{"label":"marmelab:master","ref":"master","sha":"7063ba7863caf6de06c36c12602f9ed06d5fc99d","user":{"login":"marmelab","id":3116319,"avatar_url":"https://avatars.githubusercontent.com/u/3116319?v=3","gravatar_id":"","url":"https://api.github.com/users/marmelab","html_url":"https://github.com/marmelab","followers_url":"https://api.github.com/users/marmelab/followers","following_url":"https://api.github.com/users/marmelab/following{/other_user}","gists_url":"https://api.github.com/users/marmelab/gists{/gist_id}","starred_url":"https://api.github.com/users/marmelab/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marmelab/subscriptions","organizations_url":"https://api.github.com/users/marmelab/orgs","repos_url":"https://api.github.com/users/marmelab/repos","events_url":"https://api.github.com/users/marmelab/events{/privacy}","received_events_url":"https://api.github.com/users/marmelab/received_events","type":"Organization","site_admin":false},"repo":{"id":22261189,"name":"tree.js","full_name":"marmelab/tree.js","owner":{"login":"marmelab","id":3116319,"avatar_url":"https://avatars.githubusercontent.com/u/3116319?v=3","gravatar_id":"","url":"https://api.github.com/users/marmelab","html_url":"https://github.com/marmelab","followers_url":"https://api.github.com/users/marmelab/followers","following_url":"https://api.github.com/users/marmelab/following{/other_user}","gists_url":"https://api.github.com/users/marmelab/gists{/gist_id}","starred_url":"https://api.github.com/users/marmelab/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marmelab/subscriptions","organizations_url":"https://api.github.com/users/marmelab/orgs","repos_url":"https://api.github.com/users/marmelab/repos","events_url":"https://api.github.com/users/marmelab/events{/privacy}","received_events_url":"https://api.github.com/users/marmelab/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/marmelab/tree.js","description":"Tree.js is a JavaScript library to build and manipulate hookable trees.","fork":false,"url":"https://api.github.com/repos/marmelab/tree.js","forks_url":"https://api.github.com/repos/marmelab/tree.js/forks","keys_url":"https://api.github.com/repos/marmelab/tree.js/keys{/key_id}","collaborators_url":"https://api.github.com/repos/marmelab/tree.js/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/marmelab/tree.js/teams","hooks_url":"https://api.github.com/repos/marmelab/tree.js/hooks","issue_events_url":"https://api.github.com/repos/marmelab/tree.js/issues/events{/number}","events_url":"https://api.github.com/repos/marmelab/tree.js/events","assignees_url":"https://api.github.com/repos/marmelab/tree.js/assignees{/user}","branches_url":"https://api.github.com/repos/marmelab/tree.js/branches{/branch}","tags_url":"https://api.github.com/repos/marmelab/tree.js/tags","blobs_url":"https://api.github.com/repos/marmelab/tree.js/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/marmelab/tree.js/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/marmelab/tree.js/git/refs{/sha}","trees_url":"https://api.github.com/repos/marmelab/tree.js/git/trees{/sha}","statuses_url":"https://api.github.com/repos/marmelab/tree.js/statuses/{sha}","languages_url":"https://api.github.com/repos/marmelab/tree.js/languages","stargazers_url":"https://api.github.com/repos/marmelab/tree.js/stargazers","contributors_url":"https://api.github.com/repos/marmelab/tree.js/contributors","subscribers_url":"https://api.github.com/repos/marmelab/tree.js/subscribers","subscription_url":"https://api.github.com/repos/marmelab/tree.js/subscription","commits_url":"https://api.github.com/repos/marmelab/tree.js/commits{/sha}","git_commits_url":"https://api.github.com/repos/marmelab/tree.js/git/commits{/sha}","comments_url":"https://api.github.com/repos/marmelab/tree.js/comments{/number}","issue_comment_url":"https://api.github.com/repos/marmelab/tree.js/issues/comments/{number}","contents_url":"https://api.github.com/repos/marmelab/tree.js/contents/{+path}","compare_url":"https://api.github.com/repos/marmelab/tree.js/compare/{base}...{head}","merges_url":"https://api.github.com/repos/marmelab/tree.js/merges","archive_url":"https://api.github.com/repos/marmelab/tree.js/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/marmelab/tree.js/downloads","issues_url":"https://api.github.com/repos/marmelab/tree.js/issues{/number}","pulls_url":"https://api.github.com/repos/marmelab/tree.js/pulls{/number}","milestones_url":"https://api.github.com/repos/marmelab/tree.js/milestones{/number}","notifications_url":"https://api.github.com/repos/marmelab/tree.js/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/marmelab/tree.js/labels{/name}","releases_url":"https://api.github.com/repos/marmelab/tree.js/releases{/id}","created_at":"2014-07-25T15:16:03Z","updated_at":"2015-02-16T06:39:13Z","pushed_at":"2015-02-21T11:59:35Z","git_url":"git://github.com/marmelab/tree.js.git","ssh_url":"git@github.com:marmelab/tree.js.git","clone_url":"https://github.com/marmelab/tree.js.git","svn_url":"https://github.com/marmelab/tree.js","homepage":"","size":362,"stargazers_count":94,"watchers_count":94,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":5,"mirror_url":null,"open_issues_count":3,"forks":5,"open_issues":3,"watchers":94,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/marmelab/tree.js/pulls/8"},"html":{"href":"https://github.com/marmelab/tree.js/pull/8"},"issue":{"href":"https://api.github.com/repos/marmelab/tree.js/issues/8"},"comments":{"href":"https://api.github.com/repos/marmelab/tree.js/issues/8/comments"},"review_comments":{"href":"https://api.github.com/repos/marmelab/tree.js/pulls/8/comments"},"review_comment":{"href":"https://api.github.com/repos/marmelab/tree.js/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/marmelab/tree.js/pulls/8/commits"},"statuses":{"href":"https://api.github.com/repos/marmelab/tree.js/statuses/4a9144fcb2d79364ee430becd23df3e7b47e0b72"}},"merged":false,"mergeable":true,"mergeable_state":"clean","merged_by":null,"comments":0,"review_comments":0,"commits":1,"additions":79,"deletions":86,"changed_files":4}}