mirror of
https://github.com/gitbucket/gitbucket.git
synced 2025-11-16 02:15:50 +01:00
add some WebAPI/v3.
* [Users](https://developer.github.com/v3/users/) get-a-single-user * [Issues/Comments](https://developer.github.com/v3/issues/comments/) list-comments-on-an-issue, create-a-comment * [Pull Requests](https://developer.github.com/v3/pulls/) list-pull-requests, get-a-single-pull-request, list-commits-on-a-pull-request * [Repositories](https://developer.github.com/v3/repos/) get
This commit is contained in:
@@ -17,7 +17,7 @@ import org.eclipse.jgit.treewalk._
|
||||
import jp.sf.amateras.scalatra.forms._
|
||||
import org.eclipse.jgit.dircache.DirCache
|
||||
import org.eclipse.jgit.revwalk.RevCommit
|
||||
import service.WebHookService.WebHookPushPayload
|
||||
import service.WebHookService._
|
||||
|
||||
class RepositoryViewerController extends RepositoryViewerControllerBase
|
||||
with RepositoryService with AccountService with ActivityService with IssuesService with WebHookService with CommitsService
|
||||
@@ -105,6 +105,13 @@ trait RepositoryViewerControllerBase extends ControllerBase {
|
||||
fileList(_)
|
||||
})
|
||||
|
||||
/**
|
||||
* https://developer.github.com/v3/repos/#get
|
||||
*/
|
||||
get("/api/v3/repos/:owner/:repository")(referrersOnly { repository =>
|
||||
apiJson(WebHookRepository(repository, WebHookApiUser(getAccountByUserName(repository.owner).get)))
|
||||
})
|
||||
|
||||
/**
|
||||
* Displays the file list of the specified path and branch.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user