mirror of https://github.com/go-gitea/gitea
Prevent merge of outdated PRs on protected branches (#11012)
* Block PR on Outdated Branch * finalize * cleanup * fix typo and sentences thanks @guillep2k Co-Authored-By: guillep2k <18600385+guillep2k@users.noreply.github.com> Co-authored-by: guillep2k <18600385+guillep2k@users.noreply.github.com> Co-authored-by: Lauris BH <lauris@nix.lv>pull/11109/head
parent
2cb5878529
commit
c52d48aae4
@ -0,0 +1,16 @@ |
||||
// Copyright 2020 The Gitea Authors. All rights reserved.
|
||||
// Use of this source code is governed by a MIT-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
package migrations |
||||
|
||||
import ( |
||||
"xorm.io/xorm" |
||||
) |
||||
|
||||
func addBlockOnOutdatedBranch(x *xorm.Engine) error { |
||||
type ProtectedBranch struct { |
||||
BlockOnOutdatedBranch bool `xorm:"NOT NULL DEFAULT false"` |
||||
} |
||||
return x.Sync2(new(ProtectedBranch)) |
||||
} |
Loading…
Reference in new issue