{"action":"created","comment":{"url":"https://api.github.com/repos/gogits/gogs/pulls/comments/84702837","pull_request_review_id":5463402,"id":84702837,"diff_hunk":"@@ -106,6 +106,8 @@ func extractTypeFromBase64Key(key string) (string, error) {\n func parseKeyString(content string) (string, error) {\n \t// Transform all legal line endings to a single \"\\n\".\n \tcontent = strings.NewReplacer(\"\\r\\n\", \"\\n\", \"\\r\", \"\\n\").Replace(content)\n+        // remove trailing newline (and beginning spaces too)","path":"models/ssh_key.go","position":4,"original_position":4,"commit_id":"087508bdc25779e0d596a395b04afed7f582c820","original_commit_id":"087508bdc25779e0d596a395b04afed7f582c820","user":{"login":"bkcsoft","id":4726179,"avatar_url":"https://avatars.githubusercontent.com/u/4726179?v=3","gravatar_id":"","url":"https://api.github.com/users/bkcsoft","html_url":"https://github.com/bkcsoft","followers_url":"https://api.github.com/users/bkcsoft/followers","following_url":"https://api.github.com/users/bkcsoft/following{/other_user}","gists_url":"https://api.github.com/users/bkcsoft/gists{/gist_id}","starred_url":"https://api.github.com/users/bkcsoft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bkcsoft/subscriptions","organizations_url":"https://api.github.com/users/bkcsoft/orgs","repos_url":"https://api.github.com/users/bkcsoft/repos","events_url":"https://api.github.com/users/bkcsoft/events{/privacy}","received_events_url":"https://api.github.com/users/bkcsoft/received_events","type":"User","site_admin":false},"body":"Indentations are off (also on the next line)","created_at":"2016-10-24T14:42:36Z","updated_at":"2016-10-24T14:42:36Z","html_url":"https://github.com/gogits/gogs/pull/3781#discussion_r84702837","pull_request_url":"https://api.github.com/repos/gogits/gogs/pulls/3781","_links":{"self":{"href":"https://api.github.com/repos/gogits/gogs/pulls/comments/84702837"},"html":{"href":"https://github.com/gogits/gogs/pull/3781#discussion_r84702837"},"pull_request":{"href":"https://api.github.com/repos/gogits/gogs/pulls/3781"}}},"pull_request":{"url":"https://api.github.com/repos/gogits/gogs/pulls/3781","id":89705438,"html_url":"https://github.com/gogits/gogs/pull/3781","diff_url":"https://github.com/gogits/gogs/pull/3781.diff","patch_url":"https://github.com/gogits/gogs/pull/3781.patch","issue_url":"https://api.github.com/repos/gogits/gogs/issues/3781","number":3781,"state":"open","locked":false,"title":"Handle user ssh key input better","user":{"login":"stroucki","id":1933610,"avatar_url":"https://avatars.githubusercontent.com/u/1933610?v=3","gravatar_id":"","url":"https://api.github.com/users/stroucki","html_url":"https://github.com/stroucki","followers_url":"https://api.github.com/users/stroucki/followers","following_url":"https://api.github.com/users/stroucki/following{/other_user}","gists_url":"https://api.github.com/users/stroucki/gists{/gist_id}","starred_url":"https://api.github.com/users/stroucki/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stroucki/subscriptions","organizations_url":"https://api.github.com/users/stroucki/orgs","repos_url":"https://api.github.com/users/stroucki/repos","events_url":"https://api.github.com/users/stroucki/events{/privacy}","received_events_url":"https://api.github.com/users/stroucki/received_events","type":"User","site_admin":false},"body":"Fixes #3780.\r\n\r\nssh_key: when user submitted keys had a newline at the end, strings.Split\r\nwould have created a slice with an empty last element, and the key type\r\ncheck would be incorrect. Perhaps a better way is to look for 'ssh-rsa' or\r\n'ssh-dsa' at the beginning of the string, but this is simple.","created_at":"2016-10-17T21:19:40Z","updated_at":"2016-10-24T14:43:22Z","closed_at":null,"merged_at":null,"merge_commit_sha":"1b7dcfb36486b8af814a154e5dc46ed17140ec10","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/gogits/gogs/pulls/3781/commits","review_comments_url":"https://api.github.com/repos/gogits/gogs/pulls/3781/comments","review_comment_url":"https://api.github.com/repos/gogits/gogs/pulls/comments{/number}","comments_url":"https://api.github.com/repos/gogits/gogs/issues/3781/comments","statuses_url":"https://api.github.com/repos/gogits/gogs/statuses/087508bdc25779e0d596a395b04afed7f582c820","head":{"label":"stroucki:20161017sshkeys","ref":"20161017sshkeys","sha":"087508bdc25779e0d596a395b04afed7f582c820","user":{"login":"stroucki","id":1933610,"avatar_url":"https://avatars.githubusercontent.com/u/1933610?v=3","gravatar_id":"","url":"https://api.github.com/users/stroucki","html_url":"https://github.com/stroucki","followers_url":"https://api.github.com/users/stroucki/followers","following_url":"https://api.github.com/users/stroucki/following{/other_user}","gists_url":"https://api.github.com/users/stroucki/gists{/gist_id}","starred_url":"https://api.github.com/users/stroucki/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stroucki/subscriptions","organizations_url":"https://api.github.com/users/stroucki/orgs","repos_url":"https://api.github.com/users/stroucki/repos","events_url":"https://api.github.com/users/stroucki/events{/privacy}","received_events_url":"https://api.github.com/users/stroucki/received_events","type":"User","site_admin":false},"repo":{"id":69834240,"name":"gogs","full_name":"stroucki/gogs","owner":{"login":"stroucki","id":1933610,"avatar_url":"https://avatars.githubusercontent.com/u/1933610?v=3","gravatar_id":"","url":"https://api.github.com/users/stroucki","html_url":"https://github.com/stroucki","followers_url":"https://api.github.com/users/stroucki/followers","following_url":"https://api.github.com/users/stroucki/following{/other_user}","gists_url":"https://api.github.com/users/stroucki/gists{/gist_id}","starred_url":"https://api.github.com/users/stroucki/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stroucki/subscriptions","organizations_url":"https://api.github.com/users/stroucki/orgs","repos_url":"https://api.github.com/users/stroucki/repos","events_url":"https://api.github.com/users/stroucki/events{/privacy}","received_events_url":"https://api.github.com/users/stroucki/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/stroucki/gogs","description":"Gogs (Go Git Service) is a painless self-hosted Git service.","fork":true,"url":"https://api.github.com/repos/stroucki/gogs","forks_url":"https://api.github.com/repos/stroucki/gogs/forks","keys_url":"https://api.github.com/repos/stroucki/gogs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/stroucki/gogs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/stroucki/gogs/teams","hooks_url":"https://api.github.com/repos/stroucki/gogs/hooks","issue_events_url":"https://api.github.com/repos/stroucki/gogs/issues/events{/number}","events_url":"https://api.github.com/repos/stroucki/gogs/events","assignees_url":"https://api.github.com/repos/stroucki/gogs/assignees{/user}","branches_url":"https://api.github.com/repos/stroucki/gogs/branches{/branch}","tags_url":"https://api.github.com/repos/stroucki/gogs/tags","blobs_url":"https://api.github.com/repos/stroucki/gogs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/stroucki/gogs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/stroucki/gogs/git/refs{/sha}","trees_url":"https://api.github.com/repos/stroucki/gogs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/stroucki/gogs/statuses/{sha}","languages_url":"https://api.github.com/repos/stroucki/gogs/languages","stargazers_url":"https://api.github.com/repos/stroucki/gogs/stargazers","contributors_url":"https://api.github.com/repos/stroucki/gogs/contributors","subscribers_url":"https://api.github.com/repos/stroucki/gogs/subscribers","subscription_url":"https://api.github.com/repos/stroucki/gogs/subscription","commits_url":"https://api.github.com/repos/stroucki/gogs/commits{/sha}","git_commits_url":"https://api.github.com/repos/stroucki/gogs/git/commits{/sha}","comments_url":"https://api.github.com/repos/stroucki/gogs/comments{/number}","issue_comment_url":"https://api.github.com/repos/stroucki/gogs/issues/comments{/number}","contents_url":"https://api.github.com/repos/stroucki/gogs/contents/{+path}","compare_url":"https://api.github.com/repos/stroucki/gogs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/stroucki/gogs/merges","archive_url":"https://api.github.com/repos/stroucki/gogs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/stroucki/gogs/downloads","issues_url":"https://api.github.com/repos/stroucki/gogs/issues{/number}","pulls_url":"https://api.github.com/repos/stroucki/gogs/pulls{/number}","milestones_url":"https://api.github.com/repos/stroucki/gogs/milestones{/number}","notifications_url":"https://api.github.com/repos/stroucki/gogs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/stroucki/gogs/labels{/name}","releases_url":"https://api.github.com/repos/stroucki/gogs/releases{/id}","deployments_url":"https://api.github.com/repos/stroucki/gogs/deployments","created_at":"2016-10-03T02:04:44Z","updated_at":"2016-10-03T02:04:47Z","pushed_at":"2016-10-17T21:06:03Z","git_url":"git://github.com/stroucki/gogs.git","ssh_url":"git@github.com:stroucki/gogs.git","clone_url":"https://github.com/stroucki/gogs.git","svn_url":"https://github.com/stroucki/gogs","homepage":"https://gogs.io","size":77813,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_downloads":true,"has_wiki":true,"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":"gogits:develop","ref":"develop","sha":"6bcff7828f117af8d51285ce3acba01a7e40a867","user":{"login":"gogits","id":6656686,"avatar_url":"https://avatars.githubusercontent.com/u/6656686?v=3","gravatar_id":"","url":"https://api.github.com/users/gogits","html_url":"https://github.com/gogits","followers_url":"https://api.github.com/users/gogits/followers","following_url":"https://api.github.com/users/gogits/following{/other_user}","gists_url":"https://api.github.com/users/gogits/gists{/gist_id}","starred_url":"https://api.github.com/users/gogits/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gogits/subscriptions","organizations_url":"https://api.github.com/users/gogits/orgs","repos_url":"https://api.github.com/users/gogits/repos","events_url":"https://api.github.com/users/gogits/events{/privacy}","received_events_url":"https://api.github.com/users/gogits/received_events","type":"Organization","site_admin":false},"repo":{"id":16752620,"name":"gogs","full_name":"gogits/gogs","owner":{"login":"gogits","id":6656686,"avatar_url":"https://avatars.githubusercontent.com/u/6656686?v=3","gravatar_id":"","url":"https://api.github.com/users/gogits","html_url":"https://github.com/gogits","followers_url":"https://api.github.com/users/gogits/followers","following_url":"https://api.github.com/users/gogits/following{/other_user}","gists_url":"https://api.github.com/users/gogits/gists{/gist_id}","starred_url":"https://api.github.com/users/gogits/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gogits/subscriptions","organizations_url":"https://api.github.com/users/gogits/orgs","repos_url":"https://api.github.com/users/gogits/repos","events_url":"https://api.github.com/users/gogits/events{/privacy}","received_events_url":"https://api.github.com/users/gogits/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/gogits/gogs","description":"Gogs (Go Git Service) is a painless self-hosted Git service.","fork":false,"url":"https://api.github.com/repos/gogits/gogs","forks_url":"https://api.github.com/repos/gogits/gogs/forks","keys_url":"https://api.github.com/repos/gogits/gogs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/gogits/gogs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/gogits/gogs/teams","hooks_url":"https://api.github.com/repos/gogits/gogs/hooks","issue_events_url":"https://api.github.com/repos/gogits/gogs/issues/events{/number}","events_url":"https://api.github.com/repos/gogits/gogs/events","assignees_url":"https://api.github.com/repos/gogits/gogs/assignees{/user}","branches_url":"https://api.github.com/repos/gogits/gogs/branches{/branch}","tags_url":"https://api.github.com/repos/gogits/gogs/tags","blobs_url":"https://api.github.com/repos/gogits/gogs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/gogits/gogs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/gogits/gogs/git/refs{/sha}","trees_url":"https://api.github.com/repos/gogits/gogs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/gogits/gogs/statuses/{sha}","languages_url":"https://api.github.com/repos/gogits/gogs/languages","stargazers_url":"https://api.github.com/repos/gogits/gogs/stargazers","contributors_url":"https://api.github.com/repos/gogits/gogs/contributors","subscribers_url":"https://api.github.com/repos/gogits/gogs/subscribers","subscription_url":"https://api.github.com/repos/gogits/gogs/subscription","commits_url":"https://api.github.com/repos/gogits/gogs/commits{/sha}","git_commits_url":"https://api.github.com/repos/gogits/gogs/git/commits{/sha}","comments_url":"https://api.github.com/repos/gogits/gogs/comments{/number}","issue_comment_url":"https://api.github.com/repos/gogits/gogs/issues/comments{/number}","contents_url":"https://api.github.com/repos/gogits/gogs/contents/{+path}","compare_url":"https://api.github.com/repos/gogits/gogs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/gogits/gogs/merges","archive_url":"https://api.github.com/repos/gogits/gogs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/gogits/gogs/downloads","issues_url":"https://api.github.com/repos/gogits/gogs/issues{/number}","pulls_url":"https://api.github.com/repos/gogits/gogs/pulls{/number}","milestones_url":"https://api.github.com/repos/gogits/gogs/milestones{/number}","notifications_url":"https://api.github.com/repos/gogits/gogs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/gogits/gogs/labels{/name}","releases_url":"https://api.github.com/repos/gogits/gogs/releases{/id}","deployments_url":"https://api.github.com/repos/gogits/gogs/deployments","created_at":"2014-02-12T01:57:08Z","updated_at":"2016-10-24T14:40:18Z","pushed_at":"2016-10-24T13:34:42Z","git_url":"git://github.com/gogits/gogs.git","ssh_url":"git@github.com:gogits/gogs.git","clone_url":"https://github.com/gogits/gogs.git","svn_url":"https://github.com/gogits/gogs","homepage":"https://gogs.io","size":91079,"stargazers_count":16077,"watchers_count":16077,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1764,"mirror_url":null,"open_issues_count":536,"forks":1764,"open_issues":536,"watchers":16077,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/gogits/gogs/pulls/3781"},"html":{"href":"https://github.com/gogits/gogs/pull/3781"},"issue":{"href":"https://api.github.com/repos/gogits/gogs/issues/3781"},"comments":{"href":"https://api.github.com/repos/gogits/gogs/issues/3781/comments"},"review_comments":{"href":"https://api.github.com/repos/gogits/gogs/pulls/3781/comments"},"review_comment":{"href":"https://api.github.com/repos/gogits/gogs/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/gogits/gogs/pulls/3781/commits"},"statuses":{"href":"https://api.github.com/repos/gogits/gogs/statuses/087508bdc25779e0d596a395b04afed7f582c820"}}}}
{"actor":{"display_login":"bkcsoft"}}