{"action":"created","comment":{"url":"https://api.github.com/repos/knuedge/lita-puppet/pulls/comments/85454277","pull_request_review_id":6170456,"id":85454277,"diff_hunk":"@@ -136,6 +145,31 @@ def node_profiles(response)\n         end\n       end\n \n+      def nodes_with_class(response)\n+        puppet_class = response.matches[3]","path":"lib/lita/handlers/puppet.rb","position":21,"original_position":21,"commit_id":"907143799781a8eedfa840224257f9c78b12962f","original_commit_id":"907143799781a8eedfa840224257f9c78b12962f","user":{"login":"jgnagy","id":664413,"avatar_url":"https://avatars.githubusercontent.com/u/664413?v=3","gravatar_id":"","url":"https://api.github.com/users/jgnagy","html_url":"https://github.com/jgnagy","followers_url":"https://api.github.com/users/jgnagy/followers","following_url":"https://api.github.com/users/jgnagy/following{/other_user}","gists_url":"https://api.github.com/users/jgnagy/gists{/gist_id}","starred_url":"https://api.github.com/users/jgnagy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jgnagy/subscriptions","organizations_url":"https://api.github.com/users/jgnagy/orgs","repos_url":"https://api.github.com/users/jgnagy/repos","events_url":"https://api.github.com/users/jgnagy/events{/privacy}","received_events_url":"https://api.github.com/users/jgnagy/received_events","type":"User","site_admin":false},"body":"This won't work. `response.matches` returns an Array of an Array (no idea why, but it comes from [`String#scan()`](https://ruby-doc.org/core-2.2.0/String.html#method-i-scan). Try testing your regex from the route definition above against a mock IM and you'll see what I mean. This should probably be `response.matches[0][3]`, since we want the item at index 3 from the Array returned by `response.matches[0]`.","created_at":"2016-10-28T00:24:39Z","updated_at":"2016-10-28T00:24:39Z","html_url":"https://github.com/knuedge/lita-puppet/pull/1#discussion_r85454277","pull_request_url":"https://api.github.com/repos/knuedge/lita-puppet/pulls/1","_links":{"self":{"href":"https://api.github.com/repos/knuedge/lita-puppet/pulls/comments/85454277"},"html":{"href":"https://github.com/knuedge/lita-puppet/pull/1#discussion_r85454277"},"pull_request":{"href":"https://api.github.com/repos/knuedge/lita-puppet/pulls/1"}}},"pull_request":{"url":"https://api.github.com/repos/knuedge/lita-puppet/pulls/1","id":91303391,"html_url":"https://github.com/knuedge/lita-puppet/pull/1","diff_url":"https://github.com/knuedge/lita-puppet/pull/1.diff","patch_url":"https://github.com/knuedge/lita-puppet/pull/1.patch","issue_url":"https://api.github.com/repos/knuedge/lita-puppet/issues/1","number":1,"state":"open","locked":false,"title":"add puppetdb query to find all nodes containing a class","user":{"login":"dschaaff","id":12867428,"avatar_url":"https://avatars.githubusercontent.com/u/12867428?v=3","gravatar_id":"","url":"https://api.github.com/users/dschaaff","html_url":"https://github.com/dschaaff","followers_url":"https://api.github.com/users/dschaaff/followers","following_url":"https://api.github.com/users/dschaaff/following{/other_user}","gists_url":"https://api.github.com/users/dschaaff/gists{/gist_id}","starred_url":"https://api.github.com/users/dschaaff/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dschaaff/subscriptions","organizations_url":"https://api.github.com/users/dschaaff/orgs","repos_url":"https://api.github.com/users/dschaaff/repos","events_url":"https://api.github.com/users/dschaaff/events{/privacy}","received_events_url":"https://api.github.com/users/dschaaff/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-10-28T00:14:44Z","updated_at":"2016-10-28T00:27:26Z","closed_at":null,"merged_at":null,"merge_commit_sha":"4130abc32e8051b5ebcc9c5214e94af0b7443d86","assignee":{"login":"jgnagy","id":664413,"avatar_url":"https://avatars.githubusercontent.com/u/664413?v=3","gravatar_id":"","url":"https://api.github.com/users/jgnagy","html_url":"https://github.com/jgnagy","followers_url":"https://api.github.com/users/jgnagy/followers","following_url":"https://api.github.com/users/jgnagy/following{/other_user}","gists_url":"https://api.github.com/users/jgnagy/gists{/gist_id}","starred_url":"https://api.github.com/users/jgnagy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jgnagy/subscriptions","organizations_url":"https://api.github.com/users/jgnagy/orgs","repos_url":"https://api.github.com/users/jgnagy/repos","events_url":"https://api.github.com/users/jgnagy/events{/privacy}","received_events_url":"https://api.github.com/users/jgnagy/received_events","type":"User","site_admin":false},"assignees":[{"login":"jgnagy","id":664413,"avatar_url":"https://avatars.githubusercontent.com/u/664413?v=3","gravatar_id":"","url":"https://api.github.com/users/jgnagy","html_url":"https://github.com/jgnagy","followers_url":"https://api.github.com/users/jgnagy/followers","following_url":"https://api.github.com/users/jgnagy/following{/other_user}","gists_url":"https://api.github.com/users/jgnagy/gists{/gist_id}","starred_url":"https://api.github.com/users/jgnagy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jgnagy/subscriptions","organizations_url":"https://api.github.com/users/jgnagy/orgs","repos_url":"https://api.github.com/users/jgnagy/repos","events_url":"https://api.github.com/users/jgnagy/events{/privacy}","received_events_url":"https://api.github.com/users/jgnagy/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/knuedge/lita-puppet/pulls/1/commits","review_comments_url":"https://api.github.com/repos/knuedge/lita-puppet/pulls/1/comments","review_comment_url":"https://api.github.com/repos/knuedge/lita-puppet/pulls/comments{/number}","comments_url":"https://api.github.com/repos/knuedge/lita-puppet/issues/1/comments","statuses_url":"https://api.github.com/repos/knuedge/lita-puppet/statuses/907143799781a8eedfa840224257f9c78b12962f","head":{"label":"knuedge:class_query","ref":"class_query","sha":"907143799781a8eedfa840224257f9c78b12962f","user":{"login":"knuedge","id":17839937,"avatar_url":"https://avatars.githubusercontent.com/u/17839937?v=3","gravatar_id":"","url":"https://api.github.com/users/knuedge","html_url":"https://github.com/knuedge","followers_url":"https://api.github.com/users/knuedge/followers","following_url":"https://api.github.com/users/knuedge/following{/other_user}","gists_url":"https://api.github.com/users/knuedge/gists{/gist_id}","starred_url":"https://api.github.com/users/knuedge/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/knuedge/subscriptions","organizations_url":"https://api.github.com/users/knuedge/orgs","repos_url":"https://api.github.com/users/knuedge/repos","events_url":"https://api.github.com/users/knuedge/events{/privacy}","received_events_url":"https://api.github.com/users/knuedge/received_events","type":"Organization","site_admin":false},"repo":{"id":71945143,"name":"lita-puppet","full_name":"knuedge/lita-puppet","owner":{"login":"knuedge","id":17839937,"avatar_url":"https://avatars.githubusercontent.com/u/17839937?v=3","gravatar_id":"","url":"https://api.github.com/users/knuedge","html_url":"https://github.com/knuedge","followers_url":"https://api.github.com/users/knuedge/followers","following_url":"https://api.github.com/users/knuedge/following{/other_user}","gists_url":"https://api.github.com/users/knuedge/gists{/gist_id}","starred_url":"https://api.github.com/users/knuedge/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/knuedge/subscriptions","organizations_url":"https://api.github.com/users/knuedge/orgs","repos_url":"https://api.github.com/users/knuedge/repos","events_url":"https://api.github.com/users/knuedge/events{/privacy}","received_events_url":"https://api.github.com/users/knuedge/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/knuedge/lita-puppet","description":"Lita Handler for Interacting with Puppet","fork":false,"url":"https://api.github.com/repos/knuedge/lita-puppet","forks_url":"https://api.github.com/repos/knuedge/lita-puppet/forks","keys_url":"https://api.github.com/repos/knuedge/lita-puppet/keys{/key_id}","collaborators_url":"https://api.github.com/repos/knuedge/lita-puppet/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/knuedge/lita-puppet/teams","hooks_url":"https://api.github.com/repos/knuedge/lita-puppet/hooks","issue_events_url":"https://api.github.com/repos/knuedge/lita-puppet/issues/events{/number}","events_url":"https://api.github.com/repos/knuedge/lita-puppet/events","assignees_url":"https://api.github.com/repos/knuedge/lita-puppet/assignees{/user}","branches_url":"https://api.github.com/repos/knuedge/lita-puppet/branches{/branch}","tags_url":"https://api.github.com/repos/knuedge/lita-puppet/tags","blobs_url":"https://api.github.com/repos/knuedge/lita-puppet/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/knuedge/lita-puppet/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/knuedge/lita-puppet/git/refs{/sha}","trees_url":"https://api.github.com/repos/knuedge/lita-puppet/git/trees{/sha}","statuses_url":"https://api.github.com/repos/knuedge/lita-puppet/statuses/{sha}","languages_url":"https://api.github.com/repos/knuedge/lita-puppet/languages","stargazers_url":"https://api.github.com/repos/knuedge/lita-puppet/stargazers","contributors_url":"https://api.github.com/repos/knuedge/lita-puppet/contributors","subscribers_url":"https://api.github.com/repos/knuedge/lita-puppet/subscribers","subscription_url":"https://api.github.com/repos/knuedge/lita-puppet/subscription","commits_url":"https://api.github.com/repos/knuedge/lita-puppet/commits{/sha}","git_commits_url":"https://api.github.com/repos/knuedge/lita-puppet/git/commits{/sha}","comments_url":"https://api.github.com/repos/knuedge/lita-puppet/comments{/number}","issue_comment_url":"https://api.github.com/repos/knuedge/lita-puppet/issues/comments{/number}","contents_url":"https://api.github.com/repos/knuedge/lita-puppet/contents/{+path}","compare_url":"https://api.github.com/repos/knuedge/lita-puppet/compare/{base}...{head}","merges_url":"https://api.github.com/repos/knuedge/lita-puppet/merges","archive_url":"https://api.github.com/repos/knuedge/lita-puppet/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/knuedge/lita-puppet/downloads","issues_url":"https://api.github.com/repos/knuedge/lita-puppet/issues{/number}","pulls_url":"https://api.github.com/repos/knuedge/lita-puppet/pulls{/number}","milestones_url":"https://api.github.com/repos/knuedge/lita-puppet/milestones{/number}","notifications_url":"https://api.github.com/repos/knuedge/lita-puppet/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/knuedge/lita-puppet/labels{/name}","releases_url":"https://api.github.com/repos/knuedge/lita-puppet/releases{/id}","deployments_url":"https://api.github.com/repos/knuedge/lita-puppet/deployments","created_at":"2016-10-25T22:43:29Z","updated_at":"2016-10-26T17:03:24Z","pushed_at":"2016-10-28T00:14:44Z","git_url":"git://github.com/knuedge/lita-puppet.git","ssh_url":"git@github.com:knuedge/lita-puppet.git","clone_url":"https://github.com/knuedge/lita-puppet.git","svn_url":"https://github.com/knuedge/lita-puppet","homepage":null,"size":50,"stargazers_count":2,"watchers_count":2,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":2,"default_branch":"master"}},"base":{"label":"knuedge:master","ref":"master","sha":"552f71b0144607ed26ba636d06eb064443ad64db","user":{"login":"knuedge","id":17839937,"avatar_url":"https://avatars.githubusercontent.com/u/17839937?v=3","gravatar_id":"","url":"https://api.github.com/users/knuedge","html_url":"https://github.com/knuedge","followers_url":"https://api.github.com/users/knuedge/followers","following_url":"https://api.github.com/users/knuedge/following{/other_user}","gists_url":"https://api.github.com/users/knuedge/gists{/gist_id}","starred_url":"https://api.github.com/users/knuedge/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/knuedge/subscriptions","organizations_url":"https://api.github.com/users/knuedge/orgs","repos_url":"https://api.github.com/users/knuedge/repos","events_url":"https://api.github.com/users/knuedge/events{/privacy}","received_events_url":"https://api.github.com/users/knuedge/received_events","type":"Organization","site_admin":false},"repo":{"id":71945143,"name":"lita-puppet","full_name":"knuedge/lita-puppet","owner":{"login":"knuedge","id":17839937,"avatar_url":"https://avatars.githubusercontent.com/u/17839937?v=3","gravatar_id":"","url":"https://api.github.com/users/knuedge","html_url":"https://github.com/knuedge","followers_url":"https://api.github.com/users/knuedge/followers","following_url":"https://api.github.com/users/knuedge/following{/other_user}","gists_url":"https://api.github.com/users/knuedge/gists{/gist_id}","starred_url":"https://api.github.com/users/knuedge/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/knuedge/subscriptions","organizations_url":"https://api.github.com/users/knuedge/orgs","repos_url":"https://api.github.com/users/knuedge/repos","events_url":"https://api.github.com/users/knuedge/events{/privacy}","received_events_url":"https://api.github.com/users/knuedge/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/knuedge/lita-puppet","description":"Lita Handler for Interacting with Puppet","fork":false,"url":"https://api.github.com/repos/knuedge/lita-puppet","forks_url":"https://api.github.com/repos/knuedge/lita-puppet/forks","keys_url":"https://api.github.com/repos/knuedge/lita-puppet/keys{/key_id}","collaborators_url":"https://api.github.com/repos/knuedge/lita-puppet/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/knuedge/lita-puppet/teams","hooks_url":"https://api.github.com/repos/knuedge/lita-puppet/hooks","issue_events_url":"https://api.github.com/repos/knuedge/lita-puppet/issues/events{/number}","events_url":"https://api.github.com/repos/knuedge/lita-puppet/events","assignees_url":"https://api.github.com/repos/knuedge/lita-puppet/assignees{/user}","branches_url":"https://api.github.com/repos/knuedge/lita-puppet/branches{/branch}","tags_url":"https://api.github.com/repos/knuedge/lita-puppet/tags","blobs_url":"https://api.github.com/repos/knuedge/lita-puppet/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/knuedge/lita-puppet/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/knuedge/lita-puppet/git/refs{/sha}","trees_url":"https://api.github.com/repos/knuedge/lita-puppet/git/trees{/sha}","statuses_url":"https://api.github.com/repos/knuedge/lita-puppet/statuses/{sha}","languages_url":"https://api.github.com/repos/knuedge/lita-puppet/languages","stargazers_url":"https://api.github.com/repos/knuedge/lita-puppet/stargazers","contributors_url":"https://api.github.com/repos/knuedge/lita-puppet/contributors","subscribers_url":"https://api.github.com/repos/knuedge/lita-puppet/subscribers","subscription_url":"https://api.github.com/repos/knuedge/lita-puppet/subscription","commits_url":"https://api.github.com/repos/knuedge/lita-puppet/commits{/sha}","git_commits_url":"https://api.github.com/repos/knuedge/lita-puppet/git/commits{/sha}","comments_url":"https://api.github.com/repos/knuedge/lita-puppet/comments{/number}","issue_comment_url":"https://api.github.com/repos/knuedge/lita-puppet/issues/comments{/number}","contents_url":"https://api.github.com/repos/knuedge/lita-puppet/contents/{+path}","compare_url":"https://api.github.com/repos/knuedge/lita-puppet/compare/{base}...{head}","merges_url":"https://api.github.com/repos/knuedge/lita-puppet/merges","archive_url":"https://api.github.com/repos/knuedge/lita-puppet/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/knuedge/lita-puppet/downloads","issues_url":"https://api.github.com/repos/knuedge/lita-puppet/issues{/number}","pulls_url":"https://api.github.com/repos/knuedge/lita-puppet/pulls{/number}","milestones_url":"https://api.github.com/repos/knuedge/lita-puppet/milestones{/number}","notifications_url":"https://api.github.com/repos/knuedge/lita-puppet/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/knuedge/lita-puppet/labels{/name}","releases_url":"https://api.github.com/repos/knuedge/lita-puppet/releases{/id}","deployments_url":"https://api.github.com/repos/knuedge/lita-puppet/deployments","created_at":"2016-10-25T22:43:29Z","updated_at":"2016-10-26T17:03:24Z","pushed_at":"2016-10-28T00:14:44Z","git_url":"git://github.com/knuedge/lita-puppet.git","ssh_url":"git@github.com:knuedge/lita-puppet.git","clone_url":"https://github.com/knuedge/lita-puppet.git","svn_url":"https://github.com/knuedge/lita-puppet","homepage":null,"size":50,"stargazers_count":2,"watchers_count":2,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/knuedge/lita-puppet/pulls/1"},"html":{"href":"https://github.com/knuedge/lita-puppet/pull/1"},"issue":{"href":"https://api.github.com/repos/knuedge/lita-puppet/issues/1"},"comments":{"href":"https://api.github.com/repos/knuedge/lita-puppet/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/knuedge/lita-puppet/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/knuedge/lita-puppet/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/knuedge/lita-puppet/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/knuedge/lita-puppet/statuses/907143799781a8eedfa840224257f9c78b12962f"}}}}
{"actor":{"display_login":"jgnagy"}}