{"action":"created","comment":{"url":"https://api.github.com/repos/caskdata/coopr-provisioner/pulls/comments/82444066","pull_request_review_id":3352557,"id":82444066,"diff_hunk":"@@ -49,6 +51,21 @@ def to_json(*a)\n         end\n       end\n \n+      # Decodes a base64 string into a file\n+      def decode_string_to_file(string, outfile, mode = 0o600)\n+        ::FileUtils.mkdir_p(::File.dirname(outfile))\n+        ::File.open(outfile, 'wb', mode) { |f| f.write(::Base64.decode64(string)) }\n+      end\n+\n+      # Writes out an SSH file, given a path and task JSON, returns fully-qualified path to file\n+      def write_ssh_file(path, task)","path":"lib/provisioner/plugin/utils.rb","position":29,"original_position":29,"commit_id":"55ee7ee558a588b6038875a5d8a6c7b20f876b7c","original_commit_id":"55ee7ee558a588b6038875a5d8a6c7b20f876b7c","user":{"login":"dereklwood","id":1816517,"avatar_url":"https://avatars.githubusercontent.com/u/1816517?v=3","gravatar_id":"","url":"https://api.github.com/users/dereklwood","html_url":"https://github.com/dereklwood","followers_url":"https://api.github.com/users/dereklwood/followers","following_url":"https://api.github.com/users/dereklwood/following{/other_user}","gists_url":"https://api.github.com/users/dereklwood/gists{/gist_id}","starred_url":"https://api.github.com/users/dereklwood/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dereklwood/subscriptions","organizations_url":"https://api.github.com/users/dereklwood/orgs","repos_url":"https://api.github.com/users/dereklwood/repos","events_url":"https://api.github.com/users/dereklwood/events{/privacy}","received_events_url":"https://api.github.com/users/dereklwood/received_events","type":"User","site_admin":false},"body":"suggest adding a ``return nil if task['config']['provider']['provisioner']['ssh_keyfile'].nil?`` instead of the 3 checks we do below.  \r\n\r\nNote this changes the return value of the function in this case though.  see other comment","created_at":"2016-10-07T18:26:05Z","updated_at":"2016-10-07T18:58:39Z","html_url":"https://github.com/caskdata/coopr-provisioner/pull/156#discussion_r82444066","pull_request_url":"https://api.github.com/repos/caskdata/coopr-provisioner/pulls/156","_links":{"self":{"href":"https://api.github.com/repos/caskdata/coopr-provisioner/pulls/comments/82444066"},"html":{"href":"https://github.com/caskdata/coopr-provisioner/pull/156#discussion_r82444066"},"pull_request":{"href":"https://api.github.com/repos/caskdata/coopr-provisioner/pulls/156"}}},"pull_request":{"url":"https://api.github.com/repos/caskdata/coopr-provisioner/pulls/156","id":86582701,"html_url":"https://github.com/caskdata/coopr-provisioner/pull/156","diff_url":"https://github.com/caskdata/coopr-provisioner/pull/156.diff","patch_url":"https://github.com/caskdata/coopr-provisioner/pull/156.patch","issue_url":"https://api.github.com/repos/caskdata/coopr-provisioner/issues/156","number":156,"state":"open","locked":false,"title":"Move write_ssh_file to Coopr::Plugin::Utils","user":{"login":"wolf31o2","id":380021,"avatar_url":"https://avatars.githubusercontent.com/u/380021?v=3","gravatar_id":"","url":"https://api.github.com/users/wolf31o2","html_url":"https://github.com/wolf31o2","followers_url":"https://api.github.com/users/wolf31o2/followers","following_url":"https://api.github.com/users/wolf31o2/following{/other_user}","gists_url":"https://api.github.com/users/wolf31o2/gists{/gist_id}","starred_url":"https://api.github.com/users/wolf31o2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wolf31o2/subscriptions","organizations_url":"https://api.github.com/users/wolf31o2/orgs","repos_url":"https://api.github.com/users/wolf31o2/repos","events_url":"https://api.github.com/users/wolf31o2/events{/privacy}","received_events_url":"https://api.github.com/users/wolf31o2/received_events","type":"User","site_admin":false},"body":"This makes this method shared among all of the plugins, versus being duplicated in each automator plugin.","created_at":"2016-09-23T21:18:34Z","updated_at":"2016-10-07T18:58:39Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d4a73ee989d07f8f612aa267152cb1ea426400a9","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/caskdata/coopr-provisioner/pulls/156/commits","review_comments_url":"https://api.github.com/repos/caskdata/coopr-provisioner/pulls/156/comments","review_comment_url":"https://api.github.com/repos/caskdata/coopr-provisioner/pulls/comments{/number}","comments_url":"https://api.github.com/repos/caskdata/coopr-provisioner/issues/156/comments","statuses_url":"https://api.github.com/repos/caskdata/coopr-provisioner/statuses/55ee7ee558a588b6038875a5d8a6c7b20f876b7c","head":{"label":"caskdata:feature/write-ssh-file-in-utils","ref":"feature/write-ssh-file-in-utils","sha":"55ee7ee558a588b6038875a5d8a6c7b20f876b7c","user":{"login":"caskdata","id":8123023,"avatar_url":"https://avatars.githubusercontent.com/u/8123023?v=3","gravatar_id":"","url":"https://api.github.com/users/caskdata","html_url":"https://github.com/caskdata","followers_url":"https://api.github.com/users/caskdata/followers","following_url":"https://api.github.com/users/caskdata/following{/other_user}","gists_url":"https://api.github.com/users/caskdata/gists{/gist_id}","starred_url":"https://api.github.com/users/caskdata/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/caskdata/subscriptions","organizations_url":"https://api.github.com/users/caskdata/orgs","repos_url":"https://api.github.com/users/caskdata/repos","events_url":"https://api.github.com/users/caskdata/events{/privacy}","received_events_url":"https://api.github.com/users/caskdata/received_events","type":"Organization","site_admin":false},"repo":{"id":28881087,"name":"coopr-provisioner","full_name":"caskdata/coopr-provisioner","owner":{"login":"caskdata","id":8123023,"avatar_url":"https://avatars.githubusercontent.com/u/8123023?v=3","gravatar_id":"","url":"https://api.github.com/users/caskdata","html_url":"https://github.com/caskdata","followers_url":"https://api.github.com/users/caskdata/followers","following_url":"https://api.github.com/users/caskdata/following{/other_user}","gists_url":"https://api.github.com/users/caskdata/gists{/gist_id}","starred_url":"https://api.github.com/users/caskdata/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/caskdata/subscriptions","organizations_url":"https://api.github.com/users/caskdata/orgs","repos_url":"https://api.github.com/users/caskdata/repos","events_url":"https://api.github.com/users/caskdata/events{/privacy}","received_events_url":"https://api.github.com/users/caskdata/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/caskdata/coopr-provisioner","description":"Provisioner service for Coopr (caskdata/coopr)","fork":false,"url":"https://api.github.com/repos/caskdata/coopr-provisioner","forks_url":"https://api.github.com/repos/caskdata/coopr-provisioner/forks","keys_url":"https://api.github.com/repos/caskdata/coopr-provisioner/keys{/key_id}","collaborators_url":"https://api.github.com/repos/caskdata/coopr-provisioner/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/caskdata/coopr-provisioner/teams","hooks_url":"https://api.github.com/repos/caskdata/coopr-provisioner/hooks","issue_events_url":"https://api.github.com/repos/caskdata/coopr-provisioner/issues/events{/number}","events_url":"https://api.github.com/repos/caskdata/coopr-provisioner/events","assignees_url":"https://api.github.com/repos/caskdata/coopr-provisioner/assignees{/user}","branches_url":"https://api.github.com/repos/caskdata/coopr-provisioner/branches{/branch}","tags_url":"https://api.github.com/repos/caskdata/coopr-provisioner/tags","blobs_url":"https://api.github.com/repos/caskdata/coopr-provisioner/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/caskdata/coopr-provisioner/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/caskdata/coopr-provisioner/git/refs{/sha}","trees_url":"https://api.github.com/repos/caskdata/coopr-provisioner/git/trees{/sha}","statuses_url":"https://api.github.com/repos/caskdata/coopr-provisioner/statuses/{sha}","languages_url":"https://api.github.com/repos/caskdata/coopr-provisioner/languages","stargazers_url":"https://api.github.com/repos/caskdata/coopr-provisioner/stargazers","contributors_url":"https://api.github.com/repos/caskdata/coopr-provisioner/contributors","subscribers_url":"https://api.github.com/repos/caskdata/coopr-provisioner/subscribers","subscription_url":"https://api.github.com/repos/caskdata/coopr-provisioner/subscription","commits_url":"https://api.github.com/repos/caskdata/coopr-provisioner/commits{/sha}","git_commits_url":"https://api.github.com/repos/caskdata/coopr-provisioner/git/commits{/sha}","comments_url":"https://api.github.com/repos/caskdata/coopr-provisioner/comments{/number}","issue_comment_url":"https://api.github.com/repos/caskdata/coopr-provisioner/issues/comments{/number}","contents_url":"https://api.github.com/repos/caskdata/coopr-provisioner/contents/{+path}","compare_url":"https://api.github.com/repos/caskdata/coopr-provisioner/compare/{base}...{head}","merges_url":"https://api.github.com/repos/caskdata/coopr-provisioner/merges","archive_url":"https://api.github.com/repos/caskdata/coopr-provisioner/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/caskdata/coopr-provisioner/downloads","issues_url":"https://api.github.com/repos/caskdata/coopr-provisioner/issues{/number}","pulls_url":"https://api.github.com/repos/caskdata/coopr-provisioner/pulls{/number}","milestones_url":"https://api.github.com/repos/caskdata/coopr-provisioner/milestones{/number}","notifications_url":"https://api.github.com/repos/caskdata/coopr-provisioner/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/caskdata/coopr-provisioner/labels{/name}","releases_url":"https://api.github.com/repos/caskdata/coopr-provisioner/releases{/id}","deployments_url":"https://api.github.com/repos/caskdata/coopr-provisioner/deployments","created_at":"2015-01-06T20:05:44Z","updated_at":"2016-06-16T21:41:28Z","pushed_at":"2016-10-07T01:17:08Z","git_url":"git://github.com/caskdata/coopr-provisioner.git","ssh_url":"git@github.com:caskdata/coopr-provisioner.git","clone_url":"https://github.com/caskdata/coopr-provisioner.git","svn_url":"https://github.com/caskdata/coopr-provisioner","homepage":"http://coopr.io","size":4831,"stargazers_count":5,"watchers_count":5,"language":"Ruby","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":3,"mirror_url":null,"open_issues_count":1,"forks":3,"open_issues":1,"watchers":5,"default_branch":"develop"}},"base":{"label":"caskdata:develop","ref":"develop","sha":"1706a340191c562654895684f44ab635183fd31f","user":{"login":"caskdata","id":8123023,"avatar_url":"https://avatars.githubusercontent.com/u/8123023?v=3","gravatar_id":"","url":"https://api.github.com/users/caskdata","html_url":"https://github.com/caskdata","followers_url":"https://api.github.com/users/caskdata/followers","following_url":"https://api.github.com/users/caskdata/following{/other_user}","gists_url":"https://api.github.com/users/caskdata/gists{/gist_id}","starred_url":"https://api.github.com/users/caskdata/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/caskdata/subscriptions","organizations_url":"https://api.github.com/users/caskdata/orgs","repos_url":"https://api.github.com/users/caskdata/repos","events_url":"https://api.github.com/users/caskdata/events{/privacy}","received_events_url":"https://api.github.com/users/caskdata/received_events","type":"Organization","site_admin":false},"repo":{"id":28881087,"name":"coopr-provisioner","full_name":"caskdata/coopr-provisioner","owner":{"login":"caskdata","id":8123023,"avatar_url":"https://avatars.githubusercontent.com/u/8123023?v=3","gravatar_id":"","url":"https://api.github.com/users/caskdata","html_url":"https://github.com/caskdata","followers_url":"https://api.github.com/users/caskdata/followers","following_url":"https://api.github.com/users/caskdata/following{/other_user}","gists_url":"https://api.github.com/users/caskdata/gists{/gist_id}","starred_url":"https://api.github.com/users/caskdata/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/caskdata/subscriptions","organizations_url":"https://api.github.com/users/caskdata/orgs","repos_url":"https://api.github.com/users/caskdata/repos","events_url":"https://api.github.com/users/caskdata/events{/privacy}","received_events_url":"https://api.github.com/users/caskdata/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/caskdata/coopr-provisioner","description":"Provisioner service for Coopr (caskdata/coopr)","fork":false,"url":"https://api.github.com/repos/caskdata/coopr-provisioner","forks_url":"https://api.github.com/repos/caskdata/coopr-provisioner/forks","keys_url":"https://api.github.com/repos/caskdata/coopr-provisioner/keys{/key_id}","collaborators_url":"https://api.github.com/repos/caskdata/coopr-provisioner/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/caskdata/coopr-provisioner/teams","hooks_url":"https://api.github.com/repos/caskdata/coopr-provisioner/hooks","issue_events_url":"https://api.github.com/repos/caskdata/coopr-provisioner/issues/events{/number}","events_url":"https://api.github.com/repos/caskdata/coopr-provisioner/events","assignees_url":"https://api.github.com/repos/caskdata/coopr-provisioner/assignees{/user}","branches_url":"https://api.github.com/repos/caskdata/coopr-provisioner/branches{/branch}","tags_url":"https://api.github.com/repos/caskdata/coopr-provisioner/tags","blobs_url":"https://api.github.com/repos/caskdata/coopr-provisioner/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/caskdata/coopr-provisioner/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/caskdata/coopr-provisioner/git/refs{/sha}","trees_url":"https://api.github.com/repos/caskdata/coopr-provisioner/git/trees{/sha}","statuses_url":"https://api.github.com/repos/caskdata/coopr-provisioner/statuses/{sha}","languages_url":"https://api.github.com/repos/caskdata/coopr-provisioner/languages","stargazers_url":"https://api.github.com/repos/caskdata/coopr-provisioner/stargazers","contributors_url":"https://api.github.com/repos/caskdata/coopr-provisioner/contributors","subscribers_url":"https://api.github.com/repos/caskdata/coopr-provisioner/subscribers","subscription_url":"https://api.github.com/repos/caskdata/coopr-provisioner/subscription","commits_url":"https://api.github.com/repos/caskdata/coopr-provisioner/commits{/sha}","git_commits_url":"https://api.github.com/repos/caskdata/coopr-provisioner/git/commits{/sha}","comments_url":"https://api.github.com/repos/caskdata/coopr-provisioner/comments{/number}","issue_comment_url":"https://api.github.com/repos/caskdata/coopr-provisioner/issues/comments{/number}","contents_url":"https://api.github.com/repos/caskdata/coopr-provisioner/contents/{+path}","compare_url":"https://api.github.com/repos/caskdata/coopr-provisioner/compare/{base}...{head}","merges_url":"https://api.github.com/repos/caskdata/coopr-provisioner/merges","archive_url":"https://api.github.com/repos/caskdata/coopr-provisioner/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/caskdata/coopr-provisioner/downloads","issues_url":"https://api.github.com/repos/caskdata/coopr-provisioner/issues{/number}","pulls_url":"https://api.github.com/repos/caskdata/coopr-provisioner/pulls{/number}","milestones_url":"https://api.github.com/repos/caskdata/coopr-provisioner/milestones{/number}","notifications_url":"https://api.github.com/repos/caskdata/coopr-provisioner/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/caskdata/coopr-provisioner/labels{/name}","releases_url":"https://api.github.com/repos/caskdata/coopr-provisioner/releases{/id}","deployments_url":"https://api.github.com/repos/caskdata/coopr-provisioner/deployments","created_at":"2015-01-06T20:05:44Z","updated_at":"2016-06-16T21:41:28Z","pushed_at":"2016-10-07T01:17:08Z","git_url":"git://github.com/caskdata/coopr-provisioner.git","ssh_url":"git@github.com:caskdata/coopr-provisioner.git","clone_url":"https://github.com/caskdata/coopr-provisioner.git","svn_url":"https://github.com/caskdata/coopr-provisioner","homepage":"http://coopr.io","size":4831,"stargazers_count":5,"watchers_count":5,"language":"Ruby","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":3,"mirror_url":null,"open_issues_count":1,"forks":3,"open_issues":1,"watchers":5,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/caskdata/coopr-provisioner/pulls/156"},"html":{"href":"https://github.com/caskdata/coopr-provisioner/pull/156"},"issue":{"href":"https://api.github.com/repos/caskdata/coopr-provisioner/issues/156"},"comments":{"href":"https://api.github.com/repos/caskdata/coopr-provisioner/issues/156/comments"},"review_comments":{"href":"https://api.github.com/repos/caskdata/coopr-provisioner/pulls/156/comments"},"review_comment":{"href":"https://api.github.com/repos/caskdata/coopr-provisioner/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/caskdata/coopr-provisioner/pulls/156/commits"},"statuses":{"href":"https://api.github.com/repos/caskdata/coopr-provisioner/statuses/55ee7ee558a588b6038875a5d8a6c7b20f876b7c"}}}}
{"actor":{"display_login":"dereklwood"}}