-
-
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
Proposal: Disable force push in repo settings #6817
Comments
Currently it does disable force pushes for protected branches, there is imho even no way to allow them once branch is protected |
But if branch is protected in what configuration you can do force push currently? |
@lafriks If the branch is not protected, or the user is whitelisted to push. I want to be able to allow normal pushing, but prevent users from force pushing. Currently, if the branch is protected, the user is neither allowed to push normally. |
@kolaente but you can protect branch and whitelist team, this way users will be able to push but not force push |
I think, this is the same problem I have with the branch protection settings.
This is would be, what I expect to happen, when the checkbox is activated. No-one will be able to delete this branch and force pushing will also not be possible. But the issue is, that any kind of pushing is disabled (which is not, what the text says). Then there is the "Enable push whitelist" button, which has the explanation:
This does not clearly say, if the whitelist will only be allowed to push normally, or also be allowed to force push. So the behaviour, that you want to have an option to disable force pushing, but keep "normal" pushes, is possible (by protecting the branch, but adding the users to the whitelist, as @lafriks stated). So the the real issue is, that explanation texts do not say, what really will happen. |
@jbeyerstedt descriptions definitely needs updating. Currently to my knowledge force pushes at disabled always. When no users is whitelisted puses are disabled completely except for PR merges |
As far as I have tested it, this is correct. If branch protection is enabled, no force pushes are possible. "Normal" pushes can be (re-)enabled with the whitelist. |
@jbeyerstedt I think this issue is about add a method to only disable deletion and force push. So that we don't need to set push whitelist(currently you have to set who can push normal commits). I think it's a new issue, it's not the same as what you are talking with @lafriks. So I think it's not a bug but an enhancement. |
If I look back at the issue title, you are right, that this issue requests an additional, more easily accessible option to disable force pushing for the whole repo (with white- and blacklist). But reading the description of this issue, it was not clear to me, if this really was the request, or just the result of being not able to find the existing functionality. That's the reason, I asked and tried to get to the bottom of the question. (You know, sometimes you ask something, because you think, that this will get you further down the road, but your real issue is something different). |
I think this issue is somewhat similar to #8288 (but different parts of the branch protection settings). As I understand there is a wish to not have to enter a whitelist for pushing but everyone with write access would automatically be whitelisted. |
Isn't this issue duplicate of #5731? |
Yeah |
(Not sure if there is an issue about this exact thing already)
It would be cool if one could make a repo setting to disable force pushing for everyone, or just certain members. This would be in addition the current "branch protection settings".
Currently it is only possible to forbid pushing completely, I think it would be great if Gitea could only forbid force pushes while still allowing normal pushes.
The text was updated successfully, but these errors were encountered: