Detect whether action view branch was deleted (#32764)

Fix #32761 

![图片](https://github.com/user-attachments/assets/a5a7eef8-0fea-4242-b199-1b0b73d9bbdb)
This commit is contained in:
Lunny Xiao 2024-12-12 11:28:23 -08:00 committed by GitHub
parent c9487a755b
commit 6370d2fb93
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 69 additions and 9 deletions

View file

@ -305,7 +305,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)
}