Merge pull request 'Do not update PRs based on events that happened before they existed' (#2932) from earl-warren/forgejo:wip-superfluous into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/2932 Reviewed-by: oliverpool <oliverpool@noreply.codeberg.org>
This commit is contained in:
commit
ad8a3ed2a1
18 changed files with 426 additions and 100 deletions
|
@ -7,6 +7,7 @@ import (
|
|||
"fmt"
|
||||
"net/http"
|
||||
"strconv"
|
||||
"time"
|
||||
|
||||
git_model "code.gitea.io/gitea/models/git"
|
||||
issues_model "code.gitea.io/gitea/models/issues"
|
||||
|
@ -71,6 +72,7 @@ func HookPostReceive(ctx *gitea_context.PrivateContext) {
|
|||
PusherName: opts.UserName,
|
||||
RepoUserName: ownerName,
|
||||
RepoName: repoName,
|
||||
TimeNano: time.Now().UnixNano(),
|
||||
}
|
||||
updates = append(updates, option)
|
||||
if repo.IsEmpty && (refFullName.BranchName() == "master" || refFullName.BranchName() == "main") {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue