{"action":"created","comment":{"url":"https://api.github.com/repos/gogits/gogs/pulls/comments/76739687","id":76739687,"diff_hunk":"@@ -109,6 +118,63 @@ func ListMyRepos(ctx *context.APIContext) {\n \tctx.JSON(200, &repos)\n }\n \n+// https://github.com/gogits/go-gogs-client/wiki/Repositories#list-user-repositories\n+func ListUserRepos(ctx *context.APIContext) {\n+\tu, err := models.GetUserByName(ctx.Params(\":username\"))\n+\tif err != nil {\n+\t\tif models.IsErrUserNotExist(err) {\n+\t\t\tctx.Status(404)\n+\t\t} else {\n+\t\t\tctx.Error(500, \"ListUserRepos\", err)\n+\t\t}\n+\t\treturn\n+\t}\n+\n+\townRepos, err := listUserRepos(ctx, u, false)\n+\tif err != nil {\n+\t\tctx.Error(500, \"GetUserRepositories\", err)","path":"routers/api/v1/repo/repo.go","position":43,"original_position":43,"commit_id":"15be29f8eb7b5b81d9d30d036b6b5c88f2cf8115","original_commit_id":"15be29f8eb7b5b81d9d30d036b6b5c88f2cf8115","user":{"login":"Unknwon","id":2946214,"avatar_url":"https://avatars.githubusercontent.com/u/2946214?v=3","gravatar_id":"","url":"https://api.github.com/users/Unknwon","html_url":"https://github.com/Unknwon","followers_url":"https://api.github.com/users/Unknwon/followers","following_url":"https://api.github.com/users/Unknwon/following{/other_user}","gists_url":"https://api.github.com/users/Unknwon/gists{/gist_id}","starred_url":"https://api.github.com/users/Unknwon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Unknwon/subscriptions","organizations_url":"https://api.github.com/users/Unknwon/orgs","repos_url":"https://api.github.com/users/Unknwon/repos","events_url":"https://api.github.com/users/Unknwon/events{/privacy}","received_events_url":"https://api.github.com/users/Unknwon/received_events","type":"User","site_admin":false},"body":"All error desc string do not look right..","created_at":"2016-08-30T07:01:20Z","updated_at":"2016-08-30T07:01:20Z","html_url":"https://github.com/gogits/gogs/pull/3537#discussion_r76739687","pull_request_url":"https://api.github.com/repos/gogits/gogs/pulls/3537","_links":{"self":{"href":"https://api.github.com/repos/gogits/gogs/pulls/comments/76739687"},"html":{"href":"https://github.com/gogits/gogs/pull/3537#discussion_r76739687"},"pull_request":{"href":"https://api.github.com/repos/gogits/gogs/pulls/3537"}}},"pull_request":{"url":"https://api.github.com/repos/gogits/gogs/pulls/3537","id":83211674,"html_url":"https://github.com/gogits/gogs/pull/3537","diff_url":"https://github.com/gogits/gogs/pull/3537.diff","patch_url":"https://github.com/gogits/gogs/pull/3537.patch","issue_url":"https://api.github.com/repos/gogits/gogs/issues/3537","number":3537,"state":"open","locked":false,"title":"Adds support for gogs-client to retrieve repos by username and org","user":{"login":"kmadel","id":983526,"avatar_url":"https://avatars.githubusercontent.com/u/983526?v=3","gravatar_id":"","url":"https://api.github.com/users/kmadel","html_url":"https://github.com/kmadel","followers_url":"https://api.github.com/users/kmadel/followers","following_url":"https://api.github.com/users/kmadel/following{/other_user}","gists_url":"https://api.github.com/users/kmadel/gists{/gist_id}","starred_url":"https://api.github.com/users/kmadel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kmadel/subscriptions","organizations_url":"https://api.github.com/users/kmadel/orgs","repos_url":"https://api.github.com/users/kmadel/repos","events_url":"https://api.github.com/users/kmadel/events{/privacy}","received_events_url":"https://api.github.com/users/kmadel/received_events","type":"User","site_admin":false},"body":"This is related to gogs/gogs-client issue 37\r\n\r\nRequires gogs/gogs-client PR 45\r\n\r\nProvides the ability to retrieve repos by username or by org via the REST API (gogs-client).\r\n\r\nNote: \r\n- /users/:user/repos will only return public repos - same as https://developer.github.com/v3/repos/#list-user-repositories; api.Permission defaults to false, false, true\r\n- /orgs/:org/repos - returns private if ctx.user matches org owner, and public; api.Permission determined by ctx.user ownership\r\n- still may need some work around repo api.Permission\r\n\r\n","created_at":"2016-08-30T05:47:33Z","updated_at":"2016-08-30T07:01:20Z","closed_at":null,"merged_at":null,"merge_commit_sha":"8554a297cbf220a6c043bd5823b2367d80b79fd7","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/gogits/gogs/pulls/3537/commits","review_comments_url":"https://api.github.com/repos/gogits/gogs/pulls/3537/comments","review_comment_url":"https://api.github.com/repos/gogits/gogs/pulls/comments{/number}","comments_url":"https://api.github.com/repos/gogits/gogs/issues/3537/comments","statuses_url":"https://api.github.com/repos/gogits/gogs/statuses/15be29f8eb7b5b81d9d30d036b6b5c88f2cf8115","head":{"label":"kmadel:develop","ref":"develop","sha":"15be29f8eb7b5b81d9d30d036b6b5c88f2cf8115","user":{"login":"kmadel","id":983526,"avatar_url":"https://avatars.githubusercontent.com/u/983526?v=3","gravatar_id":"","url":"https://api.github.com/users/kmadel","html_url":"https://github.com/kmadel","followers_url":"https://api.github.com/users/kmadel/followers","following_url":"https://api.github.com/users/kmadel/following{/other_user}","gists_url":"https://api.github.com/users/kmadel/gists{/gist_id}","starred_url":"https://api.github.com/users/kmadel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kmadel/subscriptions","organizations_url":"https://api.github.com/users/kmadel/orgs","repos_url":"https://api.github.com/users/kmadel/repos","events_url":"https://api.github.com/users/kmadel/events{/privacy}","received_events_url":"https://api.github.com/users/kmadel/received_events","type":"User","site_admin":false},"repo":{"id":66366726,"name":"gogs","full_name":"kmadel/gogs","owner":{"login":"kmadel","id":983526,"avatar_url":"https://avatars.githubusercontent.com/u/983526?v=3","gravatar_id":"","url":"https://api.github.com/users/kmadel","html_url":"https://github.com/kmadel","followers_url":"https://api.github.com/users/kmadel/followers","following_url":"https://api.github.com/users/kmadel/following{/other_user}","gists_url":"https://api.github.com/users/kmadel/gists{/gist_id}","starred_url":"https://api.github.com/users/kmadel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kmadel/subscriptions","organizations_url":"https://api.github.com/users/kmadel/orgs","repos_url":"https://api.github.com/users/kmadel/repos","events_url":"https://api.github.com/users/kmadel/events{/privacy}","received_events_url":"https://api.github.com/users/kmadel/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/kmadel/gogs","description":"Gogs (Go Git Service) is a painless self-hosted Git service.","fork":true,"url":"https://api.github.com/repos/kmadel/gogs","forks_url":"https://api.github.com/repos/kmadel/gogs/forks","keys_url":"https://api.github.com/repos/kmadel/gogs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kmadel/gogs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kmadel/gogs/teams","hooks_url":"https://api.github.com/repos/kmadel/gogs/hooks","issue_events_url":"https://api.github.com/repos/kmadel/gogs/issues/events{/number}","events_url":"https://api.github.com/repos/kmadel/gogs/events","assignees_url":"https://api.github.com/repos/kmadel/gogs/assignees{/user}","branches_url":"https://api.github.com/repos/kmadel/gogs/branches{/branch}","tags_url":"https://api.github.com/repos/kmadel/gogs/tags","blobs_url":"https://api.github.com/repos/kmadel/gogs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kmadel/gogs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kmadel/gogs/git/refs{/sha}","trees_url":"https://api.github.com/repos/kmadel/gogs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kmadel/gogs/statuses/{sha}","languages_url":"https://api.github.com/repos/kmadel/gogs/languages","stargazers_url":"https://api.github.com/repos/kmadel/gogs/stargazers","contributors_url":"https://api.github.com/repos/kmadel/gogs/contributors","subscribers_url":"https://api.github.com/repos/kmadel/gogs/subscribers","subscription_url":"https://api.github.com/repos/kmadel/gogs/subscription","commits_url":"https://api.github.com/repos/kmadel/gogs/commits{/sha}","git_commits_url":"https://api.github.com/repos/kmadel/gogs/git/commits{/sha}","comments_url":"https://api.github.com/repos/kmadel/gogs/comments{/number}","issue_comment_url":"https://api.github.com/repos/kmadel/gogs/issues/comments{/number}","contents_url":"https://api.github.com/repos/kmadel/gogs/contents/{+path}","compare_url":"https://api.github.com/repos/kmadel/gogs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kmadel/gogs/merges","archive_url":"https://api.github.com/repos/kmadel/gogs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kmadel/gogs/downloads","issues_url":"https://api.github.com/repos/kmadel/gogs/issues{/number}","pulls_url":"https://api.github.com/repos/kmadel/gogs/pulls{/number}","milestones_url":"https://api.github.com/repos/kmadel/gogs/milestones{/number}","notifications_url":"https://api.github.com/repos/kmadel/gogs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kmadel/gogs/labels{/name}","releases_url":"https://api.github.com/repos/kmadel/gogs/releases{/id}","deployments_url":"https://api.github.com/repos/kmadel/gogs/deployments","created_at":"2016-08-23T12:55:31Z","updated_at":"2016-08-23T12:55:34Z","pushed_at":"2016-08-30T05:39:16Z","git_url":"git://github.com/kmadel/gogs.git","ssh_url":"git@github.com:kmadel/gogs.git","clone_url":"https://github.com/kmadel/gogs.git","svn_url":"https://github.com/kmadel/gogs","homepage":"https://gogs.io","size":74879,"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":"28cf0e6aaa3cf9cc8e29524bd8e400587fc72d22","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-08-30T06:38:56Z","pushed_at":"2016-08-30T06:57:32Z","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":87739,"stargazers_count":15351,"watchers_count":15351,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1639,"mirror_url":null,"open_issues_count":376,"forks":1639,"open_issues":376,"watchers":15351,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/gogits/gogs/pulls/3537"},"html":{"href":"https://github.com/gogits/gogs/pull/3537"},"issue":{"href":"https://api.github.com/repos/gogits/gogs/issues/3537"},"comments":{"href":"https://api.github.com/repos/gogits/gogs/issues/3537/comments"},"review_comments":{"href":"https://api.github.com/repos/gogits/gogs/pulls/3537/comments"},"review_comment":{"href":"https://api.github.com/repos/gogits/gogs/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/gogits/gogs/pulls/3537/commits"},"statuses":{"href":"https://api.github.com/repos/gogits/gogs/statuses/15be29f8eb7b5b81d9d30d036b6b5c88f2cf8115"}}}}
{"actor":{"display_login":"Unknwon"}}