-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow to set protected file patterns for files that can not be changed under no conditions #10806
Allow to set protected file patterns for files that can not be changed under no conditions #10806
Conversation
I think those two warns are probably left over from testing. |
Yes, for debugging ;) |
I know exactly how you feel - some of my debugging log messages have actually managed to get into Gitea proper by mistake... |
@lafriks I'm appreciate your changes . Actually I also was looking for something like this. But, my 2 cents is whether locking mechanism (like gitlab has https://docs.gitlab.com/ee/user/project/file_lock.html ) is better or not your implementation? From business logic the manager need to lock specific files, not by mask. And these files are already exists in repository (master branch?) |
@davydov-vyacheslav you can add also specific files using mask. This is a bit different use case as file locking, file locking is more to lock temporary while this is more permanent |
Also Gitea supports LFS file locking |
… conditions Co-Authored-By: zeripath <art27@cantab.net>
b8730fa
to
f6a2483
Compare
Codecov Report
@@ Coverage Diff @@
## master #10806 +/- ##
==========================================
- Coverage 43.56% 43.51% -0.05%
==========================================
Files 589 590 +1
Lines 82691 82797 +106
==========================================
+ Hits 36023 36028 +5
- Misses 42192 42292 +100
- Partials 4476 4477 +1
Continue to review full report at Codecov.
|
(As an aside - my persistent warning applies here: we assume that git filenames are utf8 strings - there is no guarantee of this ... the only thing not actually allowed is |
Make lgtm work |
I think maybe we should allow repo admin to add commit to change protect files. No one can change it is not good idea, do you think so?Thanks. |
That could be possibly added as option if needed |
The only way that would work would be through a flag that the admin could set and unset as and when they needed to do it. There is no way to warn an admin that they were about to splat a protected file and ask them if they really meant to do that during a git push - you simply do not have interactivity like that. |
Another suggestion about this feature: maybe we should also check whether it changed protected files when making a pr to protected branch, if have. should block it to be merge. similar to checking whether have conflicting files |
When pattern is set files that match them can not be changed neither using PR, nor push or web editor.
This could be later in other PR probably improved with exceptions to allow changing in PR
Screenshots: