{"action":"created","comment":{"url":"https://api.github.com/repos/sensu-plugins/sensu-plugins-pagerduty/pulls/comments/32021702","id":32021702,"diff_hunk":"@@ -20,19 +20,26 @@\n # Pagerduty\n #\n class Pagerduty < Sensu::Handler\n+  option :json_config,\n+         description: 'Config Name',\n+         short: '-j JsonConfig',\n+         long: '--json_config JsonConfig',\n+         required: false\n+\n   def incident_key # rubocop:disable all\n     source = @event['check']['source'] || @event['client']['name']\n     [source, @event['check']['name']].join('/')\n   end\n \n   def handle # rubocop:disable all\n+    json_config = config[:json_config] || 'pagerduty'","path":"bin/handler-pagerduty.rb","position":16,"original_position":16,"commit_id":"27a89e172b2e717302305ecc5bf7837c61a7662d","original_commit_id":"27a89e172b2e717302305ecc5bf7837c61a7662d","user":{"login":"warmfusion","id":2294568,"avatar_url":"https://avatars.githubusercontent.com/u/2294568?v=3","gravatar_id":"","url":"https://api.github.com/users/warmfusion","html_url":"https://github.com/warmfusion","followers_url":"https://api.github.com/users/warmfusion/followers","following_url":"https://api.github.com/users/warmfusion/following{/other_user}","gists_url":"https://api.github.com/users/warmfusion/gists{/gist_id}","starred_url":"https://api.github.com/users/warmfusion/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/warmfusion/subscriptions","organizations_url":"https://api.github.com/users/warmfusion/orgs","repos_url":"https://api.github.com/users/warmfusion/repos","events_url":"https://api.github.com/users/warmfusion/events{/privacy}","received_events_url":"https://api.github.com/users/warmfusion/received_events","type":"User","site_admin":false},"body":"I'd suggest removing this and using a default on the option itself - this'd then show in the `--help` output form the script and helps ensure the configuration is correct\r\n\r\n```\r\n  option :json_config,\r\n         description: 'Config Name',\r\n         short: '-j JsonConfig',\r\n         long: '--json_config JsonConfig',\r\n         required: false\r\n+         default: 'pagerduty'\r\n```\r\n","created_at":"2015-06-09T14:56:25Z","updated_at":"2015-06-09T14:56:25Z","html_url":"https://github.com/sensu-plugins/sensu-plugins-pagerduty/pull/3#discussion_r32021702","pull_request_url":"https://api.github.com/repos/sensu-plugins/sensu-plugins-pagerduty/pulls/3","_links":{"self":{"href":"https://api.github.com/repos/sensu-plugins/sensu-plugins-pagerduty/pulls/comments/32021702"},"html":{"href":"https://github.com/sensu-plugins/sensu-plugins-pagerduty/pull/3#discussion_r32021702"},"pull_request":{"href":"https://api.github.com/repos/sensu-plugins/sensu-plugins-pagerduty/pulls/3"}}},"pull_request":{"url":"https://api.github.com/repos/sensu-plugins/sensu-plugins-pagerduty/pulls/3","id":37178368,"html_url":"https://github.com/sensu-plugins/sensu-plugins-pagerduty/pull/3","diff_url":"https://github.com/sensu-plugins/sensu-plugins-pagerduty/pull/3.diff","patch_url":"https://github.com/sensu-plugins/sensu-plugins-pagerduty/pull/3.patch","issue_url":"https://api.github.com/repos/sensu-plugins/sensu-plugins-pagerduty/issues/3","number":3,"state":"open","locked":false,"title":"Add option :json_config","user":{"login":"shanegibbs","id":2838876,"avatar_url":"https://avatars.githubusercontent.com/u/2838876?v=3","gravatar_id":"","url":"https://api.github.com/users/shanegibbs","html_url":"https://github.com/shanegibbs","followers_url":"https://api.github.com/users/shanegibbs/followers","following_url":"https://api.github.com/users/shanegibbs/following{/other_user}","gists_url":"https://api.github.com/users/shanegibbs/gists{/gist_id}","starred_url":"https://api.github.com/users/shanegibbs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shanegibbs/subscriptions","organizations_url":"https://api.github.com/users/shanegibbs/orgs","repos_url":"https://api.github.com/users/shanegibbs/repos","events_url":"https://api.github.com/users/shanegibbs/events{/privacy}","received_events_url":"https://api.github.com/users/shanegibbs/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-06-08T17:48:16Z","updated_at":"2015-06-09T14:56:25Z","closed_at":null,"merged_at":null,"merge_commit_sha":"aed29544effe2cf9906b346afbbf8418b30cc003","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/sensu-plugins/sensu-plugins-pagerduty/pulls/3/commits","review_comments_url":"https://api.github.com/repos/sensu-plugins/sensu-plugins-pagerduty/pulls/3/comments","review_comment_url":"https://api.github.com/repos/sensu-plugins/sensu-plugins-pagerduty/pulls/comments{/number}","comments_url":"https://api.github.com/repos/sensu-plugins/sensu-plugins-pagerduty/issues/3/comments","statuses_url":"https://api.github.com/repos/sensu-plugins/sensu-plugins-pagerduty/statuses/27a89e172b2e717302305ecc5bf7837c61a7662d","head":{"label":"sittercity:config","ref":"config","sha":"27a89e172b2e717302305ecc5bf7837c61a7662d","user":{"login":"sittercity","id":311012,"avatar_url":"https://avatars.githubusercontent.com/u/311012?v=3","gravatar_id":"","url":"https://api.github.com/users/sittercity","html_url":"https://github.com/sittercity","followers_url":"https://api.github.com/users/sittercity/followers","following_url":"https://api.github.com/users/sittercity/following{/other_user}","gists_url":"https://api.github.com/users/sittercity/gists{/gist_id}","starred_url":"https://api.github.com/users/sittercity/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sittercity/subscriptions","organizations_url":"https://api.github.com/users/sittercity/orgs","repos_url":"https://api.github.com/users/sittercity/repos","events_url":"https://api.github.com/users/sittercity/events{/privacy}","received_events_url":"https://api.github.com/users/sittercity/received_events","type":"Organization","site_admin":false},"repo":{"id":36686697,"name":"sensu-plugins-pagerduty","full_name":"sittercity/sensu-plugins-pagerduty","owner":{"login":"sittercity","id":311012,"avatar_url":"https://avatars.githubusercontent.com/u/311012?v=3","gravatar_id":"","url":"https://api.github.com/users/sittercity","html_url":"https://github.com/sittercity","followers_url":"https://api.github.com/users/sittercity/followers","following_url":"https://api.github.com/users/sittercity/following{/other_user}","gists_url":"https://api.github.com/users/sittercity/gists{/gist_id}","starred_url":"https://api.github.com/users/sittercity/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sittercity/subscriptions","organizations_url":"https://api.github.com/users/sittercity/orgs","repos_url":"https://api.github.com/users/sittercity/repos","events_url":"https://api.github.com/users/sittercity/events{/privacy}","received_events_url":"https://api.github.com/users/sittercity/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/sittercity/sensu-plugins-pagerduty","description":"Sensu Pagerduty handlers","fork":true,"url":"https://api.github.com/repos/sittercity/sensu-plugins-pagerduty","forks_url":"https://api.github.com/repos/sittercity/sensu-plugins-pagerduty/forks","keys_url":"https://api.github.com/repos/sittercity/sensu-plugins-pagerduty/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sittercity/sensu-plugins-pagerduty/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sittercity/sensu-plugins-pagerduty/teams","hooks_url":"https://api.github.com/repos/sittercity/sensu-plugins-pagerduty/hooks","issue_events_url":"https://api.github.com/repos/sittercity/sensu-plugins-pagerduty/issues/events{/number}","events_url":"https://api.github.com/repos/sittercity/sensu-plugins-pagerduty/events","assignees_url":"https://api.github.com/repos/sittercity/sensu-plugins-pagerduty/assignees{/user}","branches_url":"https://api.github.com/repos/sittercity/sensu-plugins-pagerduty/branches{/branch}","tags_url":"https://api.github.com/repos/sittercity/sensu-plugins-pagerduty/tags","blobs_url":"https://api.github.com/repos/sittercity/sensu-plugins-pagerduty/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sittercity/sensu-plugins-pagerduty/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sittercity/sensu-plugins-pagerduty/git/refs{/sha}","trees_url":"https://api.github.com/repos/sittercity/sensu-plugins-pagerduty/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sittercity/sensu-plugins-pagerduty/statuses/{sha}","languages_url":"https://api.github.com/repos/sittercity/sensu-plugins-pagerduty/languages","stargazers_url":"https://api.github.com/repos/sittercity/sensu-plugins-pagerduty/stargazers","contributors_url":"https://api.github.com/repos/sittercity/sensu-plugins-pagerduty/contributors","subscribers_url":"https://api.github.com/repos/sittercity/sensu-plugins-pagerduty/subscribers","subscription_url":"https://api.github.com/repos/sittercity/sensu-plugins-pagerduty/subscription","commits_url":"https://api.github.com/repos/sittercity/sensu-plugins-pagerduty/commits{/sha}","git_commits_url":"https://api.github.com/repos/sittercity/sensu-plugins-pagerduty/git/commits{/sha}","comments_url":"https://api.github.com/repos/sittercity/sensu-plugins-pagerduty/comments{/number}","issue_comment_url":"https://api.github.com/repos/sittercity/sensu-plugins-pagerduty/issues/comments{/number}","contents_url":"https://api.github.com/repos/sittercity/sensu-plugins-pagerduty/contents/{+path}","compare_url":"https://api.github.com/repos/sittercity/sensu-plugins-pagerduty/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sittercity/sensu-plugins-pagerduty/merges","archive_url":"https://api.github.com/repos/sittercity/sensu-plugins-pagerduty/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sittercity/sensu-plugins-pagerduty/downloads","issues_url":"https://api.github.com/repos/sittercity/sensu-plugins-pagerduty/issues{/number}","pulls_url":"https://api.github.com/repos/sittercity/sensu-plugins-pagerduty/pulls{/number}","milestones_url":"https://api.github.com/repos/sittercity/sensu-plugins-pagerduty/milestones{/number}","notifications_url":"https://api.github.com/repos/sittercity/sensu-plugins-pagerduty/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sittercity/sensu-plugins-pagerduty/labels{/name}","releases_url":"https://api.github.com/repos/sittercity/sensu-plugins-pagerduty/releases{/id}","created_at":"2015-06-01T20:24:37Z","updated_at":"2015-06-01T20:24:37Z","pushed_at":"2015-06-08T17:54:55Z","git_url":"git://github.com/sittercity/sensu-plugins-pagerduty.git","ssh_url":"git@github.com:sittercity/sensu-plugins-pagerduty.git","clone_url":"https://github.com/sittercity/sensu-plugins-pagerduty.git","svn_url":"https://github.com/sittercity/sensu-plugins-pagerduty","homepage":"http://sensu-plugins.github.io","size":92,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_downloads":false,"has_wiki":false,"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":"sensu-plugins:master","ref":"master","sha":"86f81467cfe6c1fcd4ed997928a3720ecb13ac51","user":{"login":"sensu-plugins","id":10713628,"avatar_url":"https://avatars.githubusercontent.com/u/10713628?v=3","gravatar_id":"","url":"https://api.github.com/users/sensu-plugins","html_url":"https://github.com/sensu-plugins","followers_url":"https://api.github.com/users/sensu-plugins/followers","following_url":"https://api.github.com/users/sensu-plugins/following{/other_user}","gists_url":"https://api.github.com/users/sensu-plugins/gists{/gist_id}","starred_url":"https://api.github.com/users/sensu-plugins/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sensu-plugins/subscriptions","organizations_url":"https://api.github.com/users/sensu-plugins/orgs","repos_url":"https://api.github.com/users/sensu-plugins/repos","events_url":"https://api.github.com/users/sensu-plugins/events{/privacy}","received_events_url":"https://api.github.com/users/sensu-plugins/received_events","type":"Organization","site_admin":false},"repo":{"id":30546697,"name":"sensu-plugins-pagerduty","full_name":"sensu-plugins/sensu-plugins-pagerduty","owner":{"login":"sensu-plugins","id":10713628,"avatar_url":"https://avatars.githubusercontent.com/u/10713628?v=3","gravatar_id":"","url":"https://api.github.com/users/sensu-plugins","html_url":"https://github.com/sensu-plugins","followers_url":"https://api.github.com/users/sensu-plugins/followers","following_url":"https://api.github.com/users/sensu-plugins/following{/other_user}","gists_url":"https://api.github.com/users/sensu-plugins/gists{/gist_id}","starred_url":"https://api.github.com/users/sensu-plugins/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sensu-plugins/subscriptions","organizations_url":"https://api.github.com/users/sensu-plugins/orgs","repos_url":"https://api.github.com/users/sensu-plugins/repos","events_url":"https://api.github.com/users/sensu-plugins/events{/privacy}","received_events_url":"https://api.github.com/users/sensu-plugins/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/sensu-plugins/sensu-plugins-pagerduty","description":"Sensu Pagerduty handlers","fork":false,"url":"https://api.github.com/repos/sensu-plugins/sensu-plugins-pagerduty","forks_url":"https://api.github.com/repos/sensu-plugins/sensu-plugins-pagerduty/forks","keys_url":"https://api.github.com/repos/sensu-plugins/sensu-plugins-pagerduty/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sensu-plugins/sensu-plugins-pagerduty/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sensu-plugins/sensu-plugins-pagerduty/teams","hooks_url":"https://api.github.com/repos/sensu-plugins/sensu-plugins-pagerduty/hooks","issue_events_url":"https://api.github.com/repos/sensu-plugins/sensu-plugins-pagerduty/issues/events{/number}","events_url":"https://api.github.com/repos/sensu-plugins/sensu-plugins-pagerduty/events","assignees_url":"https://api.github.com/repos/sensu-plugins/sensu-plugins-pagerduty/assignees{/user}","branches_url":"https://api.github.com/repos/sensu-plugins/sensu-plugins-pagerduty/branches{/branch}","tags_url":"https://api.github.com/repos/sensu-plugins/sensu-plugins-pagerduty/tags","blobs_url":"https://api.github.com/repos/sensu-plugins/sensu-plugins-pagerduty/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sensu-plugins/sensu-plugins-pagerduty/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sensu-plugins/sensu-plugins-pagerduty/git/refs{/sha}","trees_url":"https://api.github.com/repos/sensu-plugins/sensu-plugins-pagerduty/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sensu-plugins/sensu-plugins-pagerduty/statuses/{sha}","languages_url":"https://api.github.com/repos/sensu-plugins/sensu-plugins-pagerduty/languages","stargazers_url":"https://api.github.com/repos/sensu-plugins/sensu-plugins-pagerduty/stargazers","contributors_url":"https://api.github.com/repos/sensu-plugins/sensu-plugins-pagerduty/contributors","subscribers_url":"https://api.github.com/repos/sensu-plugins/sensu-plugins-pagerduty/subscribers","subscription_url":"https://api.github.com/repos/sensu-plugins/sensu-plugins-pagerduty/subscription","commits_url":"https://api.github.com/repos/sensu-plugins/sensu-plugins-pagerduty/commits{/sha}","git_commits_url":"https://api.github.com/repos/sensu-plugins/sensu-plugins-pagerduty/git/commits{/sha}","comments_url":"https://api.github.com/repos/sensu-plugins/sensu-plugins-pagerduty/comments{/number}","issue_comment_url":"https://api.github.com/repos/sensu-plugins/sensu-plugins-pagerduty/issues/comments{/number}","contents_url":"https://api.github.com/repos/sensu-plugins/sensu-plugins-pagerduty/contents/{+path}","compare_url":"https://api.github.com/repos/sensu-plugins/sensu-plugins-pagerduty/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sensu-plugins/sensu-plugins-pagerduty/merges","archive_url":"https://api.github.com/repos/sensu-plugins/sensu-plugins-pagerduty/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sensu-plugins/sensu-plugins-pagerduty/downloads","issues_url":"https://api.github.com/repos/sensu-plugins/sensu-plugins-pagerduty/issues{/number}","pulls_url":"https://api.github.com/repos/sensu-plugins/sensu-plugins-pagerduty/pulls{/number}","milestones_url":"https://api.github.com/repos/sensu-plugins/sensu-plugins-pagerduty/milestones{/number}","notifications_url":"https://api.github.com/repos/sensu-plugins/sensu-plugins-pagerduty/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sensu-plugins/sensu-plugins-pagerduty/labels{/name}","releases_url":"https://api.github.com/repos/sensu-plugins/sensu-plugins-pagerduty/releases{/id}","created_at":"2015-02-09T16:55:11Z","updated_at":"2015-05-05T07:21:15Z","pushed_at":"2015-06-09T13:08:35Z","git_url":"git://github.com/sensu-plugins/sensu-plugins-pagerduty.git","ssh_url":"git@github.com:sensu-plugins/sensu-plugins-pagerduty.git","clone_url":"https://github.com/sensu-plugins/sensu-plugins-pagerduty.git","svn_url":"https://github.com/sensu-plugins/sensu-plugins-pagerduty","homepage":"http://sensu-plugins.github.io","size":217,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_downloads":false,"has_wiki":false,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":2,"forks":2,"open_issues":2,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/sensu-plugins/sensu-plugins-pagerduty/pulls/3"},"html":{"href":"https://github.com/sensu-plugins/sensu-plugins-pagerduty/pull/3"},"issue":{"href":"https://api.github.com/repos/sensu-plugins/sensu-plugins-pagerduty/issues/3"},"comments":{"href":"https://api.github.com/repos/sensu-plugins/sensu-plugins-pagerduty/issues/3/comments"},"review_comments":{"href":"https://api.github.com/repos/sensu-plugins/sensu-plugins-pagerduty/pulls/3/comments"},"review_comment":{"href":"https://api.github.com/repos/sensu-plugins/sensu-plugins-pagerduty/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/sensu-plugins/sensu-plugins-pagerduty/pulls/3/commits"},"statuses":{"href":"https://api.github.com/repos/sensu-plugins/sensu-plugins-pagerduty/statuses/27a89e172b2e717302305ecc5bf7837c61a7662d"}}}}