{"action":"created","comment":{"url":"https://api.github.com/repos/facebook/IT-CPE/pulls/comments/75538795","id":75538795,"diff_hunk":"@@ -25,42 +40,148 @@\n         'Screensaver password delay is too high!'\n       )\n     end\n-    prefix = node['cpe_profiles']['prefix']\n-    organization = node['organization'] ? node['organization'] : 'Facebook'\n-    node.default['cpe_profiles'][\"#{prefix}.screensaver\"] = {\n-      'PayloadIdentifier' => \"#{prefix}.screensaver\",\n-      'PayloadRemovalDisallowed' => true,\n-      'PayloadScope' => 'System',\n-      'PayloadType' => 'Configuration',\n-      'PayloadUUID' => 'CEA1E58D-9D0F-453A-AA52-830986A8366C',\n-      'PayloadOrganization' => organization,\n+    unless node['cpe_screensaver']['MESSAGE'].empty? && node['cpe_screensaver']['SelectedFolderPath'].empty?\n+      Chef::Log.warn(\n+        'Screensaver module management has conflicting keys!'\n+      )\n+    end\n+    \n+    screensaver_profile['PayloadContent'].push({\n+      'PayloadType' => 'com.apple.ManagedClient.preferences',\n       'PayloadVersion' => 1,\n-      'PayloadDisplayName' => 'Screensaver',\n-      'PayloadContent' => [\n-        {\n-          'PayloadType' => 'com.apple.ManagedClient.preferences',\n-          'PayloadVersion' => 1,\n-          'PayloadIdentifier' => \"#{prefix}.screensaver\",\n-          'PayloadUUID' => '3B2AD6A9-F99E-4813-980A-4147617B2E75',\n-          'PayloadEnabled' => true,\n-          'PayloadDisplayName' => 'ScreenSaver',\n-          'PayloadContent' => {\n-            'com.apple.screensaver' => {\n-              'Forced' => [\n-                {\n-                  'mcx_preference_settings' => {\n-                    'idleTime' => node['cpe_screensaver']['idleTime'],\n-                    'askForPassword' =>\n-                      node['cpe_screensaver']['askForPassword'],\n-                    'askForPasswordDelay' =>\n-                      node['cpe_screensaver']['askForPasswordDelay']\n+      'PayloadIdentifier' => \"#{prefix}.screensaver\",\n+      'PayloadUUID' => '3B2AD6A9-F99E-4813-980A-4147617B2E75',\n+      'PayloadEnabled' => true,\n+      'PayloadDisplayName' => 'ScreenSaver',\n+      'PayloadContent' => {\n+        'com.apple.screensaver' => {\n+          'Forced' => [\n+            {\n+              'mcx_preference_settings' => {\n+                'idleTime' => node['cpe_screensaver']['idleTime'],\n+                'askForPassword' => node['cpe_screensaver']['askForPassword'],\n+                'askForPasswordDelay' => node['cpe_screensaver']['askForPasswordDelay']\n+              }\n+            }\n+          ]\n+        }\n+      }\n+    })\n+\n+    unless node['cpe_screensaver']['MESSAGE'].to_s == ''","path":"chef/cookbooks/cpe_screensaver/recipes/default.rb","position":86,"original_position":86,"commit_id":"866e0e1876c0980651f41e6ad86cc982daf96d6c","original_commit_id":"866e0e1876c0980651f41e6ad86cc982daf96d6c","user":{"login":"mikedodge04","id":4033125,"avatar_url":"https://avatars.githubusercontent.com/u/4033125?v=3","gravatar_id":"","url":"https://api.github.com/users/mikedodge04","html_url":"https://github.com/mikedodge04","followers_url":"https://api.github.com/users/mikedodge04/followers","following_url":"https://api.github.com/users/mikedodge04/following{/other_user}","gists_url":"https://api.github.com/users/mikedodge04/gists{/gist_id}","starred_url":"https://api.github.com/users/mikedodge04/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mikedodge04/subscriptions","organizations_url":"https://api.github.com/users/mikedodge04/orgs","repos_url":"https://api.github.com/users/mikedodge04/repos","events_url":"https://api.github.com/users/mikedodge04/events{/privacy}","received_events_url":"https://api.github.com/users/mikedodge04/received_events","type":"User","site_admin":false},"body":"unless node['cpe_screensaver']['MESSAGE']","created_at":"2016-08-19T19:27:25Z","updated_at":"2016-08-19T19:27:25Z","html_url":"https://github.com/facebook/IT-CPE/pull/31#discussion_r75538795","pull_request_url":"https://api.github.com/repos/facebook/IT-CPE/pulls/31","_links":{"self":{"href":"https://api.github.com/repos/facebook/IT-CPE/pulls/comments/75538795"},"html":{"href":"https://github.com/facebook/IT-CPE/pull/31#discussion_r75538795"},"pull_request":{"href":"https://api.github.com/repos/facebook/IT-CPE/pulls/31"}}},"pull_request":{"url":"https://api.github.com/repos/facebook/IT-CPE/pulls/31","id":81808952,"html_url":"https://github.com/facebook/IT-CPE/pull/31","diff_url":"https://github.com/facebook/IT-CPE/pull/31.diff","patch_url":"https://github.com/facebook/IT-CPE/pull/31.patch","issue_url":"https://api.github.com/repos/facebook/IT-CPE/issues/31","number":31,"state":"open","locked":false,"title":"Cpe screensaver","user":{"login":"cgerke","id":374445,"avatar_url":"https://avatars.githubusercontent.com/u/374445?v=3","gravatar_id":"","url":"https://api.github.com/users/cgerke","html_url":"https://github.com/cgerke","followers_url":"https://api.github.com/users/cgerke/followers","following_url":"https://api.github.com/users/cgerke/following{/other_user}","gists_url":"https://api.github.com/users/cgerke/gists{/gist_id}","starred_url":"https://api.github.com/users/cgerke/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cgerke/subscriptions","organizations_url":"https://api.github.com/users/cgerke/orgs","repos_url":"https://api.github.com/users/cgerke/repos","events_url":"https://api.github.com/users/cgerke/events{/privacy}","received_events_url":"https://api.github.com/users/cgerke/received_events","type":"User","site_admin":false},"body":"Pull? or you guys got some other kinda magic on its way?","created_at":"2016-08-18T12:43:15Z","updated_at":"2016-08-19T19:27:25Z","closed_at":null,"merged_at":null,"merge_commit_sha":"9ab44dd39804e7e09528cecf2f93f15bcad208e3","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/facebook/IT-CPE/pulls/31/commits","review_comments_url":"https://api.github.com/repos/facebook/IT-CPE/pulls/31/comments","review_comment_url":"https://api.github.com/repos/facebook/IT-CPE/pulls/comments{/number}","comments_url":"https://api.github.com/repos/facebook/IT-CPE/issues/31/comments","statuses_url":"https://api.github.com/repos/facebook/IT-CPE/statuses/866e0e1876c0980651f41e6ad86cc982daf96d6c","head":{"label":"cgerke:cpe_screensaver","ref":"cpe_screensaver","sha":"866e0e1876c0980651f41e6ad86cc982daf96d6c","user":{"login":"cgerke","id":374445,"avatar_url":"https://avatars.githubusercontent.com/u/374445?v=3","gravatar_id":"","url":"https://api.github.com/users/cgerke","html_url":"https://github.com/cgerke","followers_url":"https://api.github.com/users/cgerke/followers","following_url":"https://api.github.com/users/cgerke/following{/other_user}","gists_url":"https://api.github.com/users/cgerke/gists{/gist_id}","starred_url":"https://api.github.com/users/cgerke/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cgerke/subscriptions","organizations_url":"https://api.github.com/users/cgerke/orgs","repos_url":"https://api.github.com/users/cgerke/repos","events_url":"https://api.github.com/users/cgerke/events{/privacy}","received_events_url":"https://api.github.com/users/cgerke/received_events","type":"User","site_admin":false},"repo":{"id":65879253,"name":"IT-CPE","full_name":"cgerke/IT-CPE","owner":{"login":"cgerke","id":374445,"avatar_url":"https://avatars.githubusercontent.com/u/374445?v=3","gravatar_id":"","url":"https://api.github.com/users/cgerke","html_url":"https://github.com/cgerke","followers_url":"https://api.github.com/users/cgerke/followers","following_url":"https://api.github.com/users/cgerke/following{/other_user}","gists_url":"https://api.github.com/users/cgerke/gists{/gist_id}","starred_url":"https://api.github.com/users/cgerke/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cgerke/subscriptions","organizations_url":"https://api.github.com/users/cgerke/orgs","repos_url":"https://api.github.com/users/cgerke/repos","events_url":"https://api.github.com/users/cgerke/events{/privacy}","received_events_url":"https://api.github.com/users/cgerke/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/cgerke/IT-CPE","description":"Facebook's IT - Client Platform Engineering tools. Some of the tools we have written to help manage our fleet of client systems. ","fork":true,"url":"https://api.github.com/repos/cgerke/IT-CPE","forks_url":"https://api.github.com/repos/cgerke/IT-CPE/forks","keys_url":"https://api.github.com/repos/cgerke/IT-CPE/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cgerke/IT-CPE/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cgerke/IT-CPE/teams","hooks_url":"https://api.github.com/repos/cgerke/IT-CPE/hooks","issue_events_url":"https://api.github.com/repos/cgerke/IT-CPE/issues/events{/number}","events_url":"https://api.github.com/repos/cgerke/IT-CPE/events","assignees_url":"https://api.github.com/repos/cgerke/IT-CPE/assignees{/user}","branches_url":"https://api.github.com/repos/cgerke/IT-CPE/branches{/branch}","tags_url":"https://api.github.com/repos/cgerke/IT-CPE/tags","blobs_url":"https://api.github.com/repos/cgerke/IT-CPE/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cgerke/IT-CPE/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cgerke/IT-CPE/git/refs{/sha}","trees_url":"https://api.github.com/repos/cgerke/IT-CPE/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cgerke/IT-CPE/statuses/{sha}","languages_url":"https://api.github.com/repos/cgerke/IT-CPE/languages","stargazers_url":"https://api.github.com/repos/cgerke/IT-CPE/stargazers","contributors_url":"https://api.github.com/repos/cgerke/IT-CPE/contributors","subscribers_url":"https://api.github.com/repos/cgerke/IT-CPE/subscribers","subscription_url":"https://api.github.com/repos/cgerke/IT-CPE/subscription","commits_url":"https://api.github.com/repos/cgerke/IT-CPE/commits{/sha}","git_commits_url":"https://api.github.com/repos/cgerke/IT-CPE/git/commits{/sha}","comments_url":"https://api.github.com/repos/cgerke/IT-CPE/comments{/number}","issue_comment_url":"https://api.github.com/repos/cgerke/IT-CPE/issues/comments{/number}","contents_url":"https://api.github.com/repos/cgerke/IT-CPE/contents/{+path}","compare_url":"https://api.github.com/repos/cgerke/IT-CPE/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cgerke/IT-CPE/merges","archive_url":"https://api.github.com/repos/cgerke/IT-CPE/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cgerke/IT-CPE/downloads","issues_url":"https://api.github.com/repos/cgerke/IT-CPE/issues{/number}","pulls_url":"https://api.github.com/repos/cgerke/IT-CPE/pulls{/number}","milestones_url":"https://api.github.com/repos/cgerke/IT-CPE/milestones{/number}","notifications_url":"https://api.github.com/repos/cgerke/IT-CPE/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cgerke/IT-CPE/labels{/name}","releases_url":"https://api.github.com/repos/cgerke/IT-CPE/releases{/id}","deployments_url":"https://api.github.com/repos/cgerke/IT-CPE/deployments","created_at":"2016-08-17T05:44:24Z","updated_at":"2016-08-17T05:44:25Z","pushed_at":"2016-08-19T13:31:50Z","git_url":"git://github.com/cgerke/IT-CPE.git","ssh_url":"git@github.com:cgerke/IT-CPE.git","clone_url":"https://github.com/cgerke/IT-CPE.git","svn_url":"https://github.com/cgerke/IT-CPE","homepage":null,"size":4240,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"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":"facebook:master","ref":"master","sha":"c190ad0682fa92a6b80014b790761358fcda6cad","user":{"login":"facebook","id":69631,"avatar_url":"https://avatars.githubusercontent.com/u/69631?v=3","gravatar_id":"","url":"https://api.github.com/users/facebook","html_url":"https://github.com/facebook","followers_url":"https://api.github.com/users/facebook/followers","following_url":"https://api.github.com/users/facebook/following{/other_user}","gists_url":"https://api.github.com/users/facebook/gists{/gist_id}","starred_url":"https://api.github.com/users/facebook/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/facebook/subscriptions","organizations_url":"https://api.github.com/users/facebook/orgs","repos_url":"https://api.github.com/users/facebook/repos","events_url":"https://api.github.com/users/facebook/events{/privacy}","received_events_url":"https://api.github.com/users/facebook/received_events","type":"Organization","site_admin":false},"repo":{"id":17845857,"name":"IT-CPE","full_name":"facebook/IT-CPE","owner":{"login":"facebook","id":69631,"avatar_url":"https://avatars.githubusercontent.com/u/69631?v=3","gravatar_id":"","url":"https://api.github.com/users/facebook","html_url":"https://github.com/facebook","followers_url":"https://api.github.com/users/facebook/followers","following_url":"https://api.github.com/users/facebook/following{/other_user}","gists_url":"https://api.github.com/users/facebook/gists{/gist_id}","starred_url":"https://api.github.com/users/facebook/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/facebook/subscriptions","organizations_url":"https://api.github.com/users/facebook/orgs","repos_url":"https://api.github.com/users/facebook/repos","events_url":"https://api.github.com/users/facebook/events{/privacy}","received_events_url":"https://api.github.com/users/facebook/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/facebook/IT-CPE","description":"Facebook's IT - Client Platform Engineering tools. Some of the tools we have written to help manage our fleet of client systems. ","fork":false,"url":"https://api.github.com/repos/facebook/IT-CPE","forks_url":"https://api.github.com/repos/facebook/IT-CPE/forks","keys_url":"https://api.github.com/repos/facebook/IT-CPE/keys{/key_id}","collaborators_url":"https://api.github.com/repos/facebook/IT-CPE/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/facebook/IT-CPE/teams","hooks_url":"https://api.github.com/repos/facebook/IT-CPE/hooks","issue_events_url":"https://api.github.com/repos/facebook/IT-CPE/issues/events{/number}","events_url":"https://api.github.com/repos/facebook/IT-CPE/events","assignees_url":"https://api.github.com/repos/facebook/IT-CPE/assignees{/user}","branches_url":"https://api.github.com/repos/facebook/IT-CPE/branches{/branch}","tags_url":"https://api.github.com/repos/facebook/IT-CPE/tags","blobs_url":"https://api.github.com/repos/facebook/IT-CPE/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/facebook/IT-CPE/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/facebook/IT-CPE/git/refs{/sha}","trees_url":"https://api.github.com/repos/facebook/IT-CPE/git/trees{/sha}","statuses_url":"https://api.github.com/repos/facebook/IT-CPE/statuses/{sha}","languages_url":"https://api.github.com/repos/facebook/IT-CPE/languages","stargazers_url":"https://api.github.com/repos/facebook/IT-CPE/stargazers","contributors_url":"https://api.github.com/repos/facebook/IT-CPE/contributors","subscribers_url":"https://api.github.com/repos/facebook/IT-CPE/subscribers","subscription_url":"https://api.github.com/repos/facebook/IT-CPE/subscription","commits_url":"https://api.github.com/repos/facebook/IT-CPE/commits{/sha}","git_commits_url":"https://api.github.com/repos/facebook/IT-CPE/git/commits{/sha}","comments_url":"https://api.github.com/repos/facebook/IT-CPE/comments{/number}","issue_comment_url":"https://api.github.com/repos/facebook/IT-CPE/issues/comments{/number}","contents_url":"https://api.github.com/repos/facebook/IT-CPE/contents/{+path}","compare_url":"https://api.github.com/repos/facebook/IT-CPE/compare/{base}...{head}","merges_url":"https://api.github.com/repos/facebook/IT-CPE/merges","archive_url":"https://api.github.com/repos/facebook/IT-CPE/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/facebook/IT-CPE/downloads","issues_url":"https://api.github.com/repos/facebook/IT-CPE/issues{/number}","pulls_url":"https://api.github.com/repos/facebook/IT-CPE/pulls{/number}","milestones_url":"https://api.github.com/repos/facebook/IT-CPE/milestones{/number}","notifications_url":"https://api.github.com/repos/facebook/IT-CPE/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/facebook/IT-CPE/labels{/name}","releases_url":"https://api.github.com/repos/facebook/IT-CPE/releases{/id}","deployments_url":"https://api.github.com/repos/facebook/IT-CPE/deployments","created_at":"2014-03-17T22:35:48Z","updated_at":"2016-08-18T13:14:05Z","pushed_at":"2016-08-19T04:22:51Z","git_url":"git://github.com/facebook/IT-CPE.git","ssh_url":"git@github.com:facebook/IT-CPE.git","clone_url":"https://github.com/facebook/IT-CPE.git","svn_url":"https://github.com/facebook/IT-CPE","homepage":null,"size":4252,"stargazers_count":171,"watchers_count":171,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":34,"mirror_url":null,"open_issues_count":5,"forks":34,"open_issues":5,"watchers":171,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/facebook/IT-CPE/pulls/31"},"html":{"href":"https://github.com/facebook/IT-CPE/pull/31"},"issue":{"href":"https://api.github.com/repos/facebook/IT-CPE/issues/31"},"comments":{"href":"https://api.github.com/repos/facebook/IT-CPE/issues/31/comments"},"review_comments":{"href":"https://api.github.com/repos/facebook/IT-CPE/pulls/31/comments"},"review_comment":{"href":"https://api.github.com/repos/facebook/IT-CPE/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/facebook/IT-CPE/pulls/31/commits"},"statuses":{"href":"https://api.github.com/repos/facebook/IT-CPE/statuses/866e0e1876c0980651f41e6ad86cc982daf96d6c"}}}}
{"actor":{"display_login":"mikedodge04"}}