1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-23 18:58:38 +00:00

General code quality improvement

This commit is contained in:
Unknwon
2016-08-16 23:06:38 -07:00
parent 6f9a95f830
commit a00c932bbc
17 changed files with 180 additions and 171 deletions

View File

@@ -195,11 +195,11 @@ func HTTP(ctx *context.Context) {
if len(fields) >= 3 {
oldCommitId := fields[0][4:]
newCommitId := fields[1]
refName := fields[2]
refFullName := fields[2]
// FIXME: handle error.
if err = models.PushUpdate(models.PushUpdateOptions{
RefName: refName,
RefFullName: refFullName,
OldCommitID: oldCommitId,
NewCommitID: newCommitId,
PusherID: authUser.ID,
@@ -207,8 +207,7 @@ func HTTP(ctx *context.Context) {
RepoUserName: username,
RepoName: reponame,
}); err == nil {
go models.HookQueue.Add(repo.ID)
go models.AddTestPullRequestTask(authUser, repo.ID, strings.TrimPrefix(refName, git.BRANCH_PREFIX), true)
go models.AddTestPullRequestTask(authUser, repo.ID, strings.TrimPrefix(refFullName, git.BRANCH_PREFIX), true)
}
}