mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2024-11-26 20:01:02 +00:00
Merge remote-tracking branch 'origin/exp' into exp
This commit is contained in:
commit
e4219a3aac
3 changed files with 8 additions and 7 deletions
|
@ -24,8 +24,8 @@ angular.module('app').controller("RepoController", function($scope, $http, $rout
|
|||
|
||||
|
||||
// load the repo commit feed
|
||||
repos.feed(repo.host, repo.owner, repo.name).success(function (feed) {
|
||||
$scope.commits = (typeof feed==='string')?[]:feed;
|
||||
repos.commits(repo.host, repo.owner, repo.name).success(function (commits) {
|
||||
$scope.commits = (typeof commits==='string')?[]:commits;
|
||||
$scope.state = 1;
|
||||
})
|
||||
.error(function (error) {
|
||||
|
|
|
@ -20,8 +20,8 @@ angular.module('app').service('repos', ['$q', '$http', function($q, $http) {
|
|||
};
|
||||
|
||||
// Gets a repository by host, owner and name.
|
||||
this.feed = function(host, owner, name) {
|
||||
return $http.get('/api/repos/'+host+'/'+owner+'/'+name+'/feed');
|
||||
this.commits = function(host, owner, name) {
|
||||
return $http.get('/api/repos/'+host+'/'+owner+'/'+name+'/commits');
|
||||
};
|
||||
|
||||
// Updates an existing repository
|
||||
|
|
|
@ -120,11 +120,12 @@ func main() {
|
|||
goji.Get("/api/stream/stdout/:id", handler.WsConsole)
|
||||
goji.Get("/api/stream/user", handler.WsUser)
|
||||
goji.Get("/api/auth/:host", handler.GetLogin)
|
||||
goji.Get("/api/auth/:host", handler.GetLogin)
|
||||
goji.Get("/api/badge/:host/:owner/:name/status.svg", handler.GetBadge)
|
||||
goji.Get("/api/badge/:host/:owner/:name/cc.xml", handler.GetCC)
|
||||
goji.Get("/api/hook/:hook", handler.PostHook)
|
||||
goji.Put("/api/hook/:hook", handler.PostHook)
|
||||
goji.Post("/api/hook/:hook", handler.PostHook)
|
||||
goji.Get("/api/hook/:host", handler.PostHook)
|
||||
goji.Put("/api/hook/:host", handler.PostHook)
|
||||
goji.Post("/api/hook/:host", handler.PostHook)
|
||||
|
||||
repos := web.New()
|
||||
repos.Use(middleware.SetRepo)
|
||||
|
|
Loading…
Reference in a new issue