diff options
author | Zettat123 <zettat123@gmail.com> | 2023-07-26 13:26:31 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-07-26 05:26:31 +0000 |
commit | 338d03ce2f05fcc49a577b58a6cfa6beb7996fd1 (patch) | |
tree | 1230545f180c8dc02a690da3b8dd2603b04a9764 | |
parent | bd4c7ce578956d9839309b16753bd5505b63b2e3 (diff) | |
download | gitea-338d03ce2f05fcc49a577b58a6cfa6beb7996fd1.tar.gz gitea-338d03ce2f05fcc49a577b58a6cfa6beb7996fd1.zip |
Only show newly pushed branches message in the same repository (#26148)
Partly fixes #26130
This is a quick fix. #25812 will fully fix the bug.
-rw-r--r-- | models/git/branch.go | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/models/git/branch.go b/models/git/branch.go index d57b72719c..c68da1be78 100644 --- a/models/git/branch.go +++ b/models/git/branch.go @@ -394,6 +394,7 @@ func FindRecentlyPushedNewBranches(ctx context.Context, repoID, userID int64, ex err := db.GetEngine(ctx). Where("pusher_id=? AND is_deleted=?", userID, false). And("name <> ?", excludeBranchName). + And("repo_id = ?", repoID). And("updated_unix >= ?", time.Now().Add(-time.Hour*6).Unix()). NotIn("name", subQuery). OrderBy("branch.updated_unix DESC"). |