mirror of
https://github.com/go-gitea/gitea
synced 2025-07-10 04:27:22 +00:00
Add protected branch whitelists for merging (#3689)
* Add database migrations for merge whitelist * Add merge whitelist settings for protected branches * Add checks for merge whitelists
This commit is contained in:
@ -286,7 +286,7 @@ func (pr *PullRequest) CheckUserAllowedToMerge(doer *User) (err error) {
|
||||
}
|
||||
}
|
||||
|
||||
if protected, err := pr.BaseRepo.IsProtectedBranch(pr.BaseBranch, doer); err != nil {
|
||||
if protected, err := pr.BaseRepo.IsProtectedBranchForMerging(pr.BaseBranch, doer); err != nil {
|
||||
return fmt.Errorf("IsProtectedBranch: %v", err)
|
||||
} else if protected {
|
||||
return ErrNotAllowedToMerge{
|
||||
|
Reference in New Issue
Block a user