Skip to content

Commit dd78439

Browse files
xwjdshlafriks
authored andcommitted
Fix query protected branch bug (#3563) (#3571)
Signed-off-by: Wendell Sun <[email protected]>
1 parent 4a0ce68 commit dd78439

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

models/branches.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ package models
66

77
import (
88
"fmt"
9-
"strings"
109
"time"
1110

1211
"code.gitea.io/gitea/modules/base"
@@ -70,7 +69,7 @@ func GetProtectedBranchByRepoID(RepoID int64) ([]*ProtectedBranch, error) {
7069

7170
// GetProtectedBranchBy getting protected branch by ID/Name
7271
func GetProtectedBranchBy(repoID int64, BranchName string) (*ProtectedBranch, error) {
73-
rel := &ProtectedBranch{RepoID: repoID, BranchName: strings.ToLower(BranchName)}
72+
rel := &ProtectedBranch{RepoID: repoID, BranchName: BranchName}
7473
has, err := x.Get(rel)
7574
if err != nil {
7675
return nil, err

0 commit comments

Comments
 (0)