Use correct form field for allowed force push users in branch protection API (#35894) (#35908)

Backport #35894 by zorrobiwan

Signed-off-by: Alberty Pascal <github@albertyorban.be>
Co-authored-by: Alberty Pascal <github@albertyorban.be>
pull/35917/head^2
Giteabot 2025-11-11 09:39:35 +07:00 committed by GitHub
parent 327f2207dc
commit ce70863793
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

@ -897,7 +897,7 @@ func EditBranchProtection(ctx *context.APIContext) {
} else {
whitelistUsers = protectBranch.WhitelistUserIDs
}
if form.ForcePushAllowlistDeployKeys != nil {
if form.ForcePushAllowlistUsernames != nil {
forcePushAllowlistUsers, err = user_model.GetUserIDsByNames(ctx, form.ForcePushAllowlistUsernames, false)
if err != nil {
if user_model.IsErrUserNotExist(err) {