{"action":"created","comment":{"url":"https://api.github.com/repos/fnichol/chef-user/pulls/comments/86734288","pull_request_review_id":7375816,"id":86734288,"diff_hunk":"@@ -169,7 +169,24 @@ def home_ssh_dir_resource(exec_action)\n \n def authorized_keys_resource(exec_action)\n   # avoid variable scoping issues in resource block\n-  ssh_keys = Array(new_resource.ssh_keys)\n+  ssh_keys = []\n+  Array(new_resource.ssh_keys).each do |item|\n+    # if item is a valid ssh key, copy it.\n+    if item =~ /^(ssh-(dss|rsa|ed25519)|ecdsa-sha2-\\w+) AAAA/","path":"providers/account.rb","position":8,"original_position":8,"commit_id":"cbc829688e7ddc5749d7e5cdf77e4de31f542af9","original_commit_id":"cbc829688e7ddc5749d7e5cdf77e4de31f542af9","user":{"login":"theckman","id":787332,"avatar_url":"https://avatars.githubusercontent.com/u/787332?v=3","gravatar_id":"","url":"https://api.github.com/users/theckman","html_url":"https://github.com/theckman","followers_url":"https://api.github.com/users/theckman/followers","following_url":"https://api.github.com/users/theckman/following{/other_user}","gists_url":"https://api.github.com/users/theckman/gists{/gist_id}","starred_url":"https://api.github.com/users/theckman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/theckman/subscriptions","organizations_url":"https://api.github.com/users/theckman/orgs","repos_url":"https://api.github.com/users/theckman/repos","events_url":"https://api.github.com/users/theckman/events{/privacy}","received_events_url":"https://api.github.com/users/theckman/received_events","type":"User","site_admin":false},"body":"I'm personally guilty of abusing this resource to add comments to my authorized keys file. Can you please add something similar to `(\\s+)?#`. I'm thinking it'd be good not to chomp comments even if it has some erroneous whitespace at the front.","created_at":"2016-11-07T09:10:12Z","updated_at":"2016-11-07T09:10:12Z","html_url":"https://github.com/fnichol/chef-user/pull/65#discussion_r86734288","pull_request_url":"https://api.github.com/repos/fnichol/chef-user/pulls/65","_links":{"self":{"href":"https://api.github.com/repos/fnichol/chef-user/pulls/comments/86734288"},"html":{"href":"https://github.com/fnichol/chef-user/pull/65#discussion_r86734288"},"pull_request":{"href":"https://api.github.com/repos/fnichol/chef-user/pulls/65"}}},"pull_request":{"url":"https://api.github.com/repos/fnichol/chef-user/pulls/65","id":15586750,"html_url":"https://github.com/fnichol/chef-user/pull/65","diff_url":"https://github.com/fnichol/chef-user/pull/65.diff","patch_url":"https://github.com/fnichol/chef-user/pull/65.patch","issue_url":"https://api.github.com/repos/fnichol/chef-user/issues/65","number":65,"state":"open","locked":false,"title":"Data bag support","user":{"login":"chr4","id":4600363,"avatar_url":"https://avatars.githubusercontent.com/u/4600363?v=3","gravatar_id":"","url":"https://api.github.com/users/chr4","html_url":"https://github.com/chr4","followers_url":"https://api.github.com/users/chr4/followers","following_url":"https://api.github.com/users/chr4/following{/other_user}","gists_url":"https://api.github.com/users/chr4/gists{/gist_id}","starred_url":"https://api.github.com/users/chr4/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chr4/subscriptions","organizations_url":"https://api.github.com/users/chr4/orgs","repos_url":"https://api.github.com/users/chr4/repos","events_url":"https://api.github.com/users/chr4/events{/privacy}","received_events_url":"https://api.github.com/users/chr4/received_events","type":"User","site_admin":false},"body":"I found it very useful to be able to retrieve users public keys from a central data dag, even when setting up users using the LWRP.\n\nThis pull requests adds support for not only specifying ssh keys in the `ssh_keys` attribute, but also transparently use data bag items, containing these keys. \n\nThey can be used alongside each other, and the implementation shouldn't break any existing setups.\n\nThe following example will assign all three provided keys to the user\n\n``` ruby\nuser_account 'chris' do\n  home '/home/chris'\n  ssh_keys [ 'ssh-rsa AAAA....' , 'chris' ]\n  data_bag 'ssh_public_keys'\nend\n```\n\n``` json\n{\n  \"id\": \"chris\",\n  \"keys\": [\n    \"ssh-ed25519 AAAA...\",\n    \"ssh-rsa AAAA...\"\n  ]\n}\n```\n","created_at":"2014-05-07T09:57:34Z","updated_at":"2016-11-07T09:11:14Z","closed_at":null,"merged_at":null,"merge_commit_sha":"885686a80de6ad1d7768c27e75c18e80fb5f84d7","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/fnichol/chef-user/pulls/65/commits","review_comments_url":"https://api.github.com/repos/fnichol/chef-user/pulls/65/comments","review_comment_url":"https://api.github.com/repos/fnichol/chef-user/pulls/comments{/number}","comments_url":"https://api.github.com/repos/fnichol/chef-user/issues/65/comments","statuses_url":"https://api.github.com/repos/fnichol/chef-user/statuses/cbc829688e7ddc5749d7e5cdf77e4de31f542af9","head":{"label":"chr4-cookbooks:data-bag-support","ref":"data-bag-support","sha":"cbc829688e7ddc5749d7e5cdf77e4de31f542af9","user":{"login":"chr4-cookbooks","id":5455993,"avatar_url":"https://avatars.githubusercontent.com/u/5455993?v=3","gravatar_id":"","url":"https://api.github.com/users/chr4-cookbooks","html_url":"https://github.com/chr4-cookbooks","followers_url":"https://api.github.com/users/chr4-cookbooks/followers","following_url":"https://api.github.com/users/chr4-cookbooks/following{/other_user}","gists_url":"https://api.github.com/users/chr4-cookbooks/gists{/gist_id}","starred_url":"https://api.github.com/users/chr4-cookbooks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chr4-cookbooks/subscriptions","organizations_url":"https://api.github.com/users/chr4-cookbooks/orgs","repos_url":"https://api.github.com/users/chr4-cookbooks/repos","events_url":"https://api.github.com/users/chr4-cookbooks/events{/privacy}","received_events_url":"https://api.github.com/users/chr4-cookbooks/received_events","type":"Organization","site_admin":false},"repo":{"id":19528843,"name":"user","full_name":"chr4-cookbooks/user","owner":{"login":"chr4-cookbooks","id":5455993,"avatar_url":"https://avatars.githubusercontent.com/u/5455993?v=3","gravatar_id":"","url":"https://api.github.com/users/chr4-cookbooks","html_url":"https://github.com/chr4-cookbooks","followers_url":"https://api.github.com/users/chr4-cookbooks/followers","following_url":"https://api.github.com/users/chr4-cookbooks/following{/other_user}","gists_url":"https://api.github.com/users/chr4-cookbooks/gists{/gist_id}","starred_url":"https://api.github.com/users/chr4-cookbooks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chr4-cookbooks/subscriptions","organizations_url":"https://api.github.com/users/chr4-cookbooks/orgs","repos_url":"https://api.github.com/users/chr4-cookbooks/repos","events_url":"https://api.github.com/users/chr4-cookbooks/events{/privacy}","received_events_url":"https://api.github.com/users/chr4-cookbooks/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/chr4-cookbooks/user","description":"A convenient Chef LWRP to manage user accounts and SSH keys","fork":true,"url":"https://api.github.com/repos/chr4-cookbooks/user","forks_url":"https://api.github.com/repos/chr4-cookbooks/user/forks","keys_url":"https://api.github.com/repos/chr4-cookbooks/user/keys{/key_id}","collaborators_url":"https://api.github.com/repos/chr4-cookbooks/user/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/chr4-cookbooks/user/teams","hooks_url":"https://api.github.com/repos/chr4-cookbooks/user/hooks","issue_events_url":"https://api.github.com/repos/chr4-cookbooks/user/issues/events{/number}","events_url":"https://api.github.com/repos/chr4-cookbooks/user/events","assignees_url":"https://api.github.com/repos/chr4-cookbooks/user/assignees{/user}","branches_url":"https://api.github.com/repos/chr4-cookbooks/user/branches{/branch}","tags_url":"https://api.github.com/repos/chr4-cookbooks/user/tags","blobs_url":"https://api.github.com/repos/chr4-cookbooks/user/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/chr4-cookbooks/user/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/chr4-cookbooks/user/git/refs{/sha}","trees_url":"https://api.github.com/repos/chr4-cookbooks/user/git/trees{/sha}","statuses_url":"https://api.github.com/repos/chr4-cookbooks/user/statuses/{sha}","languages_url":"https://api.github.com/repos/chr4-cookbooks/user/languages","stargazers_url":"https://api.github.com/repos/chr4-cookbooks/user/stargazers","contributors_url":"https://api.github.com/repos/chr4-cookbooks/user/contributors","subscribers_url":"https://api.github.com/repos/chr4-cookbooks/user/subscribers","subscription_url":"https://api.github.com/repos/chr4-cookbooks/user/subscription","commits_url":"https://api.github.com/repos/chr4-cookbooks/user/commits{/sha}","git_commits_url":"https://api.github.com/repos/chr4-cookbooks/user/git/commits{/sha}","comments_url":"https://api.github.com/repos/chr4-cookbooks/user/comments{/number}","issue_comment_url":"https://api.github.com/repos/chr4-cookbooks/user/issues/comments{/number}","contents_url":"https://api.github.com/repos/chr4-cookbooks/user/contents/{+path}","compare_url":"https://api.github.com/repos/chr4-cookbooks/user/compare/{base}...{head}","merges_url":"https://api.github.com/repos/chr4-cookbooks/user/merges","archive_url":"https://api.github.com/repos/chr4-cookbooks/user/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/chr4-cookbooks/user/downloads","issues_url":"https://api.github.com/repos/chr4-cookbooks/user/issues{/number}","pulls_url":"https://api.github.com/repos/chr4-cookbooks/user/pulls{/number}","milestones_url":"https://api.github.com/repos/chr4-cookbooks/user/milestones{/number}","notifications_url":"https://api.github.com/repos/chr4-cookbooks/user/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/chr4-cookbooks/user/labels{/name}","releases_url":"https://api.github.com/repos/chr4-cookbooks/user/releases{/id}","deployments_url":"https://api.github.com/repos/chr4-cookbooks/user/deployments","created_at":"2014-05-07T09:36:12Z","updated_at":"2016-08-25T18:57:28Z","pushed_at":"2016-08-25T18:57:27Z","git_url":"git://github.com/chr4-cookbooks/user.git","ssh_url":"git@github.com:chr4-cookbooks/user.git","clone_url":"https://github.com/chr4-cookbooks/user.git","svn_url":"https://github.com/chr4-cookbooks/user","homepage":"http://fnichol.github.io/chef-user","size":145,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"fnichol:master","ref":"master","sha":"fd2094cc8ae76d92ec1906ff1f3ca88b080d3792","user":{"login":"fnichol","id":261548,"avatar_url":"https://avatars.githubusercontent.com/u/261548?v=3","gravatar_id":"","url":"https://api.github.com/users/fnichol","html_url":"https://github.com/fnichol","followers_url":"https://api.github.com/users/fnichol/followers","following_url":"https://api.github.com/users/fnichol/following{/other_user}","gists_url":"https://api.github.com/users/fnichol/gists{/gist_id}","starred_url":"https://api.github.com/users/fnichol/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fnichol/subscriptions","organizations_url":"https://api.github.com/users/fnichol/orgs","repos_url":"https://api.github.com/users/fnichol/repos","events_url":"https://api.github.com/users/fnichol/events{/privacy}","received_events_url":"https://api.github.com/users/fnichol/received_events","type":"User","site_admin":false},"repo":{"id":2161757,"name":"chef-user","full_name":"fnichol/chef-user","owner":{"login":"fnichol","id":261548,"avatar_url":"https://avatars.githubusercontent.com/u/261548?v=3","gravatar_id":"","url":"https://api.github.com/users/fnichol","html_url":"https://github.com/fnichol","followers_url":"https://api.github.com/users/fnichol/followers","following_url":"https://api.github.com/users/fnichol/following{/other_user}","gists_url":"https://api.github.com/users/fnichol/gists{/gist_id}","starred_url":"https://api.github.com/users/fnichol/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fnichol/subscriptions","organizations_url":"https://api.github.com/users/fnichol/orgs","repos_url":"https://api.github.com/users/fnichol/repos","events_url":"https://api.github.com/users/fnichol/events{/privacy}","received_events_url":"https://api.github.com/users/fnichol/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/fnichol/chef-user","description":"A convenient Chef LWRP to manage user accounts and SSH keys","fork":false,"url":"https://api.github.com/repos/fnichol/chef-user","forks_url":"https://api.github.com/repos/fnichol/chef-user/forks","keys_url":"https://api.github.com/repos/fnichol/chef-user/keys{/key_id}","collaborators_url":"https://api.github.com/repos/fnichol/chef-user/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/fnichol/chef-user/teams","hooks_url":"https://api.github.com/repos/fnichol/chef-user/hooks","issue_events_url":"https://api.github.com/repos/fnichol/chef-user/issues/events{/number}","events_url":"https://api.github.com/repos/fnichol/chef-user/events","assignees_url":"https://api.github.com/repos/fnichol/chef-user/assignees{/user}","branches_url":"https://api.github.com/repos/fnichol/chef-user/branches{/branch}","tags_url":"https://api.github.com/repos/fnichol/chef-user/tags","blobs_url":"https://api.github.com/repos/fnichol/chef-user/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/fnichol/chef-user/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/fnichol/chef-user/git/refs{/sha}","trees_url":"https://api.github.com/repos/fnichol/chef-user/git/trees{/sha}","statuses_url":"https://api.github.com/repos/fnichol/chef-user/statuses/{sha}","languages_url":"https://api.github.com/repos/fnichol/chef-user/languages","stargazers_url":"https://api.github.com/repos/fnichol/chef-user/stargazers","contributors_url":"https://api.github.com/repos/fnichol/chef-user/contributors","subscribers_url":"https://api.github.com/repos/fnichol/chef-user/subscribers","subscription_url":"https://api.github.com/repos/fnichol/chef-user/subscription","commits_url":"https://api.github.com/repos/fnichol/chef-user/commits{/sha}","git_commits_url":"https://api.github.com/repos/fnichol/chef-user/git/commits{/sha}","comments_url":"https://api.github.com/repos/fnichol/chef-user/comments{/number}","issue_comment_url":"https://api.github.com/repos/fnichol/chef-user/issues/comments{/number}","contents_url":"https://api.github.com/repos/fnichol/chef-user/contents/{+path}","compare_url":"https://api.github.com/repos/fnichol/chef-user/compare/{base}...{head}","merges_url":"https://api.github.com/repos/fnichol/chef-user/merges","archive_url":"https://api.github.com/repos/fnichol/chef-user/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/fnichol/chef-user/downloads","issues_url":"https://api.github.com/repos/fnichol/chef-user/issues{/number}","pulls_url":"https://api.github.com/repos/fnichol/chef-user/pulls{/number}","milestones_url":"https://api.github.com/repos/fnichol/chef-user/milestones{/number}","notifications_url":"https://api.github.com/repos/fnichol/chef-user/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/fnichol/chef-user/labels{/name}","releases_url":"https://api.github.com/repos/fnichol/chef-user/releases{/id}","deployments_url":"https://api.github.com/repos/fnichol/chef-user/deployments","created_at":"2011-08-05T17:54:10Z","updated_at":"2016-11-04T22:44:17Z","pushed_at":"2016-11-05T09:51:11Z","git_url":"git://github.com/fnichol/chef-user.git","ssh_url":"git@github.com:fnichol/chef-user.git","clone_url":"https://github.com/fnichol/chef-user.git","svn_url":"https://github.com/fnichol/chef-user","homepage":"http://fnichol.github.io/chef-user","size":213,"stargazers_count":225,"watchers_count":225,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":140,"mirror_url":null,"open_issues_count":23,"forks":140,"open_issues":23,"watchers":225,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/fnichol/chef-user/pulls/65"},"html":{"href":"https://github.com/fnichol/chef-user/pull/65"},"issue":{"href":"https://api.github.com/repos/fnichol/chef-user/issues/65"},"comments":{"href":"https://api.github.com/repos/fnichol/chef-user/issues/65/comments"},"review_comments":{"href":"https://api.github.com/repos/fnichol/chef-user/pulls/65/comments"},"review_comment":{"href":"https://api.github.com/repos/fnichol/chef-user/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/fnichol/chef-user/pulls/65/commits"},"statuses":{"href":"https://api.github.com/repos/fnichol/chef-user/statuses/cbc829688e7ddc5749d7e5cdf77e4de31f542af9"}}}}
{"actor":{"display_login":"theckman"}}