{"action":"created","comment":{"url":"https://api.github.com/repos/screwdriver-cd/models/pulls/comments/185292352","pull_request_review_id":116650979,"id":185292352,"diff_hunk":"@@ -157,6 +163,30 @@ class Job extends BaseModel {\n             .then(successfulBuilds => successfulBuilds[0]);\n     }\n \n+    /**\n+     * Update a job\n+     * @method update\n+     * @return {Promise}\n+     */\n+    update() {\n+        // Lazy load factory dependency to prevent circular dependency issues\n+        // https://nodejs.org/api/modules.html#modules_cycles\n+        /* eslint-disable global-require */\n+        const PipelineFactory = require('./pipelineFactory');\n+        /* eslint-enable global-require */\n+        const pipelineFactory = PipelineFactory.getInstance();\n+\n+        return super.update()\n+            // Update for periodic job\n+            .then(newJob => pipelineFactory.get(newJob.pipelineId)","path":"lib/job.js","position":44,"original_position":44,"commit_id":"b40d8be623c62e8f4c74317dc61ca403bdaa69c1","original_commit_id":"b40d8be623c62e8f4c74317dc61ca403bdaa69c1","user":{"login":"d2lam","id":3401924,"avatar_url":"https://avatars2.githubusercontent.com/u/3401924?v=4","gravatar_id":"","url":"https://api.github.com/users/d2lam","html_url":"https://github.com/d2lam","followers_url":"https://api.github.com/users/d2lam/followers","following_url":"https://api.github.com/users/d2lam/following{/other_user}","gists_url":"https://api.github.com/users/d2lam/gists{/gist_id}","starred_url":"https://api.github.com/users/d2lam/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/d2lam/subscriptions","organizations_url":"https://api.github.com/users/d2lam/orgs","repos_url":"https://api.github.com/users/d2lam/repos","events_url":"https://api.github.com/users/d2lam/events{/privacy}","received_events_url":"https://api.github.com/users/d2lam/received_events","type":"User","site_admin":false},"body":"I was thinking the check should be done in `executor-queue`, since it can simply check if there is a record in redis, but I can also do an extra check here. ","created_at":"2018-05-01T18:14:38Z","updated_at":"2018-05-01T18:14:38Z","html_url":"https://github.com/screwdriver-cd/models/pull/239#discussion_r185292352","pull_request_url":"https://api.github.com/repos/screwdriver-cd/models/pulls/239","author_association":"OWNER","_links":{"self":{"href":"https://api.github.com/repos/screwdriver-cd/models/pulls/comments/185292352"},"html":{"href":"https://github.com/screwdriver-cd/models/pull/239#discussion_r185292352"},"pull_request":{"href":"https://api.github.com/repos/screwdriver-cd/models/pulls/239"}},"in_reply_to_id":185290133},"pull_request":{"url":"https://api.github.com/repos/screwdriver-cd/models/pulls/239","id":184421004,"html_url":"https://github.com/screwdriver-cd/models/pull/239","diff_url":"https://github.com/screwdriver-cd/models/pull/239.diff","patch_url":"https://github.com/screwdriver-cd/models/pull/239.patch","issue_url":"https://api.github.com/repos/screwdriver-cd/models/issues/239","number":239,"state":"open","locked":false,"title":"[DNM] feat: Support periodic builds","user":{"login":"d2lam","id":3401924,"avatar_url":"https://avatars2.githubusercontent.com/u/3401924?v=4","gravatar_id":"","url":"https://api.github.com/users/d2lam","html_url":"https://github.com/d2lam","followers_url":"https://api.github.com/users/d2lam/followers","following_url":"https://api.github.com/users/d2lam/following{/other_user}","gists_url":"https://api.github.com/users/d2lam/gists{/gist_id}","starred_url":"https://api.github.com/users/d2lam/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/d2lam/subscriptions","organizations_url":"https://api.github.com/users/d2lam/orgs","repos_url":"https://api.github.com/users/d2lam/repos","events_url":"https://api.github.com/users/d2lam/events{/privacy}","received_events_url":"https://api.github.com/users/d2lam/received_events","type":"User","site_admin":false},"body":"Support periodic builds\r\n\r\nRelated: https://github.com/screwdriver-cd/screwdriver/issues/688","created_at":"2018-04-26T18:07:18Z","updated_at":"2018-05-01T18:14:38Z","closed_at":null,"merged_at":null,"merge_commit_sha":"9254702af0c8ea2c3b2bfdad91992ce7dbbc70c1","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/screwdriver-cd/models/pulls/239/commits","review_comments_url":"https://api.github.com/repos/screwdriver-cd/models/pulls/239/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/239/comments","statuses_url":"https://api.github.com/repos/screwdriver-cd/models/statuses/b40d8be623c62e8f4c74317dc61ca403bdaa69c1","head":{"label":"screwdriver-cd:periodic-builds","ref":"periodic-builds","sha":"b40d8be623c62e8f4c74317dc61ca403bdaa69c1","user":{"login":"screwdriver-cd","id":19417863,"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,"name":"models","full_name":"screwdriver-cd/models","owner":{"login":"screwdriver-cd","id":19417863,"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},"private":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-04-27T20:39:39Z","pushed_at":"2018-04-30T22:40:36Z","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":612,"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":8,"mirror_url":null,"archived":false,"open_issues_count":1,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":8,"open_issues":1,"watchers":5,"default_branch":"master"}},"base":{"label":"screwdriver-cd:master","ref":"master","sha":"af837fdaa1383c2a167eff33d5b3d5ef9a9b4351","user":{"login":"screwdriver-cd","id":19417863,"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,"name":"models","full_name":"screwdriver-cd/models","owner":{"login":"screwdriver-cd","id":19417863,"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},"private":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-04-27T20:39:39Z","pushed_at":"2018-04-30T22:40:36Z","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":612,"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":8,"mirror_url":null,"archived":false,"open_issues_count":1,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":8,"open_issues":1,"watchers":5,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/screwdriver-cd/models/pulls/239"},"html":{"href":"https://github.com/screwdriver-cd/models/pull/239"},"issue":{"href":"https://api.github.com/repos/screwdriver-cd/models/issues/239"},"comments":{"href":"https://api.github.com/repos/screwdriver-cd/models/issues/239/comments"},"review_comments":{"href":"https://api.github.com/repos/screwdriver-cd/models/pulls/239/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/239/commits"},"statuses":{"href":"https://api.github.com/repos/screwdriver-cd/models/statuses/b40d8be623c62e8f4c74317dc61ca403bdaa69c1"}},"author_association":"OWNER"}}
{"actor":{"display_login":"d2lam"}}