{"action":"created","comment":{"url":"https://api.github.com/repos/salesforce/refocus/pulls/comments/199288636","pull_request_review_id":133387756,"id":199288636,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDE5OTI4ODYzNg==","diff_hunk":"@@ -167,6 +167,10 @@ module.exports = function generator(seq, dataTypes) {\n       beforeUpdate(inst /* , opts */) {\n         const gtName = inst.generatorTemplate.name;\n         const gtVersion = inst.generatorTemplate.version;\n+        if (inst.changed('isActive')) {","path":"db/model/generator.js","position":4,"original_position":4,"commit_id":"696bdbb9f003a8a031a7cdd243f902e824c4e641","original_commit_id":"696bdbb9f003a8a031a7cdd243f902e824c4e641","user":{"login":"iamigo","id":4086227,"node_id":"MDQ6VXNlcjQwODYyMjc=","avatar_url":"https://avatars0.githubusercontent.com/u/4086227?v=4","gravatar_id":"","url":"https://api.github.com/users/iamigo","html_url":"https://github.com/iamigo","followers_url":"https://api.github.com/users/iamigo/followers","following_url":"https://api.github.com/users/iamigo/following{/other_user}","gists_url":"https://api.github.com/users/iamigo/gists{/gist_id}","starred_url":"https://api.github.com/users/iamigo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iamigo/subscriptions","organizations_url":"https://api.github.com/users/iamigo/orgs","repos_url":"https://api.github.com/users/iamigo/repos","events_url":"https://api.github.com/users/iamigo/events{/privacy}","received_events_url":"https://api.github.com/users/iamigo/received_events","type":"User","site_admin":false},"body":"should this `if` also be checking whether the new value of `isActive` is `true`?","created_at":"2018-06-29T21:51:52Z","updated_at":"2018-06-29T21:54:25Z","html_url":"https://github.com/salesforce/refocus/pull/911#discussion_r199288636","pull_request_url":"https://api.github.com/repos/salesforce/refocus/pulls/911","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/salesforce/refocus/pulls/comments/199288636"},"html":{"href":"https://github.com/salesforce/refocus/pull/911#discussion_r199288636"},"pull_request":{"href":"https://api.github.com/repos/salesforce/refocus/pulls/911"}}},"pull_request":{"url":"https://api.github.com/repos/salesforce/refocus/pulls/911","id":198194290,"node_id":"MDExOlB1bGxSZXF1ZXN0MTk4MTk0Mjkw","html_url":"https://github.com/salesforce/refocus/pull/911","diff_url":"https://github.com/salesforce/refocus/pull/911.diff","patch_url":"https://github.com/salesforce/refocus/pull/911.patch","issue_url":"https://api.github.com/repos/salesforce/refocus/issues/911","number":911,"state":"open","locked":false,"title":"Generator isActive changes","user":{"login":"jgraff2","id":22939895,"node_id":"MDQ6VXNlcjIyOTM5ODk1","avatar_url":"https://avatars1.githubusercontent.com/u/22939895?v=4","gravatar_id":"","url":"https://api.github.com/users/jgraff2","html_url":"https://github.com/jgraff2","followers_url":"https://api.github.com/users/jgraff2/followers","following_url":"https://api.github.com/users/jgraff2/following{/other_user}","gists_url":"https://api.github.com/users/jgraff2/gists{/gist_id}","starred_url":"https://api.github.com/users/jgraff2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jgraff2/subscriptions","organizations_url":"https://api.github.com/users/jgraff2/orgs","repos_url":"https://api.github.com/users/jgraff2/repos","events_url":"https://api.github.com/users/jgraff2/events{/privacy}","received_events_url":"https://api.github.com/users/jgraff2/received_events","type":"User","site_admin":false},"body":"- change the swagger description to more clearly express what isActive means.\r\n- validate: add validation so that if a generator is active, it must have collectors specified.\r\n- createWithCollectors/updateWithCollectors: restructure to make it work with the new validation\r\n- beforeUpdate: when isActive is changed, assign/unassign the collector.\r\n- assignToCollector:\r\n  - only assign if isActive\r\n  - don't actually save the generator, just update the currentCollector field\r\n  - remove generic assignment (if no collectors specified, set to null)\r\n","created_at":"2018-06-29T01:37:43Z","updated_at":"2018-06-29T21:54:25Z","closed_at":null,"merged_at":null,"merge_commit_sha":"8bb360648b9803b8400cefb12044eb5e525d2a96","assignee":null,"assignees":[],"requested_reviewers":[{"login":"sameesiddiqui","id":13913720,"node_id":"MDQ6VXNlcjEzOTEzNzIw","avatar_url":"https://avatars1.githubusercontent.com/u/13913720?v=4","gravatar_id":"","url":"https://api.github.com/users/sameesiddiqui","html_url":"https://github.com/sameesiddiqui","followers_url":"https://api.github.com/users/sameesiddiqui/followers","following_url":"https://api.github.com/users/sameesiddiqui/following{/other_user}","gists_url":"https://api.github.com/users/sameesiddiqui/gists{/gist_id}","starred_url":"https://api.github.com/users/sameesiddiqui/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sameesiddiqui/subscriptions","organizations_url":"https://api.github.com/users/sameesiddiqui/orgs","repos_url":"https://api.github.com/users/sameesiddiqui/repos","events_url":"https://api.github.com/users/sameesiddiqui/events{/privacy}","received_events_url":"https://api.github.com/users/sameesiddiqui/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/salesforce/refocus/pulls/911/commits","review_comments_url":"https://api.github.com/repos/salesforce/refocus/pulls/911/comments","review_comment_url":"https://api.github.com/repos/salesforce/refocus/pulls/comments{/number}","comments_url":"https://api.github.com/repos/salesforce/refocus/issues/911/comments","statuses_url":"https://api.github.com/repos/salesforce/refocus/statuses/696bdbb9f003a8a031a7cdd243f902e824c4e641","head":{"label":"salesforce:isActive","ref":"isActive","sha":"696bdbb9f003a8a031a7cdd243f902e824c4e641","user":{"login":"salesforce","id":453694,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ1MzY5NA==","avatar_url":"https://avatars3.githubusercontent.com/u/453694?v=4","gravatar_id":"","url":"https://api.github.com/users/salesforce","html_url":"https://github.com/salesforce","followers_url":"https://api.github.com/users/salesforce/followers","following_url":"https://api.github.com/users/salesforce/following{/other_user}","gists_url":"https://api.github.com/users/salesforce/gists{/gist_id}","starred_url":"https://api.github.com/users/salesforce/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/salesforce/subscriptions","organizations_url":"https://api.github.com/users/salesforce/orgs","repos_url":"https://api.github.com/users/salesforce/repos","events_url":"https://api.github.com/users/salesforce/events{/privacy}","received_events_url":"https://api.github.com/users/salesforce/received_events","type":"Organization","site_admin":false},"repo":{"id":64511432,"node_id":"MDEwOlJlcG9zaXRvcnk2NDUxMTQzMg==","name":"refocus","full_name":"salesforce/refocus","owner":{"login":"salesforce","id":453694,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ1MzY5NA==","avatar_url":"https://avatars3.githubusercontent.com/u/453694?v=4","gravatar_id":"","url":"https://api.github.com/users/salesforce","html_url":"https://github.com/salesforce","followers_url":"https://api.github.com/users/salesforce/followers","following_url":"https://api.github.com/users/salesforce/following{/other_user}","gists_url":"https://api.github.com/users/salesforce/gists{/gist_id}","starred_url":"https://api.github.com/users/salesforce/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/salesforce/subscriptions","organizations_url":"https://api.github.com/users/salesforce/orgs","repos_url":"https://api.github.com/users/salesforce/repos","events_url":"https://api.github.com/users/salesforce/events{/privacy}","received_events_url":"https://api.github.com/users/salesforce/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/salesforce/refocus","description":"The Go-To Platform for Visualizing Service Health","fork":false,"url":"https://api.github.com/repos/salesforce/refocus","forks_url":"https://api.github.com/repos/salesforce/refocus/forks","keys_url":"https://api.github.com/repos/salesforce/refocus/keys{/key_id}","collaborators_url":"https://api.github.com/repos/salesforce/refocus/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/salesforce/refocus/teams","hooks_url":"https://api.github.com/repos/salesforce/refocus/hooks","issue_events_url":"https://api.github.com/repos/salesforce/refocus/issues/events{/number}","events_url":"https://api.github.com/repos/salesforce/refocus/events","assignees_url":"https://api.github.com/repos/salesforce/refocus/assignees{/user}","branches_url":"https://api.github.com/repos/salesforce/refocus/branches{/branch}","tags_url":"https://api.github.com/repos/salesforce/refocus/tags","blobs_url":"https://api.github.com/repos/salesforce/refocus/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/salesforce/refocus/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/salesforce/refocus/git/refs{/sha}","trees_url":"https://api.github.com/repos/salesforce/refocus/git/trees{/sha}","statuses_url":"https://api.github.com/repos/salesforce/refocus/statuses/{sha}","languages_url":"https://api.github.com/repos/salesforce/refocus/languages","stargazers_url":"https://api.github.com/repos/salesforce/refocus/stargazers","contributors_url":"https://api.github.com/repos/salesforce/refocus/contributors","subscribers_url":"https://api.github.com/repos/salesforce/refocus/subscribers","subscription_url":"https://api.github.com/repos/salesforce/refocus/subscription","commits_url":"https://api.github.com/repos/salesforce/refocus/commits{/sha}","git_commits_url":"https://api.github.com/repos/salesforce/refocus/git/commits{/sha}","comments_url":"https://api.github.com/repos/salesforce/refocus/comments{/number}","issue_comment_url":"https://api.github.com/repos/salesforce/refocus/issues/comments{/number}","contents_url":"https://api.github.com/repos/salesforce/refocus/contents/{+path}","compare_url":"https://api.github.com/repos/salesforce/refocus/compare/{base}...{head}","merges_url":"https://api.github.com/repos/salesforce/refocus/merges","archive_url":"https://api.github.com/repos/salesforce/refocus/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/salesforce/refocus/downloads","issues_url":"https://api.github.com/repos/salesforce/refocus/issues{/number}","pulls_url":"https://api.github.com/repos/salesforce/refocus/pulls{/number}","milestones_url":"https://api.github.com/repos/salesforce/refocus/milestones{/number}","notifications_url":"https://api.github.com/repos/salesforce/refocus/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/salesforce/refocus/labels{/name}","releases_url":"https://api.github.com/repos/salesforce/refocus/releases{/id}","deployments_url":"https://api.github.com/repos/salesforce/refocus/deployments","created_at":"2016-07-29T21:27:40Z","updated_at":"2018-06-29T19:44:11Z","pushed_at":"2018-06-29T21:15:21Z","git_url":"git://github.com/salesforce/refocus.git","ssh_url":"git@github.com:salesforce/refocus.git","clone_url":"https://github.com/salesforce/refocus.git","svn_url":"https://github.com/salesforce/refocus","homepage":"https://salesforce.github.io/refocus/docs/01-quickstart.html","size":10997,"stargazers_count":77,"watchers_count":77,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":22,"mirror_url":null,"archived":false,"open_issues_count":24,"license":{"key":"bsd-3-clause","name":"BSD 3-Clause \"New\" or \"Revised\" License","spdx_id":"BSD-3-Clause","url":"https://api.github.com/licenses/bsd-3-clause","node_id":"MDc6TGljZW5zZTU="},"forks":22,"open_issues":24,"watchers":77,"default_branch":"master"}},"base":{"label":"salesforce:master","ref":"master","sha":"f9410f5ab3cbc79b3d9c265eda2272c79b976c03","user":{"login":"salesforce","id":453694,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ1MzY5NA==","avatar_url":"https://avatars3.githubusercontent.com/u/453694?v=4","gravatar_id":"","url":"https://api.github.com/users/salesforce","html_url":"https://github.com/salesforce","followers_url":"https://api.github.com/users/salesforce/followers","following_url":"https://api.github.com/users/salesforce/following{/other_user}","gists_url":"https://api.github.com/users/salesforce/gists{/gist_id}","starred_url":"https://api.github.com/users/salesforce/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/salesforce/subscriptions","organizations_url":"https://api.github.com/users/salesforce/orgs","repos_url":"https://api.github.com/users/salesforce/repos","events_url":"https://api.github.com/users/salesforce/events{/privacy}","received_events_url":"https://api.github.com/users/salesforce/received_events","type":"Organization","site_admin":false},"repo":{"id":64511432,"node_id":"MDEwOlJlcG9zaXRvcnk2NDUxMTQzMg==","name":"refocus","full_name":"salesforce/refocus","owner":{"login":"salesforce","id":453694,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ1MzY5NA==","avatar_url":"https://avatars3.githubusercontent.com/u/453694?v=4","gravatar_id":"","url":"https://api.github.com/users/salesforce","html_url":"https://github.com/salesforce","followers_url":"https://api.github.com/users/salesforce/followers","following_url":"https://api.github.com/users/salesforce/following{/other_user}","gists_url":"https://api.github.com/users/salesforce/gists{/gist_id}","starred_url":"https://api.github.com/users/salesforce/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/salesforce/subscriptions","organizations_url":"https://api.github.com/users/salesforce/orgs","repos_url":"https://api.github.com/users/salesforce/repos","events_url":"https://api.github.com/users/salesforce/events{/privacy}","received_events_url":"https://api.github.com/users/salesforce/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/salesforce/refocus","description":"The Go-To Platform for Visualizing Service Health","fork":false,"url":"https://api.github.com/repos/salesforce/refocus","forks_url":"https://api.github.com/repos/salesforce/refocus/forks","keys_url":"https://api.github.com/repos/salesforce/refocus/keys{/key_id}","collaborators_url":"https://api.github.com/repos/salesforce/refocus/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/salesforce/refocus/teams","hooks_url":"https://api.github.com/repos/salesforce/refocus/hooks","issue_events_url":"https://api.github.com/repos/salesforce/refocus/issues/events{/number}","events_url":"https://api.github.com/repos/salesforce/refocus/events","assignees_url":"https://api.github.com/repos/salesforce/refocus/assignees{/user}","branches_url":"https://api.github.com/repos/salesforce/refocus/branches{/branch}","tags_url":"https://api.github.com/repos/salesforce/refocus/tags","blobs_url":"https://api.github.com/repos/salesforce/refocus/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/salesforce/refocus/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/salesforce/refocus/git/refs{/sha}","trees_url":"https://api.github.com/repos/salesforce/refocus/git/trees{/sha}","statuses_url":"https://api.github.com/repos/salesforce/refocus/statuses/{sha}","languages_url":"https://api.github.com/repos/salesforce/refocus/languages","stargazers_url":"https://api.github.com/repos/salesforce/refocus/stargazers","contributors_url":"https://api.github.com/repos/salesforce/refocus/contributors","subscribers_url":"https://api.github.com/repos/salesforce/refocus/subscribers","subscription_url":"https://api.github.com/repos/salesforce/refocus/subscription","commits_url":"https://api.github.com/repos/salesforce/refocus/commits{/sha}","git_commits_url":"https://api.github.com/repos/salesforce/refocus/git/commits{/sha}","comments_url":"https://api.github.com/repos/salesforce/refocus/comments{/number}","issue_comment_url":"https://api.github.com/repos/salesforce/refocus/issues/comments{/number}","contents_url":"https://api.github.com/repos/salesforce/refocus/contents/{+path}","compare_url":"https://api.github.com/repos/salesforce/refocus/compare/{base}...{head}","merges_url":"https://api.github.com/repos/salesforce/refocus/merges","archive_url":"https://api.github.com/repos/salesforce/refocus/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/salesforce/refocus/downloads","issues_url":"https://api.github.com/repos/salesforce/refocus/issues{/number}","pulls_url":"https://api.github.com/repos/salesforce/refocus/pulls{/number}","milestones_url":"https://api.github.com/repos/salesforce/refocus/milestones{/number}","notifications_url":"https://api.github.com/repos/salesforce/refocus/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/salesforce/refocus/labels{/name}","releases_url":"https://api.github.com/repos/salesforce/refocus/releases{/id}","deployments_url":"https://api.github.com/repos/salesforce/refocus/deployments","created_at":"2016-07-29T21:27:40Z","updated_at":"2018-06-29T19:44:11Z","pushed_at":"2018-06-29T21:15:21Z","git_url":"git://github.com/salesforce/refocus.git","ssh_url":"git@github.com:salesforce/refocus.git","clone_url":"https://github.com/salesforce/refocus.git","svn_url":"https://github.com/salesforce/refocus","homepage":"https://salesforce.github.io/refocus/docs/01-quickstart.html","size":10997,"stargazers_count":77,"watchers_count":77,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":22,"mirror_url":null,"archived":false,"open_issues_count":24,"license":{"key":"bsd-3-clause","name":"BSD 3-Clause \"New\" or \"Revised\" License","spdx_id":"BSD-3-Clause","url":"https://api.github.com/licenses/bsd-3-clause","node_id":"MDc6TGljZW5zZTU="},"forks":22,"open_issues":24,"watchers":77,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/salesforce/refocus/pulls/911"},"html":{"href":"https://github.com/salesforce/refocus/pull/911"},"issue":{"href":"https://api.github.com/repos/salesforce/refocus/issues/911"},"comments":{"href":"https://api.github.com/repos/salesforce/refocus/issues/911/comments"},"review_comments":{"href":"https://api.github.com/repos/salesforce/refocus/pulls/911/comments"},"review_comment":{"href":"https://api.github.com/repos/salesforce/refocus/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/salesforce/refocus/pulls/911/commits"},"statuses":{"href":"https://api.github.com/repos/salesforce/refocus/statuses/696bdbb9f003a8a031a7cdd243f902e824c4e641"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"iamigo"}}