{"action":"created","comment":{"url":"https://api.github.com/repos/bulletproofnetworks/pigeonhole/pulls/comments/30011773","id":30011773,"diff_hunk":"@@ -7,11 +7,13 @@ class Pagerduty\n   def initialize\n     @config = TOML.load_file('config.toml')['pagerduty']\n     raise \"Could not load credentials file at config.toml\" if @config.nil? || @config.empty?\n-    # Add trailing slash to API URL if it doesn't already exist\n-    @config['api_url'] += '/' unless @config['api_url'].end_with?('/')\n     @config['auth_token'] = \"Token token=#{@config['auth_token']}\" unless @config['auth_token'].start_with?('Token token=')\n   end\n \n+  def api_url\n+    \"https://#{@config['account_name']}.pagerduty.com\"","path":"lib/pagerduty.rb","position":10,"original_position":10,"commit_id":"70595ae04c52fbbfb7b114c87ac89de7d5be19f5","original_commit_id":"70595ae04c52fbbfb7b114c87ac89de7d5be19f5","user":{"login":"Hobbsee","id":3038925,"avatar_url":"https://avatars.githubusercontent.com/u/3038925?v=3","gravatar_id":"","url":"https://api.github.com/users/Hobbsee","html_url":"https://github.com/Hobbsee","followers_url":"https://api.github.com/users/Hobbsee/followers","following_url":"https://api.github.com/users/Hobbsee/following{/other_user}","gists_url":"https://api.github.com/users/Hobbsee/gists{/gist_id}","starred_url":"https://api.github.com/users/Hobbsee/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Hobbsee/subscriptions","organizations_url":"https://api.github.com/users/Hobbsee/orgs","repos_url":"https://api.github.com/users/Hobbsee/repos","events_url":"https://api.github.com/users/Hobbsee/events{/privacy}","received_events_url":"https://api.github.com/users/Hobbsee/received_events","type":"User","site_admin":false},"body":"This should include /api/v1 as well, shouldn't it?","created_at":"2015-05-11T03:35:57Z","updated_at":"2015-05-11T03:35:57Z","html_url":"https://github.com/bulletproofnetworks/pigeonhole/pull/18#discussion_r30011773","pull_request_url":"https://api.github.com/repos/bulletproofnetworks/pigeonhole/pulls/18","_links":{"self":{"href":"https://api.github.com/repos/bulletproofnetworks/pigeonhole/pulls/comments/30011773"},"html":{"href":"https://github.com/bulletproofnetworks/pigeonhole/pull/18#discussion_r30011773"},"pull_request":{"href":"https://api.github.com/repos/bulletproofnetworks/pigeonhole/pulls/18"}}},"pull_request":{"url":"https://api.github.com/repos/bulletproofnetworks/pigeonhole/pulls/18","id":34972761,"html_url":"https://github.com/bulletproofnetworks/pigeonhole/pull/18","diff_url":"https://github.com/bulletproofnetworks/pigeonhole/pull/18.diff","patch_url":"https://github.com/bulletproofnetworks/pigeonhole/pull/18.patch","issue_url":"https://api.github.com/repos/bulletproofnetworks/pigeonhole/issues/18","number":18,"state":"open","locked":false,"title":"Introduce a shared pagerduty config for account_name, used to generate api/interface urls","user":{"login":"glasnt","id":813732,"avatar_url":"https://avatars.githubusercontent.com/u/813732?v=3","gravatar_id":"","url":"https://api.github.com/users/glasnt","html_url":"https://github.com/glasnt","followers_url":"https://api.github.com/users/glasnt/followers","following_url":"https://api.github.com/users/glasnt/following{/other_user}","gists_url":"https://api.github.com/users/glasnt/gists{/gist_id}","starred_url":"https://api.github.com/users/glasnt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/glasnt/subscriptions","organizations_url":"https://api.github.com/users/glasnt/orgs","repos_url":"https://api.github.com/users/glasnt/repos","events_url":"https://api.github.com/users/glasnt/events{/privacy}","received_events_url":"https://api.github.com/users/glasnt/received_events","type":"User","site_admin":false},"body":"Removes hardcoding raised in issue #16\r\nHelper function in lib/pagerduty.rb allows for controllers and views to access the same value.\r\nReduced down to an account name for ease of configuration, and more control over the base url (which shouldn't ever have a non pagerduty.com domain name, if I'm not mistaken)","created_at":"2015-05-08T01:00:37Z","updated_at":"2015-05-11T03:35:57Z","closed_at":null,"merged_at":null,"merge_commit_sha":"33c8a9098acef7012707560d3553711a7309f43b","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/bulletproofnetworks/pigeonhole/pulls/18/commits","review_comments_url":"https://api.github.com/repos/bulletproofnetworks/pigeonhole/pulls/18/comments","review_comment_url":"https://api.github.com/repos/bulletproofnetworks/pigeonhole/pulls/comments{/number}","comments_url":"https://api.github.com/repos/bulletproofnetworks/pigeonhole/issues/18/comments","statuses_url":"https://api.github.com/repos/bulletproofnetworks/pigeonhole/statuses/70595ae04c52fbbfb7b114c87ac89de7d5be19f5","head":{"label":"bulletproofnetworks:remove_bp_refs","ref":"remove_bp_refs","sha":"70595ae04c52fbbfb7b114c87ac89de7d5be19f5","user":{"login":"bulletproofnetworks","id":413815,"avatar_url":"https://avatars.githubusercontent.com/u/413815?v=3","gravatar_id":"","url":"https://api.github.com/users/bulletproofnetworks","html_url":"https://github.com/bulletproofnetworks","followers_url":"https://api.github.com/users/bulletproofnetworks/followers","following_url":"https://api.github.com/users/bulletproofnetworks/following{/other_user}","gists_url":"https://api.github.com/users/bulletproofnetworks/gists{/gist_id}","starred_url":"https://api.github.com/users/bulletproofnetworks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bulletproofnetworks/subscriptions","organizations_url":"https://api.github.com/users/bulletproofnetworks/orgs","repos_url":"https://api.github.com/users/bulletproofnetworks/repos","events_url":"https://api.github.com/users/bulletproofnetworks/events{/privacy}","received_events_url":"https://api.github.com/users/bulletproofnetworks/received_events","type":"Organization","site_admin":false},"repo":{"id":32840001,"name":"pigeonhole","full_name":"bulletproofnetworks/pigeonhole","owner":{"login":"bulletproofnetworks","id":413815,"avatar_url":"https://avatars.githubusercontent.com/u/413815?v=3","gravatar_id":"","url":"https://api.github.com/users/bulletproofnetworks","html_url":"https://github.com/bulletproofnetworks","followers_url":"https://api.github.com/users/bulletproofnetworks/followers","following_url":"https://api.github.com/users/bulletproofnetworks/following{/other_user}","gists_url":"https://api.github.com/users/bulletproofnetworks/gists{/gist_id}","starred_url":"https://api.github.com/users/bulletproofnetworks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bulletproofnetworks/subscriptions","organizations_url":"https://api.github.com/users/bulletproofnetworks/orgs","repos_url":"https://api.github.com/users/bulletproofnetworks/repos","events_url":"https://api.github.com/users/bulletproofnetworks/events{/privacy}","received_events_url":"https://api.github.com/users/bulletproofnetworks/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/bulletproofnetworks/pigeonhole","description":"A PagerDuty visualisation and categoration tool","fork":false,"url":"https://api.github.com/repos/bulletproofnetworks/pigeonhole","forks_url":"https://api.github.com/repos/bulletproofnetworks/pigeonhole/forks","keys_url":"https://api.github.com/repos/bulletproofnetworks/pigeonhole/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bulletproofnetworks/pigeonhole/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bulletproofnetworks/pigeonhole/teams","hooks_url":"https://api.github.com/repos/bulletproofnetworks/pigeonhole/hooks","issue_events_url":"https://api.github.com/repos/bulletproofnetworks/pigeonhole/issues/events{/number}","events_url":"https://api.github.com/repos/bulletproofnetworks/pigeonhole/events","assignees_url":"https://api.github.com/repos/bulletproofnetworks/pigeonhole/assignees{/user}","branches_url":"https://api.github.com/repos/bulletproofnetworks/pigeonhole/branches{/branch}","tags_url":"https://api.github.com/repos/bulletproofnetworks/pigeonhole/tags","blobs_url":"https://api.github.com/repos/bulletproofnetworks/pigeonhole/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bulletproofnetworks/pigeonhole/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bulletproofnetworks/pigeonhole/git/refs{/sha}","trees_url":"https://api.github.com/repos/bulletproofnetworks/pigeonhole/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bulletproofnetworks/pigeonhole/statuses/{sha}","languages_url":"https://api.github.com/repos/bulletproofnetworks/pigeonhole/languages","stargazers_url":"https://api.github.com/repos/bulletproofnetworks/pigeonhole/stargazers","contributors_url":"https://api.github.com/repos/bulletproofnetworks/pigeonhole/contributors","subscribers_url":"https://api.github.com/repos/bulletproofnetworks/pigeonhole/subscribers","subscription_url":"https://api.github.com/repos/bulletproofnetworks/pigeonhole/subscription","commits_url":"https://api.github.com/repos/bulletproofnetworks/pigeonhole/commits{/sha}","git_commits_url":"https://api.github.com/repos/bulletproofnetworks/pigeonhole/git/commits{/sha}","comments_url":"https://api.github.com/repos/bulletproofnetworks/pigeonhole/comments{/number}","issue_comment_url":"https://api.github.com/repos/bulletproofnetworks/pigeonhole/issues/comments{/number}","contents_url":"https://api.github.com/repos/bulletproofnetworks/pigeonhole/contents/{+path}","compare_url":"https://api.github.com/repos/bulletproofnetworks/pigeonhole/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bulletproofnetworks/pigeonhole/merges","archive_url":"https://api.github.com/repos/bulletproofnetworks/pigeonhole/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bulletproofnetworks/pigeonhole/downloads","issues_url":"https://api.github.com/repos/bulletproofnetworks/pigeonhole/issues{/number}","pulls_url":"https://api.github.com/repos/bulletproofnetworks/pigeonhole/pulls{/number}","milestones_url":"https://api.github.com/repos/bulletproofnetworks/pigeonhole/milestones{/number}","notifications_url":"https://api.github.com/repos/bulletproofnetworks/pigeonhole/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bulletproofnetworks/pigeonhole/labels{/name}","releases_url":"https://api.github.com/repos/bulletproofnetworks/pigeonhole/releases{/id}","created_at":"2015-03-25T03:18:05Z","updated_at":"2015-05-08T08:18:42Z","pushed_at":"2015-05-11T03:34:27Z","git_url":"git://github.com/bulletproofnetworks/pigeonhole.git","ssh_url":"git@github.com:bulletproofnetworks/pigeonhole.git","clone_url":"https://github.com/bulletproofnetworks/pigeonhole.git","svn_url":"https://github.com/bulletproofnetworks/pigeonhole","homepage":null,"size":1892,"stargazers_count":10,"watchers_count":10,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":7,"forks":0,"open_issues":7,"watchers":10,"default_branch":"master"}},"base":{"label":"bulletproofnetworks:master","ref":"master","sha":"bd32ee3e61a4e53c6de0ef79b7318992852a5039","user":{"login":"bulletproofnetworks","id":413815,"avatar_url":"https://avatars.githubusercontent.com/u/413815?v=3","gravatar_id":"","url":"https://api.github.com/users/bulletproofnetworks","html_url":"https://github.com/bulletproofnetworks","followers_url":"https://api.github.com/users/bulletproofnetworks/followers","following_url":"https://api.github.com/users/bulletproofnetworks/following{/other_user}","gists_url":"https://api.github.com/users/bulletproofnetworks/gists{/gist_id}","starred_url":"https://api.github.com/users/bulletproofnetworks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bulletproofnetworks/subscriptions","organizations_url":"https://api.github.com/users/bulletproofnetworks/orgs","repos_url":"https://api.github.com/users/bulletproofnetworks/repos","events_url":"https://api.github.com/users/bulletproofnetworks/events{/privacy}","received_events_url":"https://api.github.com/users/bulletproofnetworks/received_events","type":"Organization","site_admin":false},"repo":{"id":32840001,"name":"pigeonhole","full_name":"bulletproofnetworks/pigeonhole","owner":{"login":"bulletproofnetworks","id":413815,"avatar_url":"https://avatars.githubusercontent.com/u/413815?v=3","gravatar_id":"","url":"https://api.github.com/users/bulletproofnetworks","html_url":"https://github.com/bulletproofnetworks","followers_url":"https://api.github.com/users/bulletproofnetworks/followers","following_url":"https://api.github.com/users/bulletproofnetworks/following{/other_user}","gists_url":"https://api.github.com/users/bulletproofnetworks/gists{/gist_id}","starred_url":"https://api.github.com/users/bulletproofnetworks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bulletproofnetworks/subscriptions","organizations_url":"https://api.github.com/users/bulletproofnetworks/orgs","repos_url":"https://api.github.com/users/bulletproofnetworks/repos","events_url":"https://api.github.com/users/bulletproofnetworks/events{/privacy}","received_events_url":"https://api.github.com/users/bulletproofnetworks/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/bulletproofnetworks/pigeonhole","description":"A PagerDuty visualisation and categoration tool","fork":false,"url":"https://api.github.com/repos/bulletproofnetworks/pigeonhole","forks_url":"https://api.github.com/repos/bulletproofnetworks/pigeonhole/forks","keys_url":"https://api.github.com/repos/bulletproofnetworks/pigeonhole/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bulletproofnetworks/pigeonhole/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bulletproofnetworks/pigeonhole/teams","hooks_url":"https://api.github.com/repos/bulletproofnetworks/pigeonhole/hooks","issue_events_url":"https://api.github.com/repos/bulletproofnetworks/pigeonhole/issues/events{/number}","events_url":"https://api.github.com/repos/bulletproofnetworks/pigeonhole/events","assignees_url":"https://api.github.com/repos/bulletproofnetworks/pigeonhole/assignees{/user}","branches_url":"https://api.github.com/repos/bulletproofnetworks/pigeonhole/branches{/branch}","tags_url":"https://api.github.com/repos/bulletproofnetworks/pigeonhole/tags","blobs_url":"https://api.github.com/repos/bulletproofnetworks/pigeonhole/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bulletproofnetworks/pigeonhole/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bulletproofnetworks/pigeonhole/git/refs{/sha}","trees_url":"https://api.github.com/repos/bulletproofnetworks/pigeonhole/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bulletproofnetworks/pigeonhole/statuses/{sha}","languages_url":"https://api.github.com/repos/bulletproofnetworks/pigeonhole/languages","stargazers_url":"https://api.github.com/repos/bulletproofnetworks/pigeonhole/stargazers","contributors_url":"https://api.github.com/repos/bulletproofnetworks/pigeonhole/contributors","subscribers_url":"https://api.github.com/repos/bulletproofnetworks/pigeonhole/subscribers","subscription_url":"https://api.github.com/repos/bulletproofnetworks/pigeonhole/subscription","commits_url":"https://api.github.com/repos/bulletproofnetworks/pigeonhole/commits{/sha}","git_commits_url":"https://api.github.com/repos/bulletproofnetworks/pigeonhole/git/commits{/sha}","comments_url":"https://api.github.com/repos/bulletproofnetworks/pigeonhole/comments{/number}","issue_comment_url":"https://api.github.com/repos/bulletproofnetworks/pigeonhole/issues/comments{/number}","contents_url":"https://api.github.com/repos/bulletproofnetworks/pigeonhole/contents/{+path}","compare_url":"https://api.github.com/repos/bulletproofnetworks/pigeonhole/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bulletproofnetworks/pigeonhole/merges","archive_url":"https://api.github.com/repos/bulletproofnetworks/pigeonhole/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bulletproofnetworks/pigeonhole/downloads","issues_url":"https://api.github.com/repos/bulletproofnetworks/pigeonhole/issues{/number}","pulls_url":"https://api.github.com/repos/bulletproofnetworks/pigeonhole/pulls{/number}","milestones_url":"https://api.github.com/repos/bulletproofnetworks/pigeonhole/milestones{/number}","notifications_url":"https://api.github.com/repos/bulletproofnetworks/pigeonhole/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bulletproofnetworks/pigeonhole/labels{/name}","releases_url":"https://api.github.com/repos/bulletproofnetworks/pigeonhole/releases{/id}","created_at":"2015-03-25T03:18:05Z","updated_at":"2015-05-08T08:18:42Z","pushed_at":"2015-05-11T03:34:27Z","git_url":"git://github.com/bulletproofnetworks/pigeonhole.git","ssh_url":"git@github.com:bulletproofnetworks/pigeonhole.git","clone_url":"https://github.com/bulletproofnetworks/pigeonhole.git","svn_url":"https://github.com/bulletproofnetworks/pigeonhole","homepage":null,"size":1892,"stargazers_count":10,"watchers_count":10,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":7,"forks":0,"open_issues":7,"watchers":10,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/bulletproofnetworks/pigeonhole/pulls/18"},"html":{"href":"https://github.com/bulletproofnetworks/pigeonhole/pull/18"},"issue":{"href":"https://api.github.com/repos/bulletproofnetworks/pigeonhole/issues/18"},"comments":{"href":"https://api.github.com/repos/bulletproofnetworks/pigeonhole/issues/18/comments"},"review_comments":{"href":"https://api.github.com/repos/bulletproofnetworks/pigeonhole/pulls/18/comments"},"review_comment":{"href":"https://api.github.com/repos/bulletproofnetworks/pigeonhole/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/bulletproofnetworks/pigeonhole/pulls/18/commits"},"statuses":{"href":"https://api.github.com/repos/bulletproofnetworks/pigeonhole/statuses/70595ae04c52fbbfb7b114c87ac89de7d5be19f5"}}}}