GitHub PullRequestReviewCommentEvent at 2014-11-13 08:13:35
Repository: loopback-phase
Actor: bajtos
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/strongloop/loopback-phase/pulls/comments/20277105","id":20277105,"diff_hunk":"@@ -13,14 +13,19 @@ module.exports = Phase;\n  *\n  * @class Phase\n  *\n- * @prop {Phase} next The `Phase` to be executed after this `Phase`.\n  * @prop {String} id The name or identifier of the `Phase`.\n  *\n  * @param {String} id The name or identifier of the `Phase`.\n+ * @param {Object} options Options for the `Phase`","path":"lib/phase.js","position":8,"original_position":8,"commit_id":"bdd90497c6f209483ad07529496fd0b4d6eb19e0","original_commit_id":"bdd90497c6f209483ad07529496fd0b4d6eb19e0","user":{"login":"bajtos","id":1140553,"avatar_url":"https://avatars.githubusercontent.com/u/1140553?v=3","gravatar_id":"","url":"https://api.github.com/users/bajtos","html_url":"https://github.com/bajtos","followers_url":"https://api.github.com/users/bajtos/followers","following_url":"https://api.github.com/users/bajtos/following{/other_user}","gists_url":"https://api.github.com/users/bajtos/gists{/gist_id}","starred_url":"https://api.github.com/users/bajtos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bajtos/subscriptions","organizations_url":"https://api.github.com/users/bajtos/orgs","repos_url":"https://api.github.com/users/bajtos/repos","events_url":"https://api.github.com/users/bajtos/events{/privacy}","received_events_url":"https://api.github.com/users/bajtos/received_events","type":"User","site_admin":false},"body":"Please document the supported options (`id`, `parallel`) - I believe strong-docs supports something like `@options {Object} options` which can be followed by `@property {String} [id]`.\r\n\r\nAlso mention that the `id` argument can be omitted when the options object is used. A possible solution: add three examples showing how to use all three flavours - id, id + options, options only. ","created_at":"2014-11-13T08:13:35Z","updated_at":"2014-11-13T08:13:35Z","html_url":"https://github.com/strongloop/loopback-phase/pull/6#discussion_r20277105","pull_request_url":"https://api.github.com/repos/strongloop/loopback-phase/pulls/6","_links":{"self":{"href":"https://api.github.com/repos/strongloop/loopback-phase/pulls/comments/20277105"},"html":{"href":"https://github.com/strongloop/loopback-phase/pull/6#discussion_r20277105"},"pull_request":{"href":"https://api.github.com/repos/strongloop/loopback-phase/pulls/6"}}},"pull_request":{"url":"https://api.github.com/repos/strongloop/loopback-phase/pulls/6","id":24260460,"html_url":"https://github.com/strongloop/loopback-phase/pull/6","diff_url":"https://github.com/strongloop/loopback-phase/pull/6.diff","patch_url":"https://github.com/strongloop/loopback-phase/pull/6.patch","issue_url":"https://api.github.com/repos/strongloop/loopback-phase/issues/6","number":6,"state":"open","locked":false,"title":"Add an option to create Phases that run handlers in serial","user":{"login":"raymondfeng","id":540892,"avatar_url":"https://avatars.githubusercontent.com/u/540892?v=3","gravatar_id":"","url":"https://api.github.com/users/raymondfeng","html_url":"https://github.com/raymondfeng","followers_url":"https://api.github.com/users/raymondfeng/followers","following_url":"https://api.github.com/users/raymondfeng/following{/other_user}","gists_url":"https://api.github.com/users/raymondfeng/gists{/gist_id}","starred_url":"https://api.github.com/users/raymondfeng/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/raymondfeng/subscriptions","organizations_url":"https://api.github.com/users/raymondfeng/orgs","repos_url":"https://api.github.com/users/raymondfeng/repos","events_url":"https://api.github.com/users/raymondfeng/events{/privacy}","received_events_url":"https://api.github.com/users/raymondfeng/received_events","type":"User","site_admin":false},"body":"/to @ritch @bajtos \r\n\r\nThe PR adds an option (`options.serial`) to allow handlers in the same stage of a phase to be executed in serial and refactor the `run()` method to reduce number of closures.\r\n\r\nHere is the issue that I ran into with oAuth2 component.\r\n\r\nWe have 3 middleware: \r\n1. express session (create/restore req.session)\r\n2. passport.initialize (sets req.session to req._passport.session)\r\n3. passport.session (depends on 2)\r\n\r\nAll of them are session related and have to come in order. It makes sense to register 1 with `session` phase.\r\nThen I have to squeeze 2&3 into `session:after`.\r\n\r\nI could introduce more phases around session, such as 'session-creation', 'session-auth'. Just wonder if that would lead too many phases. ","created_at":"2014-11-11T23:59:28Z","updated_at":"2014-11-13T08:13:35Z","closed_at":null,"merged_at":null,"merge_commit_sha":"3c61c04dab82ee2f9d288f4b398bf5e77c7e9dfa","assignee":{"login":"raymondfeng","id":540892,"avatar_url":"https://avatars.githubusercontent.com/u/540892?v=3","gravatar_id":"","url":"https://api.github.com/users/raymondfeng","html_url":"https://github.com/raymondfeng","followers_url":"https://api.github.com/users/raymondfeng/followers","following_url":"https://api.github.com/users/raymondfeng/following{/other_user}","gists_url":"https://api.github.com/users/raymondfeng/gists{/gist_id}","starred_url":"https://api.github.com/users/raymondfeng/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/raymondfeng/subscriptions","organizations_url":"https://api.github.com/users/raymondfeng/orgs","repos_url":"https://api.github.com/users/raymondfeng/repos","events_url":"https://api.github.com/users/raymondfeng/events{/privacy}","received_events_url":"https://api.github.com/users/raymondfeng/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/strongloop/loopback-phase/pulls/6/commits","review_comments_url":"https://api.github.com/repos/strongloop/loopback-phase/pulls/6/comments","review_comment_url":"https://api.github.com/repos/strongloop/loopback-phase/pulls/comments/{number}","comments_url":"https://api.github.com/repos/strongloop/loopback-phase/issues/6/comments","statuses_url":"https://api.github.com/repos/strongloop/loopback-phase/statuses/bdd90497c6f209483ad07529496fd0b4d6eb19e0","head":{"label":"strongloop:feature/allow-serial-phase","ref":"feature/allow-serial-phase","sha":"bdd90497c6f209483ad07529496fd0b4d6eb19e0","user":{"login":"strongloop","id":3020012,"avatar_url":"https://avatars.githubusercontent.com/u/3020012?v=3","gravatar_id":"","url":"https://api.github.com/users/strongloop","html_url":"https://github.com/strongloop","followers_url":"https://api.github.com/users/strongloop/followers","following_url":"https://api.github.com/users/strongloop/following{/other_user}","gists_url":"https://api.github.com/users/strongloop/gists{/gist_id}","starred_url":"https://api.github.com/users/strongloop/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/strongloop/subscriptions","organizations_url":"https://api.github.com/users/strongloop/orgs","repos_url":"https://api.github.com/users/strongloop/repos","events_url":"https://api.github.com/users/strongloop/events{/privacy}","received_events_url":"https://api.github.com/users/strongloop/received_events","type":"Organization","site_admin":false},"repo":{"id":25045286,"name":"loopback-phase","full_name":"strongloop/loopback-phase","owner":{"login":"strongloop","id":3020012,"avatar_url":"https://avatars.githubusercontent.com/u/3020012?v=3","gravatar_id":"","url":"https://api.github.com/users/strongloop","html_url":"https://github.com/strongloop","followers_url":"https://api.github.com/users/strongloop/followers","following_url":"https://api.github.com/users/strongloop/following{/other_user}","gists_url":"https://api.github.com/users/strongloop/gists{/gist_id}","starred_url":"https://api.github.com/users/strongloop/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/strongloop/subscriptions","organizations_url":"https://api.github.com/users/strongloop/orgs","repos_url":"https://api.github.com/users/strongloop/repos","events_url":"https://api.github.com/users/strongloop/events{/privacy}","received_events_url":"https://api.github.com/users/strongloop/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/strongloop/loopback-phase","description":"Phase management for LoopBack applications","fork":false,"url":"https://api.github.com/repos/strongloop/loopback-phase","forks_url":"https://api.github.com/repos/strongloop/loopback-phase/forks","keys_url":"https://api.github.com/repos/strongloop/loopback-phase/keys{/key_id}","collaborators_url":"https://api.github.com/repos/strongloop/loopback-phase/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/strongloop/loopback-phase/teams","hooks_url":"https://api.github.com/repos/strongloop/loopback-phase/hooks","issue_events_url":"https://api.github.com/repos/strongloop/loopback-phase/issues/events{/number}","events_url":"https://api.github.com/repos/strongloop/loopback-phase/events","assignees_url":"https://api.github.com/repos/strongloop/loopback-phase/assignees{/user}","branches_url":"https://api.github.com/repos/strongloop/loopback-phase/branches{/branch}","tags_url":"https://api.github.com/repos/strongloop/loopback-phase/tags","blobs_url":"https://api.github.com/repos/strongloop/loopback-phase/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/strongloop/loopback-phase/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/strongloop/loopback-phase/git/refs{/sha}","trees_url":"https://api.github.com/repos/strongloop/loopback-phase/git/trees{/sha}","statuses_url":"https://api.github.com/repos/strongloop/loopback-phase/statuses/{sha}","languages_url":"https://api.github.com/repos/strongloop/loopback-phase/languages","stargazers_url":"https://api.github.com/repos/strongloop/loopback-phase/stargazers","contributors_url":"https://api.github.com/repos/strongloop/loopback-phase/contributors","subscribers_url":"https://api.github.com/repos/strongloop/loopback-phase/subscribers","subscription_url":"https://api.github.com/repos/strongloop/loopback-phase/subscription","commits_url":"https://api.github.com/repos/strongloop/loopback-phase/commits{/sha}","git_commits_url":"https://api.github.com/repos/strongloop/loopback-phase/git/commits{/sha}","comments_url":"https://api.github.com/repos/strongloop/loopback-phase/comments{/number}","issue_comment_url":"https://api.github.com/repos/strongloop/loopback-phase/issues/comments/{number}","contents_url":"https://api.github.com/repos/strongloop/loopback-phase/contents/{+path}","compare_url":"https://api.github.com/repos/strongloop/loopback-phase/compare/{base}...{head}","merges_url":"https://api.github.com/repos/strongloop/loopback-phase/merges","archive_url":"https://api.github.com/repos/strongloop/loopback-phase/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/strongloop/loopback-phase/downloads","issues_url":"https://api.github.com/repos/strongloop/loopback-phase/issues{/number}","pulls_url":"https://api.github.com/repos/strongloop/loopback-phase/pulls{/number}","milestones_url":"https://api.github.com/repos/strongloop/loopback-phase/milestones{/number}","notifications_url":"https://api.github.com/repos/strongloop/loopback-phase/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/strongloop/loopback-phase/labels{/name}","releases_url":"https://api.github.com/repos/strongloop/loopback-phase/releases{/id}","created_at":"2014-10-10T17:13:28Z","updated_at":"2014-10-22T20:34:24Z","pushed_at":"2014-11-13T08:08:29Z","git_url":"git://github.com/strongloop/loopback-phase.git","ssh_url":"git@github.com:strongloop/loopback-phase.git","clone_url":"https://github.com/strongloop/loopback-phase.git","svn_url":"https://github.com/strongloop/loopback-phase","homepage":"","size":556,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":2,"forks":0,"open_issues":2,"watchers":0,"default_branch":"master"}},"base":{"label":"strongloop:master","ref":"master","sha":"db75a39070e0413534e4f6d646529e7f1c326a70","user":{"login":"strongloop","id":3020012,"avatar_url":"https://avatars.githubusercontent.com/u/3020012?v=3","gravatar_id":"","url":"https://api.github.com/users/strongloop","html_url":"https://github.com/strongloop","followers_url":"https://api.github.com/users/strongloop/followers","following_url":"https://api.github.com/users/strongloop/following{/other_user}","gists_url":"https://api.github.com/users/strongloop/gists{/gist_id}","starred_url":"https://api.github.com/users/strongloop/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/strongloop/subscriptions","organizations_url":"https://api.github.com/users/strongloop/orgs","repos_url":"https://api.github.com/users/strongloop/repos","events_url":"https://api.github.com/users/strongloop/events{/privacy}","received_events_url":"https://api.github.com/users/strongloop/received_events","type":"Organization","site_admin":false},"repo":{"id":25045286,"name":"loopback-phase","full_name":"strongloop/loopback-phase","owner":{"login":"strongloop","id":3020012,"avatar_url":"https://avatars.githubusercontent.com/u/3020012?v=3","gravatar_id":"","url":"https://api.github.com/users/strongloop","html_url":"https://github.com/strongloop","followers_url":"https://api.github.com/users/strongloop/followers","following_url":"https://api.github.com/users/strongloop/following{/other_user}","gists_url":"https://api.github.com/users/strongloop/gists{/gist_id}","starred_url":"https://api.github.com/users/strongloop/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/strongloop/subscriptions","organizations_url":"https://api.github.com/users/strongloop/orgs","repos_url":"https://api.github.com/users/strongloop/repos","events_url":"https://api.github.com/users/strongloop/events{/privacy}","received_events_url":"https://api.github.com/users/strongloop/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/strongloop/loopback-phase","description":"Phase management for LoopBack applications","fork":false,"url":"https://api.github.com/repos/strongloop/loopback-phase","forks_url":"https://api.github.com/repos/strongloop/loopback-phase/forks","keys_url":"https://api.github.com/repos/strongloop/loopback-phase/keys{/key_id}","collaborators_url":"https://api.github.com/repos/strongloop/loopback-phase/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/strongloop/loopback-phase/teams","hooks_url":"https://api.github.com/repos/strongloop/loopback-phase/hooks","issue_events_url":"https://api.github.com/repos/strongloop/loopback-phase/issues/events{/number}","events_url":"https://api.github.com/repos/strongloop/loopback-phase/events","assignees_url":"https://api.github.com/repos/strongloop/loopback-phase/assignees{/user}","branches_url":"https://api.github.com/repos/strongloop/loopback-phase/branches{/branch}","tags_url":"https://api.github.com/repos/strongloop/loopback-phase/tags","blobs_url":"https://api.github.com/repos/strongloop/loopback-phase/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/strongloop/loopback-phase/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/strongloop/loopback-phase/git/refs{/sha}","trees_url":"https://api.github.com/repos/strongloop/loopback-phase/git/trees{/sha}","statuses_url":"https://api.github.com/repos/strongloop/loopback-phase/statuses/{sha}","languages_url":"https://api.github.com/repos/strongloop/loopback-phase/languages","stargazers_url":"https://api.github.com/repos/strongloop/loopback-phase/stargazers","contributors_url":"https://api.github.com/repos/strongloop/loopback-phase/contributors","subscribers_url":"https://api.github.com/repos/strongloop/loopback-phase/subscribers","subscription_url":"https://api.github.com/repos/strongloop/loopback-phase/subscription","commits_url":"https://api.github.com/repos/strongloop/loopback-phase/commits{/sha}","git_commits_url":"https://api.github.com/repos/strongloop/loopback-phase/git/commits{/sha}","comments_url":"https://api.github.com/repos/strongloop/loopback-phase/comments{/number}","issue_comment_url":"https://api.github.com/repos/strongloop/loopback-phase/issues/comments/{number}","contents_url":"https://api.github.com/repos/strongloop/loopback-phase/contents/{+path}","compare_url":"https://api.github.com/repos/strongloop/loopback-phase/compare/{base}...{head}","merges_url":"https://api.github.com/repos/strongloop/loopback-phase/merges","archive_url":"https://api.github.com/repos/strongloop/loopback-phase/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/strongloop/loopback-phase/downloads","issues_url":"https://api.github.com/repos/strongloop/loopback-phase/issues{/number}","pulls_url":"https://api.github.com/repos/strongloop/loopback-phase/pulls{/number}","milestones_url":"https://api.github.com/repos/strongloop/loopback-phase/milestones{/number}","notifications_url":"https://api.github.com/repos/strongloop/loopback-phase/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/strongloop/loopback-phase/labels{/name}","releases_url":"https://api.github.com/repos/strongloop/loopback-phase/releases{/id}","created_at":"2014-10-10T17:13:28Z","updated_at":"2014-10-22T20:34:24Z","pushed_at":"2014-11-13T08:08:29Z","git_url":"git://github.com/strongloop/loopback-phase.git","ssh_url":"git@github.com:strongloop/loopback-phase.git","clone_url":"https://github.com/strongloop/loopback-phase.git","svn_url":"https://github.com/strongloop/loopback-phase","homepage":"","size":556,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":2,"forks":0,"open_issues":2,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/strongloop/loopback-phase/pulls/6"},"html":{"href":"https://github.com/strongloop/loopback-phase/pull/6"},"issue":{"href":"https://api.github.com/repos/strongloop/loopback-phase/issues/6"},"comments":{"href":"https://api.github.com/repos/strongloop/loopback-phase/issues/6/comments"},"review_comments":{"href":"https://api.github.com/repos/strongloop/loopback-phase/pulls/6/comments"},"review_comment":{"href":"https://api.github.com/repos/strongloop/loopback-phase/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/strongloop/loopback-phase/pulls/6/commits"},"statuses":{"href":"https://api.github.com/repos/strongloop/loopback-phase/statuses/bdd90497c6f209483ad07529496fd0b4d6eb19e0"}}}}