mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-08-03 00:45:22 +02:00
General code quality improvement
This commit is contained in:
parent
6f9a95f830
commit
a00c932bbc
17 changed files with 180 additions and 171 deletions
|
@ -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)
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue