1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-06 10:37:20 +00:00

Refactor Branch struct in package modules/git (#33980)

The `Branch` struct in `modules/git` package is unnecessary. We can just
use a `string` to represent a branch
This commit is contained in:
Lunny Xiao
2025-04-02 10:31:32 -07:00
committed by GitHub
parent 285950a222
commit c27d87a9ac
16 changed files with 169 additions and 147 deletions

View File

@ -763,7 +763,7 @@ func CloseRepoBranchesPulls(ctx context.Context, doer *user_model.User, repo *re
var errs []error
for _, branch := range branches {
prs, err := issues_model.GetUnmergedPullRequestsByHeadInfo(ctx, repo.ID, branch.Name)
prs, err := issues_model.GetUnmergedPullRequestsByHeadInfo(ctx, repo.ID, branch)
if err != nil {
return err
}