1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-22 18:28:37 +00:00

New push to head repo of head branch: regenerate patch and retest apply

This commit is contained in:
Unknwon
2015-10-24 03:36:47 -04:00
parent e0aab4a7f6
commit 0fbb8c8826
20 changed files with 475 additions and 154 deletions

View File

@@ -34,7 +34,7 @@ func authRequired(ctx *middleware.Context) {
ctx.HTML(401, base.TplName("status/401"))
}
func Http(ctx *middleware.Context) {
func HTTP(ctx *middleware.Context) {
username := ctx.Params(":username")
reponame := ctx.Params(":reponame")
if strings.HasSuffix(reponame, ".git") {
@@ -195,7 +195,8 @@ func Http(ctx *middleware.Context) {
// FIXME: handle error.
if err = models.Update(refName, oldCommitId, newCommitId, authUsername, username, reponame, authUser.Id); err == nil {
models.HookQueue.AddRepoID(repo.ID)
go models.HookQueue.Add(repo.ID)
go models.AddTestPullRequestTask(repo.ID, strings.TrimPrefix(refName, "refs/heads/"))
}
}