-
-
Notifications
You must be signed in to change notification settings - Fork 6.2k
Open
Description
Description
On branch protection creation (POST) or update (PATCH), setting force_push_allowlist_usernames has no effect.
How to reproduce
- choose a repository
- create a default branch protection on master
- call /api/v1/repos///branch_protections/master (PATCH) with the following payload
{
"enable_force_push": true,
"enable_force_push_allowlist" : true,
"force_push_allowlist_usernames" : ["<user>"]
}
Workaround
Use the following payload
{
"enable_force_push": true,
"enable_force_push_allowlist" : true,
"force_push_allowlist_usernames" : ["<user>"],
"force_push_allowlist_deploy_keys" : true
}
Gitea Version
1.24.6
Can you reproduce the bug on the Gitea demo site?
No
Log Gist
No response
Screenshots
No response
Git Version
No response
Operating System
No response
How are you running Gitea?
On premise
Database
None