diff options
Diffstat (limited to 'models/repo.go')
-rw-r--r-- | models/repo.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/models/repo.go b/models/repo.go index a06e9751..71bc2b44 100644 --- a/models/repo.go +++ b/models/repo.go @@ -441,6 +441,10 @@ func (repo *Repository) AllowsPulls() bool { return repo.CanEnablePulls() && repo.EnablePulls } +func (repo *Repository) IsBranchRequirePullRequest(name string) bool { + return IsBranchOfRepoRequirePullRequest(repo.ID, name) +} + // CanEnableEditor returns true if repository meets the requirements of web editor. func (repo *Repository) CanEnableEditor() bool { return !repo.IsMirror |