{"action":"created","comment":{"url":"https://api.github.com/repos/learn-co/learn-open/pulls/comments/209742590","pull_request_review_id":145816205,"id":209742590,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIwOTc0MjU5MA==","diff_hunk":"@@ -0,0 +1,40 @@\n+module LearnOpen\n+  class GitSSHConnector\n+    attr_reader :ssh_connection, :environment\n+\n+    GIT_SSH_USER = 'git'\n+\n+    def self.call(git_server:, environment:)\n+      self.new(git_server: git_server, environment: environment).call\n+    end\n+\n+    def initialize(git_server:, environment:)\n+      @ssh_connection = LearnOpen.ssh_adapter.new(user: GIT_SSH_USER, hostname: git_server)\n+      @environment = environment\n+    end\n+\n+    def call\n+      if managed_environment? && ssh_unauthenticated?\n+        upload_ssh_keys!\n+      end\n+\n+      ssh_authenticated?\n+    end\n+\n+    def upload_ssh_keys!\n+      LearnOpen.learn_web_client.add_ssh_key(key: ssh_connection.public_key)","path":"lib/learn_open/services/git_ssh_connector.rb","position":25,"original_position":25,"commit_id":"8d4abe1bc17e68b8c302afbf8b12bc8290bb88bb","original_commit_id":"8d4abe1bc17e68b8c302afbf8b12bc8290bb88bb","user":{"login":"talum","id":11878752,"node_id":"MDQ6VXNlcjExODc4NzUy","avatar_url":"https://avatars2.githubusercontent.com/u/11878752?v=4","gravatar_id":"","url":"https://api.github.com/users/talum","html_url":"https://github.com/talum","followers_url":"https://api.github.com/users/talum/followers","following_url":"https://api.github.com/users/talum/following{/other_user}","gists_url":"https://api.github.com/users/talum/gists{/gist_id}","starred_url":"https://api.github.com/users/talum/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/talum/subscriptions","organizations_url":"https://api.github.com/users/talum/orgs","repos_url":"https://api.github.com/users/talum/repos","events_url":"https://api.github.com/users/talum/events{/privacy}","received_events_url":"https://api.github.com/users/talum/received_events","type":"User","site_admin":false},"body":"Just thinking ahead, are you also working on how to find the right `GithubAccount` for a user? I don't think I see any info about the server being passed through [learn-web](https://github.com/learn-co/learn-web/pull/6).","created_at":"2018-08-13T20:12:50Z","updated_at":"2018-08-13T20:12:50Z","html_url":"https://github.com/learn-co/learn-open/pull/24#discussion_r209742590","pull_request_url":"https://api.github.com/repos/learn-co/learn-open/pulls/24","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/learn-co/learn-open/pulls/comments/209742590"},"html":{"href":"https://github.com/learn-co/learn-open/pull/24#discussion_r209742590"},"pull_request":{"href":"https://api.github.com/repos/learn-co/learn-open/pulls/24"}},"in_reply_to_id":209728013},"pull_request":{"url":"https://api.github.com/repos/learn-co/learn-open/pulls/24","id":207315274,"node_id":"MDExOlB1bGxSZXF1ZXN0MjA3MzE1Mjc0","html_url":"https://github.com/learn-co/learn-open/pull/24","diff_url":"https://github.com/learn-co/learn-open/pull/24.diff","patch_url":"https://github.com/learn-co/learn-open/pull/24.patch","issue_url":"https://api.github.com/repos/learn-co/learn-open/issues/24","number":24,"state":"open","locked":false,"title":"Git SSH connector.","user":{"login":"spencer1248","id":159374,"node_id":"MDQ6VXNlcjE1OTM3NA==","avatar_url":"https://avatars0.githubusercontent.com/u/159374?v=4","gravatar_id":"","url":"https://api.github.com/users/spencer1248","html_url":"https://github.com/spencer1248","followers_url":"https://api.github.com/users/spencer1248/followers","following_url":"https://api.github.com/users/spencer1248/following{/other_user}","gists_url":"https://api.github.com/users/spencer1248/gists{/gist_id}","starred_url":"https://api.github.com/users/spencer1248/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spencer1248/subscriptions","organizations_url":"https://api.github.com/users/spencer1248/orgs","repos_url":"https://api.github.com/users/spencer1248/repos","events_url":"https://api.github.com/users/spencer1248/events{/privacy}","received_events_url":"https://api.github.com/users/spencer1248/received_events","type":"User","site_admin":false},"body":"Ensures the users public SSH key is available to the appropriate Git service.","created_at":"2018-08-09T13:24:32Z","updated_at":"2018-08-13T20:12:50Z","closed_at":null,"merged_at":null,"merge_commit_sha":"efaadf9f2071c51492d157952a5bd48408ab5749","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/learn-co/learn-open/pulls/24/commits","review_comments_url":"https://api.github.com/repos/learn-co/learn-open/pulls/24/comments","review_comment_url":"https://api.github.com/repos/learn-co/learn-open/pulls/comments{/number}","comments_url":"https://api.github.com/repos/learn-co/learn-open/issues/24/comments","statuses_url":"https://api.github.com/repos/learn-co/learn-open/statuses/8d4abe1bc17e68b8c302afbf8b12bc8290bb88bb","head":{"label":"spencer1248:ssh-check","ref":"ssh-check","sha":"8d4abe1bc17e68b8c302afbf8b12bc8290bb88bb","user":{"login":"spencer1248","id":159374,"node_id":"MDQ6VXNlcjE1OTM3NA==","avatar_url":"https://avatars0.githubusercontent.com/u/159374?v=4","gravatar_id":"","url":"https://api.github.com/users/spencer1248","html_url":"https://github.com/spencer1248","followers_url":"https://api.github.com/users/spencer1248/followers","following_url":"https://api.github.com/users/spencer1248/following{/other_user}","gists_url":"https://api.github.com/users/spencer1248/gists{/gist_id}","starred_url":"https://api.github.com/users/spencer1248/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spencer1248/subscriptions","organizations_url":"https://api.github.com/users/spencer1248/orgs","repos_url":"https://api.github.com/users/spencer1248/repos","events_url":"https://api.github.com/users/spencer1248/events{/privacy}","received_events_url":"https://api.github.com/users/spencer1248/received_events","type":"User","site_admin":false},"repo":{"id":143768096,"node_id":"MDEwOlJlcG9zaXRvcnkxNDM3NjgwOTY=","name":"learn-open","full_name":"spencer1248/learn-open","owner":{"login":"spencer1248","id":159374,"node_id":"MDQ6VXNlcjE1OTM3NA==","avatar_url":"https://avatars0.githubusercontent.com/u/159374?v=4","gravatar_id":"","url":"https://api.github.com/users/spencer1248","html_url":"https://github.com/spencer1248","followers_url":"https://api.github.com/users/spencer1248/followers","following_url":"https://api.github.com/users/spencer1248/following{/other_user}","gists_url":"https://api.github.com/users/spencer1248/gists{/gist_id}","starred_url":"https://api.github.com/users/spencer1248/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spencer1248/subscriptions","organizations_url":"https://api.github.com/users/spencer1248/orgs","repos_url":"https://api.github.com/users/spencer1248/repos","events_url":"https://api.github.com/users/spencer1248/events{/privacy}","received_events_url":"https://api.github.com/users/spencer1248/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/spencer1248/learn-open","description":null,"fork":true,"url":"https://api.github.com/repos/spencer1248/learn-open","forks_url":"https://api.github.com/repos/spencer1248/learn-open/forks","keys_url":"https://api.github.com/repos/spencer1248/learn-open/keys{/key_id}","collaborators_url":"https://api.github.com/repos/spencer1248/learn-open/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/spencer1248/learn-open/teams","hooks_url":"https://api.github.com/repos/spencer1248/learn-open/hooks","issue_events_url":"https://api.github.com/repos/spencer1248/learn-open/issues/events{/number}","events_url":"https://api.github.com/repos/spencer1248/learn-open/events","assignees_url":"https://api.github.com/repos/spencer1248/learn-open/assignees{/user}","branches_url":"https://api.github.com/repos/spencer1248/learn-open/branches{/branch}","tags_url":"https://api.github.com/repos/spencer1248/learn-open/tags","blobs_url":"https://api.github.com/repos/spencer1248/learn-open/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/spencer1248/learn-open/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/spencer1248/learn-open/git/refs{/sha}","trees_url":"https://api.github.com/repos/spencer1248/learn-open/git/trees{/sha}","statuses_url":"https://api.github.com/repos/spencer1248/learn-open/statuses/{sha}","languages_url":"https://api.github.com/repos/spencer1248/learn-open/languages","stargazers_url":"https://api.github.com/repos/spencer1248/learn-open/stargazers","contributors_url":"https://api.github.com/repos/spencer1248/learn-open/contributors","subscribers_url":"https://api.github.com/repos/spencer1248/learn-open/subscribers","subscription_url":"https://api.github.com/repos/spencer1248/learn-open/subscription","commits_url":"https://api.github.com/repos/spencer1248/learn-open/commits{/sha}","git_commits_url":"https://api.github.com/repos/spencer1248/learn-open/git/commits{/sha}","comments_url":"https://api.github.com/repos/spencer1248/learn-open/comments{/number}","issue_comment_url":"https://api.github.com/repos/spencer1248/learn-open/issues/comments{/number}","contents_url":"https://api.github.com/repos/spencer1248/learn-open/contents/{+path}","compare_url":"https://api.github.com/repos/spencer1248/learn-open/compare/{base}...{head}","merges_url":"https://api.github.com/repos/spencer1248/learn-open/merges","archive_url":"https://api.github.com/repos/spencer1248/learn-open/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/spencer1248/learn-open/downloads","issues_url":"https://api.github.com/repos/spencer1248/learn-open/issues{/number}","pulls_url":"https://api.github.com/repos/spencer1248/learn-open/pulls{/number}","milestones_url":"https://api.github.com/repos/spencer1248/learn-open/milestones{/number}","notifications_url":"https://api.github.com/repos/spencer1248/learn-open/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/spencer1248/learn-open/labels{/name}","releases_url":"https://api.github.com/repos/spencer1248/learn-open/releases{/id}","deployments_url":"https://api.github.com/repos/spencer1248/learn-open/deployments","created_at":"2018-08-06T18:35:32Z","updated_at":"2018-08-06T18:35:34Z","pushed_at":"2018-08-13T16:51:09Z","git_url":"git://github.com/spencer1248/learn-open.git","ssh_url":"git@github.com:spencer1248/learn-open.git","clone_url":"https://github.com/spencer1248/learn-open.git","svn_url":"https://github.com/spencer1248/learn-open","homepage":null,"size":208,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"learn-co:master","ref":"master","sha":"2f224318120eda88054a96ce13b175253043a284","user":{"login":"learn-co","id":10897717,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEwODk3NzE3","avatar_url":"https://avatars2.githubusercontent.com/u/10897717?v=4","gravatar_id":"","url":"https://api.github.com/users/learn-co","html_url":"https://github.com/learn-co","followers_url":"https://api.github.com/users/learn-co/followers","following_url":"https://api.github.com/users/learn-co/following{/other_user}","gists_url":"https://api.github.com/users/learn-co/gists{/gist_id}","starred_url":"https://api.github.com/users/learn-co/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/learn-co/subscriptions","organizations_url":"https://api.github.com/users/learn-co/orgs","repos_url":"https://api.github.com/users/learn-co/repos","events_url":"https://api.github.com/users/learn-co/events{/privacy}","received_events_url":"https://api.github.com/users/learn-co/received_events","type":"Organization","site_admin":false},"repo":{"id":36300493,"node_id":"MDEwOlJlcG9zaXRvcnkzNjMwMDQ5Mw==","name":"learn-open","full_name":"learn-co/learn-open","owner":{"login":"learn-co","id":10897717,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEwODk3NzE3","avatar_url":"https://avatars2.githubusercontent.com/u/10897717?v=4","gravatar_id":"","url":"https://api.github.com/users/learn-co","html_url":"https://github.com/learn-co","followers_url":"https://api.github.com/users/learn-co/followers","following_url":"https://api.github.com/users/learn-co/following{/other_user}","gists_url":"https://api.github.com/users/learn-co/gists{/gist_id}","starred_url":"https://api.github.com/users/learn-co/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/learn-co/subscriptions","organizations_url":"https://api.github.com/users/learn-co/orgs","repos_url":"https://api.github.com/users/learn-co/repos","events_url":"https://api.github.com/users/learn-co/events{/privacy}","received_events_url":"https://api.github.com/users/learn-co/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/learn-co/learn-open","description":null,"fork":false,"url":"https://api.github.com/repos/learn-co/learn-open","forks_url":"https://api.github.com/repos/learn-co/learn-open/forks","keys_url":"https://api.github.com/repos/learn-co/learn-open/keys{/key_id}","collaborators_url":"https://api.github.com/repos/learn-co/learn-open/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/learn-co/learn-open/teams","hooks_url":"https://api.github.com/repos/learn-co/learn-open/hooks","issue_events_url":"https://api.github.com/repos/learn-co/learn-open/issues/events{/number}","events_url":"https://api.github.com/repos/learn-co/learn-open/events","assignees_url":"https://api.github.com/repos/learn-co/learn-open/assignees{/user}","branches_url":"https://api.github.com/repos/learn-co/learn-open/branches{/branch}","tags_url":"https://api.github.com/repos/learn-co/learn-open/tags","blobs_url":"https://api.github.com/repos/learn-co/learn-open/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/learn-co/learn-open/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/learn-co/learn-open/git/refs{/sha}","trees_url":"https://api.github.com/repos/learn-co/learn-open/git/trees{/sha}","statuses_url":"https://api.github.com/repos/learn-co/learn-open/statuses/{sha}","languages_url":"https://api.github.com/repos/learn-co/learn-open/languages","stargazers_url":"https://api.github.com/repos/learn-co/learn-open/stargazers","contributors_url":"https://api.github.com/repos/learn-co/learn-open/contributors","subscribers_url":"https://api.github.com/repos/learn-co/learn-open/subscribers","subscription_url":"https://api.github.com/repos/learn-co/learn-open/subscription","commits_url":"https://api.github.com/repos/learn-co/learn-open/commits{/sha}","git_commits_url":"https://api.github.com/repos/learn-co/learn-open/git/commits{/sha}","comments_url":"https://api.github.com/repos/learn-co/learn-open/comments{/number}","issue_comment_url":"https://api.github.com/repos/learn-co/learn-open/issues/comments{/number}","contents_url":"https://api.github.com/repos/learn-co/learn-open/contents/{+path}","compare_url":"https://api.github.com/repos/learn-co/learn-open/compare/{base}...{head}","merges_url":"https://api.github.com/repos/learn-co/learn-open/merges","archive_url":"https://api.github.com/repos/learn-co/learn-open/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/learn-co/learn-open/downloads","issues_url":"https://api.github.com/repos/learn-co/learn-open/issues{/number}","pulls_url":"https://api.github.com/repos/learn-co/learn-open/pulls{/number}","milestones_url":"https://api.github.com/repos/learn-co/learn-open/milestones{/number}","notifications_url":"https://api.github.com/repos/learn-co/learn-open/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/learn-co/learn-open/labels{/name}","releases_url":"https://api.github.com/repos/learn-co/learn-open/releases{/id}","deployments_url":"https://api.github.com/repos/learn-co/learn-open/deployments","created_at":"2015-05-26T14:14:13Z","updated_at":"2018-07-02T16:07:15Z","pushed_at":"2018-08-13T16:51:10Z","git_url":"git://github.com/learn-co/learn-open.git","ssh_url":"git@github.com:learn-co/learn-open.git","clone_url":"https://github.com/learn-co/learn-open.git","svn_url":"https://github.com/learn-co/learn-open","homepage":null,"size":198,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":8,"mirror_url":null,"archived":false,"open_issues_count":2,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":8,"open_issues":2,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/learn-co/learn-open/pulls/24"},"html":{"href":"https://github.com/learn-co/learn-open/pull/24"},"issue":{"href":"https://api.github.com/repos/learn-co/learn-open/issues/24"},"comments":{"href":"https://api.github.com/repos/learn-co/learn-open/issues/24/comments"},"review_comments":{"href":"https://api.github.com/repos/learn-co/learn-open/pulls/24/comments"},"review_comment":{"href":"https://api.github.com/repos/learn-co/learn-open/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/learn-co/learn-open/pulls/24/commits"},"statuses":{"href":"https://api.github.com/repos/learn-co/learn-open/statuses/8d4abe1bc17e68b8c302afbf8b12bc8290bb88bb"}},"author_association":"NONE"}}
{"actor":{"display_login":"talum"}}