Browse Source
Fixes #16381 Note that changes to unprotected files via the web editor still cannot be pushed directly to the protected branch. I could easily add such support for edits and deletes if needed. But for adding, uploading or renaming unprotected files, it is not trivial. * Extract & Move GetAffectedFiles to modules/gittags/v1.16.0-rc1
Jimmy Praet
3 years ago
committed by
GitHub
17 changed files with 254 additions and 126 deletions
@ -0,0 +1,22 @@
|
||||
// Copyright 2021 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 ( |
||||
"fmt" |
||||
|
||||
"xorm.io/xorm" |
||||
) |
||||
|
||||
func addBranchProtectionUnprotectedFilesColumn(x *xorm.Engine) error { |
||||
type ProtectedBranch struct { |
||||
UnprotectedFilePatterns string `xorm:"TEXT"` |
||||
} |
||||
|
||||
if err := x.Sync2(new(ProtectedBranch)); err != nil { |
||||
return fmt.Errorf("Sync2: %v", err) |
||||
} |
||||
return nil |
||||
} |
Loading…
Reference in new issue