{"action":"created","comment":{"url":"https://api.github.com/repos/RackHD/on-tasks/pulls/comments/100232133","pull_request_review_id":20931525,"id":100232133,"diff_hunk":"@@ -88,28 +132,22 @@ function taskGraphFactory(\n         if (marker.permanentMark) {\n             return;\n         }\n-\n         marker.temporaryMark = true;\n-\n+        \n         _.forEach(task.waitingOn, function(value, dep) {\n             var nonTerminalOnStates = [];\n-\n-            // This won't actually get called because we do this same check in\n-            // _populateTaskData, but keep this here just to be defensive.\n-            if (!_.has(self.tasks, dep)) {\n-                throw new Error('Graph does not contain task with ID ' + dep);\n-            }\n-            // Expand 'finished' to all finished task states\n-            if (_.contains(value, Constants.Task.States.Finished)) {\n-                value = Constants.Task.FinishedStates;\n-                task.waitingOn[dep] = [Constants.Task.States.Finished];\n+            if (dep === \"either\") {","path":"lib/task-graph.js","position":79,"original_position":79,"commit_id":"9f51606e841e2f0760a35e48ccf22fd542d38bc3","original_commit_id":"cf002ac84599ee966083a61304b4a5372abc261b","user":{"login":"yyscamper","id":511378,"avatar_url":"https://avatars.githubusercontent.com/u/511378?v=3","gravatar_id":"","url":"https://api.github.com/users/yyscamper","html_url":"https://github.com/yyscamper","followers_url":"https://api.github.com/users/yyscamper/followers","following_url":"https://api.github.com/users/yyscamper/following{/other_user}","gists_url":"https://api.github.com/users/yyscamper/gists{/gist_id}","starred_url":"https://api.github.com/users/yyscamper/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yyscamper/subscriptions","organizations_url":"https://api.github.com/users/yyscamper/orgs","repos_url":"https://api.github.com/users/yyscamper/repos","events_url":"https://api.github.com/users/yyscamper/events{/privacy}","received_events_url":"https://api.github.com/users/yyscamper/received_events","type":"User","site_admin":false},"body":"The mongodb will not allow user to define variable name that starts with '$', so you could first choose to add the assertion logic, I think this is one of the place that is suitable for you mentioned code: https://github.com/RackHD/on-tasks/blob/master/lib/task-graph.js#L344","created_at":"2017-02-09T05:14:48Z","updated_at":"2017-02-09T05:14:48Z","html_url":"https://github.com/RackHD/on-tasks/pull/396#discussion_r100232133","pull_request_url":"https://api.github.com/repos/RackHD/on-tasks/pulls/396","_links":{"self":{"href":"https://api.github.com/repos/RackHD/on-tasks/pulls/comments/100232133"},"html":{"href":"https://github.com/RackHD/on-tasks/pull/396#discussion_r100232133"},"pull_request":{"href":"https://api.github.com/repos/RackHD/on-tasks/pulls/396"}}},"pull_request":{"url":"https://api.github.com/repos/RackHD/on-tasks/pulls/396","id":103423801,"html_url":"https://github.com/RackHD/on-tasks/pull/396","diff_url":"https://github.com/RackHD/on-tasks/pull/396.diff","patch_url":"https://github.com/RackHD/on-tasks/pull/396.patch","issue_url":"https://api.github.com/repos/RackHD/on-tasks/issues/396","number":396,"state":"open","locked":false,"title":"Added waitOn.either for logical workflow path","user":{"login":"zhangy42","id":14022164,"avatar_url":"https://avatars.githubusercontent.com/u/14022164?v=3","gravatar_id":"","url":"https://api.github.com/users/zhangy42","html_url":"https://github.com/zhangy42","followers_url":"https://api.github.com/users/zhangy42/followers","following_url":"https://api.github.com/users/zhangy42/following{/other_user}","gists_url":"https://api.github.com/users/zhangy42/gists{/gist_id}","starred_url":"https://api.github.com/users/zhangy42/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zhangy42/subscriptions","organizations_url":"https://api.github.com/users/zhangy42/orgs","repos_url":"https://api.github.com/users/zhangy42/repos","events_url":"https://api.github.com/users/zhangy42/events{/privacy}","received_events_url":"https://api.github.com/users/zhangy42/received_events","type":"User","site_admin":false},"body":"@RackHD/corecommitters \r\n@pscharla \r\n@VulpesArtificem \r\n\r\nThere are several highlights:\r\n\r\n1. Task Request comes from:\r\n\r\nhttps://rackhd.atlassian.net/browse/RAC-2043\r\n\r\n2. Since current waitOn can already do:\r\n\"trigger task based on both conditions\"\r\n\r\nThis feature is letting workflow engine do:\r\n\"trigger task based on one of these conditions ( ie: under waitOn.either) that is fulfilled\"\r\n\r\n3. There is also dependency clearing part in on-core:\r\n\r\nhttps://github.com/RackHD/on-core/pull/253\r\nThis feature need to be enabled by merging these two PRs.\r\n","created_at":"2017-01-27T01:19:07Z","updated_at":"2017-02-09T05:14:48Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b043a820285206e772b8d92a3b533694b4066499","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/RackHD/on-tasks/pulls/396/commits","review_comments_url":"https://api.github.com/repos/RackHD/on-tasks/pulls/396/comments","review_comment_url":"https://api.github.com/repos/RackHD/on-tasks/pulls/comments{/number}","comments_url":"https://api.github.com/repos/RackHD/on-tasks/issues/396/comments","statuses_url":"https://api.github.com/repos/RackHD/on-tasks/statuses/9f51606e841e2f0760a35e48ccf22fd542d38bc3","head":{"label":"zhangy42:adding-waitOn-Either","ref":"adding-waitOn-Either","sha":"9f51606e841e2f0760a35e48ccf22fd542d38bc3","user":{"login":"zhangy42","id":14022164,"avatar_url":"https://avatars.githubusercontent.com/u/14022164?v=3","gravatar_id":"","url":"https://api.github.com/users/zhangy42","html_url":"https://github.com/zhangy42","followers_url":"https://api.github.com/users/zhangy42/followers","following_url":"https://api.github.com/users/zhangy42/following{/other_user}","gists_url":"https://api.github.com/users/zhangy42/gists{/gist_id}","starred_url":"https://api.github.com/users/zhangy42/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zhangy42/subscriptions","organizations_url":"https://api.github.com/users/zhangy42/orgs","repos_url":"https://api.github.com/users/zhangy42/repos","events_url":"https://api.github.com/users/zhangy42/events{/privacy}","received_events_url":"https://api.github.com/users/zhangy42/received_events","type":"User","site_admin":false},"repo":{"id":55007338,"name":"on-tasks","full_name":"zhangy42/on-tasks","owner":{"login":"zhangy42","id":14022164,"avatar_url":"https://avatars.githubusercontent.com/u/14022164?v=3","gravatar_id":"","url":"https://api.github.com/users/zhangy42","html_url":"https://github.com/zhangy42","followers_url":"https://api.github.com/users/zhangy42/followers","following_url":"https://api.github.com/users/zhangy42/following{/other_user}","gists_url":"https://api.github.com/users/zhangy42/gists{/gist_id}","starred_url":"https://api.github.com/users/zhangy42/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zhangy42/subscriptions","organizations_url":"https://api.github.com/users/zhangy42/orgs","repos_url":"https://api.github.com/users/zhangy42/repos","events_url":"https://api.github.com/users/zhangy42/events{/privacy}","received_events_url":"https://api.github.com/users/zhangy42/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/zhangy42/on-tasks","description":null,"fork":true,"url":"https://api.github.com/repos/zhangy42/on-tasks","forks_url":"https://api.github.com/repos/zhangy42/on-tasks/forks","keys_url":"https://api.github.com/repos/zhangy42/on-tasks/keys{/key_id}","collaborators_url":"https://api.github.com/repos/zhangy42/on-tasks/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/zhangy42/on-tasks/teams","hooks_url":"https://api.github.com/repos/zhangy42/on-tasks/hooks","issue_events_url":"https://api.github.com/repos/zhangy42/on-tasks/issues/events{/number}","events_url":"https://api.github.com/repos/zhangy42/on-tasks/events","assignees_url":"https://api.github.com/repos/zhangy42/on-tasks/assignees{/user}","branches_url":"https://api.github.com/repos/zhangy42/on-tasks/branches{/branch}","tags_url":"https://api.github.com/repos/zhangy42/on-tasks/tags","blobs_url":"https://api.github.com/repos/zhangy42/on-tasks/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/zhangy42/on-tasks/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/zhangy42/on-tasks/git/refs{/sha}","trees_url":"https://api.github.com/repos/zhangy42/on-tasks/git/trees{/sha}","statuses_url":"https://api.github.com/repos/zhangy42/on-tasks/statuses/{sha}","languages_url":"https://api.github.com/repos/zhangy42/on-tasks/languages","stargazers_url":"https://api.github.com/repos/zhangy42/on-tasks/stargazers","contributors_url":"https://api.github.com/repos/zhangy42/on-tasks/contributors","subscribers_url":"https://api.github.com/repos/zhangy42/on-tasks/subscribers","subscription_url":"https://api.github.com/repos/zhangy42/on-tasks/subscription","commits_url":"https://api.github.com/repos/zhangy42/on-tasks/commits{/sha}","git_commits_url":"https://api.github.com/repos/zhangy42/on-tasks/git/commits{/sha}","comments_url":"https://api.github.com/repos/zhangy42/on-tasks/comments{/number}","issue_comment_url":"https://api.github.com/repos/zhangy42/on-tasks/issues/comments{/number}","contents_url":"https://api.github.com/repos/zhangy42/on-tasks/contents/{+path}","compare_url":"https://api.github.com/repos/zhangy42/on-tasks/compare/{base}...{head}","merges_url":"https://api.github.com/repos/zhangy42/on-tasks/merges","archive_url":"https://api.github.com/repos/zhangy42/on-tasks/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/zhangy42/on-tasks/downloads","issues_url":"https://api.github.com/repos/zhangy42/on-tasks/issues{/number}","pulls_url":"https://api.github.com/repos/zhangy42/on-tasks/pulls{/number}","milestones_url":"https://api.github.com/repos/zhangy42/on-tasks/milestones{/number}","notifications_url":"https://api.github.com/repos/zhangy42/on-tasks/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/zhangy42/on-tasks/labels{/name}","releases_url":"https://api.github.com/repos/zhangy42/on-tasks/releases{/id}","deployments_url":"https://api.github.com/repos/zhangy42/on-tasks/deployments","created_at":"2016-03-29T20:11:44Z","updated_at":"2016-03-29T20:11:46Z","pushed_at":"2017-02-02T22:23:39Z","git_url":"git://github.com/zhangy42/on-tasks.git","ssh_url":"git@github.com:zhangy42/on-tasks.git","clone_url":"https://github.com/zhangy42/on-tasks.git","svn_url":"https://github.com/zhangy42/on-tasks","homepage":null,"size":2050,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"RackHD:master","ref":"master","sha":"244d75214d99511a113a170ef400aa46cde029e7","user":{"login":"RackHD","id":13982662,"avatar_url":"https://avatars.githubusercontent.com/u/13982662?v=3","gravatar_id":"","url":"https://api.github.com/users/RackHD","html_url":"https://github.com/RackHD","followers_url":"https://api.github.com/users/RackHD/followers","following_url":"https://api.github.com/users/RackHD/following{/other_user}","gists_url":"https://api.github.com/users/RackHD/gists{/gist_id}","starred_url":"https://api.github.com/users/RackHD/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RackHD/subscriptions","organizations_url":"https://api.github.com/users/RackHD/orgs","repos_url":"https://api.github.com/users/RackHD/repos","events_url":"https://api.github.com/users/RackHD/events{/privacy}","received_events_url":"https://api.github.com/users/RackHD/received_events","type":"Organization","site_admin":false},"repo":{"id":41690099,"name":"on-tasks","full_name":"RackHD/on-tasks","owner":{"login":"RackHD","id":13982662,"avatar_url":"https://avatars.githubusercontent.com/u/13982662?v=3","gravatar_id":"","url":"https://api.github.com/users/RackHD","html_url":"https://github.com/RackHD","followers_url":"https://api.github.com/users/RackHD/followers","following_url":"https://api.github.com/users/RackHD/following{/other_user}","gists_url":"https://api.github.com/users/RackHD/gists{/gist_id}","starred_url":"https://api.github.com/users/RackHD/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RackHD/subscriptions","organizations_url":"https://api.github.com/users/RackHD/orgs","repos_url":"https://api.github.com/users/RackHD/repos","events_url":"https://api.github.com/users/RackHD/events{/privacy}","received_events_url":"https://api.github.com/users/RackHD/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/RackHD/on-tasks","description":null,"fork":false,"url":"https://api.github.com/repos/RackHD/on-tasks","forks_url":"https://api.github.com/repos/RackHD/on-tasks/forks","keys_url":"https://api.github.com/repos/RackHD/on-tasks/keys{/key_id}","collaborators_url":"https://api.github.com/repos/RackHD/on-tasks/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/RackHD/on-tasks/teams","hooks_url":"https://api.github.com/repos/RackHD/on-tasks/hooks","issue_events_url":"https://api.github.com/repos/RackHD/on-tasks/issues/events{/number}","events_url":"https://api.github.com/repos/RackHD/on-tasks/events","assignees_url":"https://api.github.com/repos/RackHD/on-tasks/assignees{/user}","branches_url":"https://api.github.com/repos/RackHD/on-tasks/branches{/branch}","tags_url":"https://api.github.com/repos/RackHD/on-tasks/tags","blobs_url":"https://api.github.com/repos/RackHD/on-tasks/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/RackHD/on-tasks/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/RackHD/on-tasks/git/refs{/sha}","trees_url":"https://api.github.com/repos/RackHD/on-tasks/git/trees{/sha}","statuses_url":"https://api.github.com/repos/RackHD/on-tasks/statuses/{sha}","languages_url":"https://api.github.com/repos/RackHD/on-tasks/languages","stargazers_url":"https://api.github.com/repos/RackHD/on-tasks/stargazers","contributors_url":"https://api.github.com/repos/RackHD/on-tasks/contributors","subscribers_url":"https://api.github.com/repos/RackHD/on-tasks/subscribers","subscription_url":"https://api.github.com/repos/RackHD/on-tasks/subscription","commits_url":"https://api.github.com/repos/RackHD/on-tasks/commits{/sha}","git_commits_url":"https://api.github.com/repos/RackHD/on-tasks/git/commits{/sha}","comments_url":"https://api.github.com/repos/RackHD/on-tasks/comments{/number}","issue_comment_url":"https://api.github.com/repos/RackHD/on-tasks/issues/comments{/number}","contents_url":"https://api.github.com/repos/RackHD/on-tasks/contents/{+path}","compare_url":"https://api.github.com/repos/RackHD/on-tasks/compare/{base}...{head}","merges_url":"https://api.github.com/repos/RackHD/on-tasks/merges","archive_url":"https://api.github.com/repos/RackHD/on-tasks/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/RackHD/on-tasks/downloads","issues_url":"https://api.github.com/repos/RackHD/on-tasks/issues{/number}","pulls_url":"https://api.github.com/repos/RackHD/on-tasks/pulls{/number}","milestones_url":"https://api.github.com/repos/RackHD/on-tasks/milestones{/number}","notifications_url":"https://api.github.com/repos/RackHD/on-tasks/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/RackHD/on-tasks/labels{/name}","releases_url":"https://api.github.com/repos/RackHD/on-tasks/releases{/id}","deployments_url":"https://api.github.com/repos/RackHD/on-tasks/deployments","created_at":"2015-08-31T17:29:32Z","updated_at":"2016-10-25T14:42:03Z","pushed_at":"2017-02-03T21:01:44Z","git_url":"git://github.com/RackHD/on-tasks.git","ssh_url":"git@github.com:RackHD/on-tasks.git","clone_url":"https://github.com/RackHD/on-tasks.git","svn_url":"https://github.com/RackHD/on-tasks","homepage":null,"size":2004,"stargazers_count":7,"watchers_count":7,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":55,"mirror_url":null,"open_issues_count":10,"forks":55,"open_issues":10,"watchers":7,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/RackHD/on-tasks/pulls/396"},"html":{"href":"https://github.com/RackHD/on-tasks/pull/396"},"issue":{"href":"https://api.github.com/repos/RackHD/on-tasks/issues/396"},"comments":{"href":"https://api.github.com/repos/RackHD/on-tasks/issues/396/comments"},"review_comments":{"href":"https://api.github.com/repos/RackHD/on-tasks/pulls/396/comments"},"review_comment":{"href":"https://api.github.com/repos/RackHD/on-tasks/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/RackHD/on-tasks/pulls/396/commits"},"statuses":{"href":"https://api.github.com/repos/RackHD/on-tasks/statuses/9f51606e841e2f0760a35e48ccf22fd542d38bc3"}}}}
{"actor":{"display_login":"yyscamper"}}