From 2b5c69c451a684b20119e2521dc23734c7869241 Mon Sep 17 00:00:00 2001 From: Lunny Xiao Date: Thu, 12 Dec 2024 11:28:23 -0800 Subject: Detect whether action view branch was deleted (#32764) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fix #32761 ![图片](https://github.com/user-attachments/assets/a5a7eef8-0fea-4242-b199-1b0b73d9bbdb) (cherry picked from commit 6370d2fb93a5ee897b82969ca30a9feb33667714) Conflicts: routers/web/repo/actions/actions.go routers/web/repo/actions/view.go trivial context conflicts --- services/repository/branch.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'services') diff --git a/services/repository/branch.go b/services/repository/branch.go index 87fe03c12d..8e1a6cd27f 100644 --- a/services/repository/branch.go +++ b/services/repository/branch.go @@ -254,7 +254,7 @@ func SyncBranchesToDB(ctx context.Context, repoID, pusherID int64, branchNames, } return db.WithTx(ctx, func(ctx context.Context) error { - branches, err := git_model.GetBranches(ctx, repoID, branchNames) + branches, err := git_model.GetBranches(ctx, repoID, branchNames, true) if err != nil { return fmt.Errorf("git_model.GetBranches: %v", err) } -- cgit v1.2.3