Skip to content

Commit 3f13659

Browse files
zorrobiwanGiteaBot
authored andcommitted
Use correct form field for allowed force push users in branch protection API (go-gitea#35894)
Test was wrong and preventing update of force push allow users list by the API Resolves go-gitea#35893 Signed-off-by: Alberty Pascal <[email protected]>
1 parent 2b71bf2 commit 3f13659

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

routers/api/v1/repo/branch.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -897,7 +897,7 @@ func EditBranchProtection(ctx *context.APIContext) {
897897
} else {
898898
whitelistUsers = protectBranch.WhitelistUserIDs
899899
}
900-
if form.ForcePushAllowlistDeployKeys != nil {
900+
if form.ForcePushAllowlistUsernames != nil {
901901
forcePushAllowlistUsers, err = user_model.GetUserIDsByNames(ctx, form.ForcePushAllowlistUsernames, false)
902902
if err != nil {
903903
if user_model.IsErrUserNotExist(err) {

0 commit comments

Comments
 (0)