{"action":"created","comment":{"url":"https://api.github.com/repos/puppetlabs/bolt/pulls/comments/208309547","pull_request_review_id":144092644,"id":208309547,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIwODMwOTU0Nw==","diff_hunk":"@@ -0,0 +1,45 @@\n+# frozen_string_literal: true\n+\n+require 'hocon'\n+\n+class TransportConfig\n+  attr_accessor :port\n+\n+  def initialize(global = nil, local = nil)\n+    # TODO: is 8144 a reasonable default port? It doesn't seem to be in use per\n+    # https://confluence.puppetlabs.com/display/ENG/Choosing+a+port+for+services,\n+    # and is close to other orch/pcp service ports\n+    @port = 8144\n+\n+    global_path = global || '/etc/puppetlabs/bolt-server/conf.d/bolt-server.conf'\n+    local_path = local || File.join(ENV['HOME'].to_s, \".puppetlabs\", \"bolt-server.conf\")\n+\n+    load_config(global_path)\n+    load_config(local_path)\n+  end\n+\n+  def load_config(path = nil)\n+    begin\n+      conf_path = path || '/etc/puppetlabs/bolt-server/conf.d/bolt-server.conf'","path":"lib/bolt_ext/server-config.rb","position":23,"original_position":23,"commit_id":"5996f0b4f25523b836a9b7edd3de14a392f733e7","original_commit_id":"5996f0b4f25523b836a9b7edd3de14a392f733e7","user":{"login":"MikaelSmith","id":8162496,"node_id":"MDQ6VXNlcjgxNjI0OTY=","avatar_url":"https://avatars0.githubusercontent.com/u/8162496?v=4","gravatar_id":"","url":"https://api.github.com/users/MikaelSmith","html_url":"https://github.com/MikaelSmith","followers_url":"https://api.github.com/users/MikaelSmith/followers","following_url":"https://api.github.com/users/MikaelSmith/following{/other_user}","gists_url":"https://api.github.com/users/MikaelSmith/gists{/gist_id}","starred_url":"https://api.github.com/users/MikaelSmith/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MikaelSmith/subscriptions","organizations_url":"https://api.github.com/users/MikaelSmith/orgs","repos_url":"https://api.github.com/users/MikaelSmith/repos","events_url":"https://api.github.com/users/MikaelSmith/events{/privacy}","received_events_url":"https://api.github.com/users/MikaelSmith/received_events","type":"User","site_admin":false},"body":"How does this trigger reading the path/file? And it seems redundant to allow path to be nil when we only call this from initialize.","created_at":"2018-08-07T17:02:21Z","updated_at":"2018-08-07T17:02:21Z","html_url":"https://github.com/puppetlabs/bolt/pull/543#discussion_r208309547","pull_request_url":"https://api.github.com/repos/puppetlabs/bolt/pulls/543","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/puppetlabs/bolt/pulls/comments/208309547"},"html":{"href":"https://github.com/puppetlabs/bolt/pull/543#discussion_r208309547"},"pull_request":{"href":"https://api.github.com/repos/puppetlabs/bolt/pulls/543"}}},"pull_request":{"url":"https://api.github.com/repos/puppetlabs/bolt/pulls/543","id":205581342,"node_id":"MDExOlB1bGxSZXF1ZXN0MjA1NTgxMzQy","html_url":"https://github.com/puppetlabs/bolt/pull/543","diff_url":"https://github.com/puppetlabs/bolt/pull/543.diff","patch_url":"https://github.com/puppetlabs/bolt/pull/543.patch","issue_url":"https://api.github.com/repos/puppetlabs/bolt/issues/543","number":543,"state":"open","locked":false,"title":"(BOLT-653) Add configuration to the server","user":{"login":"lucywyman","id":5055819,"node_id":"MDQ6VXNlcjUwNTU4MTk=","avatar_url":"https://avatars1.githubusercontent.com/u/5055819?v=4","gravatar_id":"","url":"https://api.github.com/users/lucywyman","html_url":"https://github.com/lucywyman","followers_url":"https://api.github.com/users/lucywyman/followers","following_url":"https://api.github.com/users/lucywyman/following{/other_user}","gists_url":"https://api.github.com/users/lucywyman/gists{/gist_id}","starred_url":"https://api.github.com/users/lucywyman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lucywyman/subscriptions","organizations_url":"https://api.github.com/users/lucywyman/orgs","repos_url":"https://api.github.com/users/lucywyman/repos","events_url":"https://api.github.com/users/lucywyman/events{/privacy}","received_events_url":"https://api.github.com/users/lucywyman/received_events","type":"User","site_admin":false},"body":"This reads a config file from `/etc/puppetlabs/bolt-server/conf.d/bolt-server.conf`, reads the 'port' value if there is one and starts the sinatra server on that port\r\n","created_at":"2018-08-01T23:32:29Z","updated_at":"2018-08-07T17:02:21Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f084bc74d011587ca72c02c5c2ddfba743d01833","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/puppetlabs/bolt/pulls/543/commits","review_comments_url":"https://api.github.com/repos/puppetlabs/bolt/pulls/543/comments","review_comment_url":"https://api.github.com/repos/puppetlabs/bolt/pulls/comments{/number}","comments_url":"https://api.github.com/repos/puppetlabs/bolt/issues/543/comments","statuses_url":"https://api.github.com/repos/puppetlabs/bolt/statuses/5996f0b4f25523b836a9b7edd3de14a392f733e7","head":{"label":"lucywyman:BOLT-653","ref":"BOLT-653","sha":"5996f0b4f25523b836a9b7edd3de14a392f733e7","user":{"login":"lucywyman","id":5055819,"node_id":"MDQ6VXNlcjUwNTU4MTk=","avatar_url":"https://avatars1.githubusercontent.com/u/5055819?v=4","gravatar_id":"","url":"https://api.github.com/users/lucywyman","html_url":"https://github.com/lucywyman","followers_url":"https://api.github.com/users/lucywyman/followers","following_url":"https://api.github.com/users/lucywyman/following{/other_user}","gists_url":"https://api.github.com/users/lucywyman/gists{/gist_id}","starred_url":"https://api.github.com/users/lucywyman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lucywyman/subscriptions","organizations_url":"https://api.github.com/users/lucywyman/orgs","repos_url":"https://api.github.com/users/lucywyman/repos","events_url":"https://api.github.com/users/lucywyman/events{/privacy}","received_events_url":"https://api.github.com/users/lucywyman/received_events","type":"User","site_admin":false},"repo":{"id":113909108,"node_id":"MDEwOlJlcG9zaXRvcnkxMTM5MDkxMDg=","name":"bolt","full_name":"lucywyman/bolt","owner":{"login":"lucywyman","id":5055819,"node_id":"MDQ6VXNlcjUwNTU4MTk=","avatar_url":"https://avatars1.githubusercontent.com/u/5055819?v=4","gravatar_id":"","url":"https://api.github.com/users/lucywyman","html_url":"https://github.com/lucywyman","followers_url":"https://api.github.com/users/lucywyman/followers","following_url":"https://api.github.com/users/lucywyman/following{/other_user}","gists_url":"https://api.github.com/users/lucywyman/gists{/gist_id}","starred_url":"https://api.github.com/users/lucywyman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lucywyman/subscriptions","organizations_url":"https://api.github.com/users/lucywyman/orgs","repos_url":"https://api.github.com/users/lucywyman/repos","events_url":"https://api.github.com/users/lucywyman/events{/privacy}","received_events_url":"https://api.github.com/users/lucywyman/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/lucywyman/bolt","description":"Execute commands remotely over SSH and WinRM","fork":true,"url":"https://api.github.com/repos/lucywyman/bolt","forks_url":"https://api.github.com/repos/lucywyman/bolt/forks","keys_url":"https://api.github.com/repos/lucywyman/bolt/keys{/key_id}","collaborators_url":"https://api.github.com/repos/lucywyman/bolt/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/lucywyman/bolt/teams","hooks_url":"https://api.github.com/repos/lucywyman/bolt/hooks","issue_events_url":"https://api.github.com/repos/lucywyman/bolt/issues/events{/number}","events_url":"https://api.github.com/repos/lucywyman/bolt/events","assignees_url":"https://api.github.com/repos/lucywyman/bolt/assignees{/user}","branches_url":"https://api.github.com/repos/lucywyman/bolt/branches{/branch}","tags_url":"https://api.github.com/repos/lucywyman/bolt/tags","blobs_url":"https://api.github.com/repos/lucywyman/bolt/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/lucywyman/bolt/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/lucywyman/bolt/git/refs{/sha}","trees_url":"https://api.github.com/repos/lucywyman/bolt/git/trees{/sha}","statuses_url":"https://api.github.com/repos/lucywyman/bolt/statuses/{sha}","languages_url":"https://api.github.com/repos/lucywyman/bolt/languages","stargazers_url":"https://api.github.com/repos/lucywyman/bolt/stargazers","contributors_url":"https://api.github.com/repos/lucywyman/bolt/contributors","subscribers_url":"https://api.github.com/repos/lucywyman/bolt/subscribers","subscription_url":"https://api.github.com/repos/lucywyman/bolt/subscription","commits_url":"https://api.github.com/repos/lucywyman/bolt/commits{/sha}","git_commits_url":"https://api.github.com/repos/lucywyman/bolt/git/commits{/sha}","comments_url":"https://api.github.com/repos/lucywyman/bolt/comments{/number}","issue_comment_url":"https://api.github.com/repos/lucywyman/bolt/issues/comments{/number}","contents_url":"https://api.github.com/repos/lucywyman/bolt/contents/{+path}","compare_url":"https://api.github.com/repos/lucywyman/bolt/compare/{base}...{head}","merges_url":"https://api.github.com/repos/lucywyman/bolt/merges","archive_url":"https://api.github.com/repos/lucywyman/bolt/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/lucywyman/bolt/downloads","issues_url":"https://api.github.com/repos/lucywyman/bolt/issues{/number}","pulls_url":"https://api.github.com/repos/lucywyman/bolt/pulls{/number}","milestones_url":"https://api.github.com/repos/lucywyman/bolt/milestones{/number}","notifications_url":"https://api.github.com/repos/lucywyman/bolt/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/lucywyman/bolt/labels{/name}","releases_url":"https://api.github.com/repos/lucywyman/bolt/releases{/id}","deployments_url":"https://api.github.com/repos/lucywyman/bolt/deployments","created_at":"2017-12-11T21:13:12Z","updated_at":"2018-07-25T15:47:41Z","pushed_at":"2018-08-07T00:47:49Z","git_url":"git://github.com/lucywyman/bolt.git","ssh_url":"git@github.com:lucywyman/bolt.git","clone_url":"https://github.com/lucywyman/bolt.git","svn_url":"https://github.com/lucywyman/bolt","homepage":null,"size":2399,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"puppetlabs:transport-service","ref":"transport-service","sha":"2d53c4e421c48d8ec71cdee7276047f71b5c4656","user":{"login":"puppetlabs","id":234268,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIzNDI2OA==","avatar_url":"https://avatars0.githubusercontent.com/u/234268?v=4","gravatar_id":"","url":"https://api.github.com/users/puppetlabs","html_url":"https://github.com/puppetlabs","followers_url":"https://api.github.com/users/puppetlabs/followers","following_url":"https://api.github.com/users/puppetlabs/following{/other_user}","gists_url":"https://api.github.com/users/puppetlabs/gists{/gist_id}","starred_url":"https://api.github.com/users/puppetlabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/puppetlabs/subscriptions","organizations_url":"https://api.github.com/users/puppetlabs/orgs","repos_url":"https://api.github.com/users/puppetlabs/repos","events_url":"https://api.github.com/users/puppetlabs/events{/privacy}","received_events_url":"https://api.github.com/users/puppetlabs/received_events","type":"Organization","site_admin":false},"repo":{"id":99991450,"node_id":"MDEwOlJlcG9zaXRvcnk5OTk5MTQ1MA==","name":"bolt","full_name":"puppetlabs/bolt","owner":{"login":"puppetlabs","id":234268,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIzNDI2OA==","avatar_url":"https://avatars0.githubusercontent.com/u/234268?v=4","gravatar_id":"","url":"https://api.github.com/users/puppetlabs","html_url":"https://github.com/puppetlabs","followers_url":"https://api.github.com/users/puppetlabs/followers","following_url":"https://api.github.com/users/puppetlabs/following{/other_user}","gists_url":"https://api.github.com/users/puppetlabs/gists{/gist_id}","starred_url":"https://api.github.com/users/puppetlabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/puppetlabs/subscriptions","organizations_url":"https://api.github.com/users/puppetlabs/orgs","repos_url":"https://api.github.com/users/puppetlabs/repos","events_url":"https://api.github.com/users/puppetlabs/events{/privacy}","received_events_url":"https://api.github.com/users/puppetlabs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/puppetlabs/bolt","description":"Execute commands remotely over SSH and WinRM","fork":false,"url":"https://api.github.com/repos/puppetlabs/bolt","forks_url":"https://api.github.com/repos/puppetlabs/bolt/forks","keys_url":"https://api.github.com/repos/puppetlabs/bolt/keys{/key_id}","collaborators_url":"https://api.github.com/repos/puppetlabs/bolt/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/puppetlabs/bolt/teams","hooks_url":"https://api.github.com/repos/puppetlabs/bolt/hooks","issue_events_url":"https://api.github.com/repos/puppetlabs/bolt/issues/events{/number}","events_url":"https://api.github.com/repos/puppetlabs/bolt/events","assignees_url":"https://api.github.com/repos/puppetlabs/bolt/assignees{/user}","branches_url":"https://api.github.com/repos/puppetlabs/bolt/branches{/branch}","tags_url":"https://api.github.com/repos/puppetlabs/bolt/tags","blobs_url":"https://api.github.com/repos/puppetlabs/bolt/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/puppetlabs/bolt/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/puppetlabs/bolt/git/refs{/sha}","trees_url":"https://api.github.com/repos/puppetlabs/bolt/git/trees{/sha}","statuses_url":"https://api.github.com/repos/puppetlabs/bolt/statuses/{sha}","languages_url":"https://api.github.com/repos/puppetlabs/bolt/languages","stargazers_url":"https://api.github.com/repos/puppetlabs/bolt/stargazers","contributors_url":"https://api.github.com/repos/puppetlabs/bolt/contributors","subscribers_url":"https://api.github.com/repos/puppetlabs/bolt/subscribers","subscription_url":"https://api.github.com/repos/puppetlabs/bolt/subscription","commits_url":"https://api.github.com/repos/puppetlabs/bolt/commits{/sha}","git_commits_url":"https://api.github.com/repos/puppetlabs/bolt/git/commits{/sha}","comments_url":"https://api.github.com/repos/puppetlabs/bolt/comments{/number}","issue_comment_url":"https://api.github.com/repos/puppetlabs/bolt/issues/comments{/number}","contents_url":"https://api.github.com/repos/puppetlabs/bolt/contents/{+path}","compare_url":"https://api.github.com/repos/puppetlabs/bolt/compare/{base}...{head}","merges_url":"https://api.github.com/repos/puppetlabs/bolt/merges","archive_url":"https://api.github.com/repos/puppetlabs/bolt/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/puppetlabs/bolt/downloads","issues_url":"https://api.github.com/repos/puppetlabs/bolt/issues{/number}","pulls_url":"https://api.github.com/repos/puppetlabs/bolt/pulls{/number}","milestones_url":"https://api.github.com/repos/puppetlabs/bolt/milestones{/number}","notifications_url":"https://api.github.com/repos/puppetlabs/bolt/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/puppetlabs/bolt/labels{/name}","releases_url":"https://api.github.com/repos/puppetlabs/bolt/releases{/id}","deployments_url":"https://api.github.com/repos/puppetlabs/bolt/deployments","created_at":"2017-08-11T04:26:56Z","updated_at":"2018-08-06T20:24:20Z","pushed_at":"2018-08-07T00:47:50Z","git_url":"git://github.com/puppetlabs/bolt.git","ssh_url":"git@github.com:puppetlabs/bolt.git","clone_url":"https://github.com/puppetlabs/bolt.git","svn_url":"https://github.com/puppetlabs/bolt","homepage":null,"size":2393,"stargazers_count":147,"watchers_count":147,"language":"Ruby","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":56,"mirror_url":null,"archived":false,"open_issues_count":18,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":56,"open_issues":18,"watchers":147,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/puppetlabs/bolt/pulls/543"},"html":{"href":"https://github.com/puppetlabs/bolt/pull/543"},"issue":{"href":"https://api.github.com/repos/puppetlabs/bolt/issues/543"},"comments":{"href":"https://api.github.com/repos/puppetlabs/bolt/issues/543/comments"},"review_comments":{"href":"https://api.github.com/repos/puppetlabs/bolt/pulls/543/comments"},"review_comment":{"href":"https://api.github.com/repos/puppetlabs/bolt/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/puppetlabs/bolt/pulls/543/commits"},"statuses":{"href":"https://api.github.com/repos/puppetlabs/bolt/statuses/5996f0b4f25523b836a9b7edd3de14a392f733e7"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"MikaelSmith"}}