mirror of
https://github.com/go-gitea/gitea.git
synced 2026-05-27 15:25:25 +00:00
17 lines
420 B
Go
17 lines
420 B
Go
// Copyright 2026 The Gitea Authors. All rights reserved.
|
|
// SPDX-License-Identifier: MIT
|
|
|
|
package repo
|
|
|
|
import (
|
|
"context"
|
|
|
|
"gitea.dev/models/unit"
|
|
"gitea.dev/modules/util"
|
|
)
|
|
|
|
func (repo *Repository) GetPullRequestTargetBranch(ctx context.Context) string {
|
|
unitPRConfig := repo.MustGetUnit(ctx, unit.TypePullRequests).PullRequestsConfig()
|
|
return util.IfZero(unitPRConfig.DefaultTargetBranch, repo.DefaultBranch)
|
|
}
|