diff options
author | Jimmy Praet <jimmy.praet@telenet.be> | 2021-09-11 16:21:17 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-09-11 16:21:17 +0200 |
commit | 3d6cb25e315c0d4249c5c749a2eb8c64ec463aad (patch) | |
tree | bf9ba30a34e0e97b6a52584caffa1d3d9fe2506d /modules/convert/convert.go | |
parent | eb03e819d323f6374d0a99a5b80d4674a18fa957 (diff) | |
download | gitea-3d6cb25e315c0d4249c5c749a2eb8c64ec463aad.tar.gz gitea-3d6cb25e315c0d4249c5c749a2eb8c64ec463aad.zip |
Support unprotected file patterns (#16395)
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/git
Diffstat (limited to 'modules/convert/convert.go')
-rw-r--r-- | modules/convert/convert.go | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/modules/convert/convert.go b/modules/convert/convert.go index 9a4714b4e0..404786ec9c 100644 --- a/modules/convert/convert.go +++ b/modules/convert/convert.go @@ -127,6 +127,7 @@ func ToBranchProtection(bp *models.ProtectedBranch) *api.BranchProtection { DismissStaleApprovals: bp.DismissStaleApprovals, RequireSignedCommits: bp.RequireSignedCommits, ProtectedFilePatterns: bp.ProtectedFilePatterns, + UnprotectedFilePatterns: bp.UnprotectedFilePatterns, Created: bp.CreatedUnix.AsTime(), Updated: bp.UpdatedUnix.AsTime(), } |