{"action":"created","comment":{"url":"https://api.github.com/repos/screwdriver-cd/models/pulls/comments/238158758","pull_request_review_id":180631363,"id":238158758,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIzODE1ODc1OA==","diff_hunk":"@@ -342,17 +343,29 @@ class PipelineModel extends BaseModel {\n                 // Get next jobs for when startFrom is ~pr\n                 const nextJobs = workflowParser.getNextJobs(parsedConfig.workflowGraph, {\n                     trigger: '~pr',\n-                    prNum\n+                    prNum,\n+                    prChain: this.prChain\n                 });\n \n                 // Get all the missing PR- job names\n-                const existingPRJobNames = prJobs.map(p => p.name);\n-                const missingPRJobNames = nextJobs.filter(j => !existingPRJobNames.includes(j));\n-\n-                // Get the job name part, e.g. main from PR-1:main to create job\n-                const jobsToCreate = missingPRJobNames.map(name => name.split(':')[1]);\n-                const jobsToArchive = prJobs.filter(p => !nextJobs.includes(p.name));\n-                const jobsToUnarchive = prJobs.filter(p => nextJobs.includes(p.name));\n+                const existingPRJobNames = prJobs.map(prJob => prJob.name);\n+                const missingPRJobNames =\n+                    nextJobs.filter(nextJob => !existingPRJobNames.includes(nextJob));\n+                let jobsToCreate;\n+                let jobsToArchive;\n+                let jobsToUnarchive;\n+\n+                winston.info(`prChain flag is ${this.prChain}.`);","path":"lib/pipeline.js","position":null,"original_position":55,"commit_id":"bb17fcc6b30e04a0f5da3ca5e98fbd93875ef914","original_commit_id":"a15bb7c84c1842b4a3dd96108f1c1aba91a46101","user":{"login":"sakka2","id":16560466,"node_id":"MDQ6VXNlcjE2NTYwNDY2","avatar_url":"https://avatars0.githubusercontent.com/u/16560466?v=4","gravatar_id":"","url":"https://api.github.com/users/sakka2","html_url":"https://github.com/sakka2","followers_url":"https://api.github.com/users/sakka2/followers","following_url":"https://api.github.com/users/sakka2/following{/other_user}","gists_url":"https://api.github.com/users/sakka2/gists{/gist_id}","starred_url":"https://api.github.com/users/sakka2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sakka2/subscriptions","organizations_url":"https://api.github.com/users/sakka2/orgs","repos_url":"https://api.github.com/users/sakka2/repos","events_url":"https://api.github.com/users/sakka2/events{/privacy}","received_events_url":"https://api.github.com/users/sakka2/received_events","type":"User","site_admin":false},"body":"I added pipelineId to this info log.","created_at":"2018-12-03T06:55:29Z","updated_at":"2018-12-03T06:55:30Z","html_url":"https://github.com/screwdriver-cd/models/pull/301#discussion_r238158758","pull_request_url":"https://api.github.com/repos/screwdriver-cd/models/pulls/301","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/screwdriver-cd/models/pulls/comments/238158758"},"html":{"href":"https://github.com/screwdriver-cd/models/pull/301#discussion_r238158758"},"pull_request":{"href":"https://api.github.com/repos/screwdriver-cd/models/pulls/301"}},"in_reply_to_id":237755152},"pull_request":{"url":"https://api.github.com/repos/screwdriver-cd/models/pulls/301","id":233856068,"node_id":"MDExOlB1bGxSZXF1ZXN0MjMzODU2MDY4","html_url":"https://github.com/screwdriver-cd/models/pull/301","diff_url":"https://github.com/screwdriver-cd/models/pull/301.diff","patch_url":"https://github.com/screwdriver-cd/models/pull/301.patch","issue_url":"https://api.github.com/repos/screwdriver-cd/models/issues/301","number":301,"state":"open","locked":false,"title":"[4] feat(1010): enable prChain","user":{"login":"tk3fftk","id":3445553,"node_id":"MDQ6VXNlcjM0NDU1NTM=","avatar_url":"https://avatars0.githubusercontent.com/u/3445553?v=4","gravatar_id":"","url":"https://api.github.com/users/tk3fftk","html_url":"https://github.com/tk3fftk","followers_url":"https://api.github.com/users/tk3fftk/followers","following_url":"https://api.github.com/users/tk3fftk/following{/other_user}","gists_url":"https://api.github.com/users/tk3fftk/gists{/gist_id}","starred_url":"https://api.github.com/users/tk3fftk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tk3fftk/subscriptions","organizations_url":"https://api.github.com/users/tk3fftk/orgs","repos_url":"https://api.github.com/users/tk3fftk/repos","events_url":"https://api.github.com/users/tk3fftk/events{/privacy}","received_events_url":"https://api.github.com/users/tk3fftk/received_events","type":"User","site_admin":false},"body":"## Context\r\nWe want to implement `prChain` feature. If `prChain` is true, a job name does not have `PR-` prefix and will trigger subsequent jobs. \r\n\r\n## Objective\r\nPass to `prChain` to workflow-parser and store `prChain` to a pipeline.\r\n\r\n## Misc.\r\nRelated Issue: https://github.com/screwdriver-cd/screwdriver/issues/1010\r\nRelated PRs:\r\n- https://github.com/screwdriver-cd/data-schema/pull/296\r\n- https://github.com/screwdriver-cd/config-parser/pull/81\r\n- https://github.com/screwdriver-cd/workflow-parser/pull/15","created_at":"2018-11-27T10:28:10Z","updated_at":"2018-12-03T06:55:30Z","closed_at":null,"merged_at":null,"merge_commit_sha":"90e10c6384a013c642e43c9aee1474e23d1c0f04","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/screwdriver-cd/models/pulls/301/commits","review_comments_url":"https://api.github.com/repos/screwdriver-cd/models/pulls/301/comments","review_comment_url":"https://api.github.com/repos/screwdriver-cd/models/pulls/comments{/number}","comments_url":"https://api.github.com/repos/screwdriver-cd/models/issues/301/comments","statuses_url":"https://api.github.com/repos/screwdriver-cd/models/statuses/bb17fcc6b30e04a0f5da3ca5e98fbd93875ef914","head":{"label":"sonic-screwdriver-cd:prChain","ref":"prChain","sha":"bb17fcc6b30e04a0f5da3ca5e98fbd93875ef914","user":{"login":"sonic-screwdriver-cd","id":30816763,"node_id":"MDEyOk9yZ2FuaXphdGlvbjMwODE2NzYz","avatar_url":"https://avatars3.githubusercontent.com/u/30816763?v=4","gravatar_id":"","url":"https://api.github.com/users/sonic-screwdriver-cd","html_url":"https://github.com/sonic-screwdriver-cd","followers_url":"https://api.github.com/users/sonic-screwdriver-cd/followers","following_url":"https://api.github.com/users/sonic-screwdriver-cd/following{/other_user}","gists_url":"https://api.github.com/users/sonic-screwdriver-cd/gists{/gist_id}","starred_url":"https://api.github.com/users/sonic-screwdriver-cd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sonic-screwdriver-cd/subscriptions","organizations_url":"https://api.github.com/users/sonic-screwdriver-cd/orgs","repos_url":"https://api.github.com/users/sonic-screwdriver-cd/repos","events_url":"https://api.github.com/users/sonic-screwdriver-cd/events{/privacy}","received_events_url":"https://api.github.com/users/sonic-screwdriver-cd/received_events","type":"Organization","site_admin":false},"repo":{"id":113816265,"node_id":"MDEwOlJlcG9zaXRvcnkxMTM4MTYyNjU=","name":"models","full_name":"sonic-screwdriver-cd/models","private":false,"owner":{"login":"sonic-screwdriver-cd","id":30816763,"node_id":"MDEyOk9yZ2FuaXphdGlvbjMwODE2NzYz","avatar_url":"https://avatars3.githubusercontent.com/u/30816763?v=4","gravatar_id":"","url":"https://api.github.com/users/sonic-screwdriver-cd","html_url":"https://github.com/sonic-screwdriver-cd","followers_url":"https://api.github.com/users/sonic-screwdriver-cd/followers","following_url":"https://api.github.com/users/sonic-screwdriver-cd/following{/other_user}","gists_url":"https://api.github.com/users/sonic-screwdriver-cd/gists{/gist_id}","starred_url":"https://api.github.com/users/sonic-screwdriver-cd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sonic-screwdriver-cd/subscriptions","organizations_url":"https://api.github.com/users/sonic-screwdriver-cd/orgs","repos_url":"https://api.github.com/users/sonic-screwdriver-cd/repos","events_url":"https://api.github.com/users/sonic-screwdriver-cd/events{/privacy}","received_events_url":"https://api.github.com/users/sonic-screwdriver-cd/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/sonic-screwdriver-cd/models","description":"Screwdriver Models","fork":true,"url":"https://api.github.com/repos/sonic-screwdriver-cd/models","forks_url":"https://api.github.com/repos/sonic-screwdriver-cd/models/forks","keys_url":"https://api.github.com/repos/sonic-screwdriver-cd/models/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sonic-screwdriver-cd/models/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sonic-screwdriver-cd/models/teams","hooks_url":"https://api.github.com/repos/sonic-screwdriver-cd/models/hooks","issue_events_url":"https://api.github.com/repos/sonic-screwdriver-cd/models/issues/events{/number}","events_url":"https://api.github.com/repos/sonic-screwdriver-cd/models/events","assignees_url":"https://api.github.com/repos/sonic-screwdriver-cd/models/assignees{/user}","branches_url":"https://api.github.com/repos/sonic-screwdriver-cd/models/branches{/branch}","tags_url":"https://api.github.com/repos/sonic-screwdriver-cd/models/tags","blobs_url":"https://api.github.com/repos/sonic-screwdriver-cd/models/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sonic-screwdriver-cd/models/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sonic-screwdriver-cd/models/git/refs{/sha}","trees_url":"https://api.github.com/repos/sonic-screwdriver-cd/models/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sonic-screwdriver-cd/models/statuses/{sha}","languages_url":"https://api.github.com/repos/sonic-screwdriver-cd/models/languages","stargazers_url":"https://api.github.com/repos/sonic-screwdriver-cd/models/stargazers","contributors_url":"https://api.github.com/repos/sonic-screwdriver-cd/models/contributors","subscribers_url":"https://api.github.com/repos/sonic-screwdriver-cd/models/subscribers","subscription_url":"https://api.github.com/repos/sonic-screwdriver-cd/models/subscription","commits_url":"https://api.github.com/repos/sonic-screwdriver-cd/models/commits{/sha}","git_commits_url":"https://api.github.com/repos/sonic-screwdriver-cd/models/git/commits{/sha}","comments_url":"https://api.github.com/repos/sonic-screwdriver-cd/models/comments{/number}","issue_comment_url":"https://api.github.com/repos/sonic-screwdriver-cd/models/issues/comments{/number}","contents_url":"https://api.github.com/repos/sonic-screwdriver-cd/models/contents/{+path}","compare_url":"https://api.github.com/repos/sonic-screwdriver-cd/models/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sonic-screwdriver-cd/models/merges","archive_url":"https://api.github.com/repos/sonic-screwdriver-cd/models/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sonic-screwdriver-cd/models/downloads","issues_url":"https://api.github.com/repos/sonic-screwdriver-cd/models/issues{/number}","pulls_url":"https://api.github.com/repos/sonic-screwdriver-cd/models/pulls{/number}","milestones_url":"https://api.github.com/repos/sonic-screwdriver-cd/models/milestones{/number}","notifications_url":"https://api.github.com/repos/sonic-screwdriver-cd/models/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sonic-screwdriver-cd/models/labels{/name}","releases_url":"https://api.github.com/repos/sonic-screwdriver-cd/models/releases{/id}","deployments_url":"https://api.github.com/repos/sonic-screwdriver-cd/models/deployments","created_at":"2017-12-11T05:29:42Z","updated_at":"2018-11-21T08:17:59Z","pushed_at":"2018-12-03T06:54:07Z","git_url":"git://github.com/sonic-screwdriver-cd/models.git","ssh_url":"git@github.com:sonic-screwdriver-cd/models.git","clone_url":"https://github.com/sonic-screwdriver-cd/models.git","svn_url":"https://github.com/sonic-screwdriver-cd/models","homepage":"https://www.npmjs.com/package/screwdriver-models","size":811,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"other","name":"Other","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"screwdriver-cd:master","ref":"master","sha":"c343b9cfc4ffdaf57eb8f8d6eb874f21e1c2aa52","user":{"login":"screwdriver-cd","id":19417863,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE5NDE3ODYz","avatar_url":"https://avatars0.githubusercontent.com/u/19417863?v=4","gravatar_id":"","url":"https://api.github.com/users/screwdriver-cd","html_url":"https://github.com/screwdriver-cd","followers_url":"https://api.github.com/users/screwdriver-cd/followers","following_url":"https://api.github.com/users/screwdriver-cd/following{/other_user}","gists_url":"https://api.github.com/users/screwdriver-cd/gists{/gist_id}","starred_url":"https://api.github.com/users/screwdriver-cd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/screwdriver-cd/subscriptions","organizations_url":"https://api.github.com/users/screwdriver-cd/orgs","repos_url":"https://api.github.com/users/screwdriver-cd/repos","events_url":"https://api.github.com/users/screwdriver-cd/events{/privacy}","received_events_url":"https://api.github.com/users/screwdriver-cd/received_events","type":"Organization","site_admin":false},"repo":{"id":62759755,"node_id":"MDEwOlJlcG9zaXRvcnk2Mjc1OTc1NQ==","name":"models","full_name":"screwdriver-cd/models","private":false,"owner":{"login":"screwdriver-cd","id":19417863,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE5NDE3ODYz","avatar_url":"https://avatars0.githubusercontent.com/u/19417863?v=4","gravatar_id":"","url":"https://api.github.com/users/screwdriver-cd","html_url":"https://github.com/screwdriver-cd","followers_url":"https://api.github.com/users/screwdriver-cd/followers","following_url":"https://api.github.com/users/screwdriver-cd/following{/other_user}","gists_url":"https://api.github.com/users/screwdriver-cd/gists{/gist_id}","starred_url":"https://api.github.com/users/screwdriver-cd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/screwdriver-cd/subscriptions","organizations_url":"https://api.github.com/users/screwdriver-cd/orgs","repos_url":"https://api.github.com/users/screwdriver-cd/repos","events_url":"https://api.github.com/users/screwdriver-cd/events{/privacy}","received_events_url":"https://api.github.com/users/screwdriver-cd/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/screwdriver-cd/models","description":"Screwdriver Models","fork":false,"url":"https://api.github.com/repos/screwdriver-cd/models","forks_url":"https://api.github.com/repos/screwdriver-cd/models/forks","keys_url":"https://api.github.com/repos/screwdriver-cd/models/keys{/key_id}","collaborators_url":"https://api.github.com/repos/screwdriver-cd/models/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/screwdriver-cd/models/teams","hooks_url":"https://api.github.com/repos/screwdriver-cd/models/hooks","issue_events_url":"https://api.github.com/repos/screwdriver-cd/models/issues/events{/number}","events_url":"https://api.github.com/repos/screwdriver-cd/models/events","assignees_url":"https://api.github.com/repos/screwdriver-cd/models/assignees{/user}","branches_url":"https://api.github.com/repos/screwdriver-cd/models/branches{/branch}","tags_url":"https://api.github.com/repos/screwdriver-cd/models/tags","blobs_url":"https://api.github.com/repos/screwdriver-cd/models/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/screwdriver-cd/models/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/screwdriver-cd/models/git/refs{/sha}","trees_url":"https://api.github.com/repos/screwdriver-cd/models/git/trees{/sha}","statuses_url":"https://api.github.com/repos/screwdriver-cd/models/statuses/{sha}","languages_url":"https://api.github.com/repos/screwdriver-cd/models/languages","stargazers_url":"https://api.github.com/repos/screwdriver-cd/models/stargazers","contributors_url":"https://api.github.com/repos/screwdriver-cd/models/contributors","subscribers_url":"https://api.github.com/repos/screwdriver-cd/models/subscribers","subscription_url":"https://api.github.com/repos/screwdriver-cd/models/subscription","commits_url":"https://api.github.com/repos/screwdriver-cd/models/commits{/sha}","git_commits_url":"https://api.github.com/repos/screwdriver-cd/models/git/commits{/sha}","comments_url":"https://api.github.com/repos/screwdriver-cd/models/comments{/number}","issue_comment_url":"https://api.github.com/repos/screwdriver-cd/models/issues/comments{/number}","contents_url":"https://api.github.com/repos/screwdriver-cd/models/contents/{+path}","compare_url":"https://api.github.com/repos/screwdriver-cd/models/compare/{base}...{head}","merges_url":"https://api.github.com/repos/screwdriver-cd/models/merges","archive_url":"https://api.github.com/repos/screwdriver-cd/models/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/screwdriver-cd/models/downloads","issues_url":"https://api.github.com/repos/screwdriver-cd/models/issues{/number}","pulls_url":"https://api.github.com/repos/screwdriver-cd/models/pulls{/number}","milestones_url":"https://api.github.com/repos/screwdriver-cd/models/milestones{/number}","notifications_url":"https://api.github.com/repos/screwdriver-cd/models/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/screwdriver-cd/models/labels{/name}","releases_url":"https://api.github.com/repos/screwdriver-cd/models/releases{/id}","deployments_url":"https://api.github.com/repos/screwdriver-cd/models/deployments","created_at":"2016-07-06T23:24:04Z","updated_at":"2018-11-29T21:36:23Z","pushed_at":"2018-12-03T06:54:09Z","git_url":"git://github.com/screwdriver-cd/models.git","ssh_url":"git@github.com:screwdriver-cd/models.git","clone_url":"https://github.com/screwdriver-cd/models.git","svn_url":"https://github.com/screwdriver-cd/models","homepage":"https://cd.screwdriver.cd/pipelines/9","size":805,"stargazers_count":5,"watchers_count":5,"language":"JavaScript","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":10,"mirror_url":null,"archived":false,"open_issues_count":2,"license":{"key":"other","name":"Other","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":10,"open_issues":2,"watchers":5,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/screwdriver-cd/models/pulls/301"},"html":{"href":"https://github.com/screwdriver-cd/models/pull/301"},"issue":{"href":"https://api.github.com/repos/screwdriver-cd/models/issues/301"},"comments":{"href":"https://api.github.com/repos/screwdriver-cd/models/issues/301/comments"},"review_comments":{"href":"https://api.github.com/repos/screwdriver-cd/models/pulls/301/comments"},"review_comment":{"href":"https://api.github.com/repos/screwdriver-cd/models/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/screwdriver-cd/models/pulls/301/commits"},"statuses":{"href":"https://api.github.com/repos/screwdriver-cd/models/statuses/bb17fcc6b30e04a0f5da3ca5e98fbd93875ef914"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"sakka2"}}