Explorar el Código

Fix the protected branch panic issue (#3567)

tags/v1.5.0-dev
Wendell Sun hace 6 años
padre
commit
d2d0aea8a1
Se han modificado 1 ficheros con 4 adiciones y 0 borrados
  1. 4
    0
      models/branches.go

+ 4
- 0
models/branches.go Ver fichero

@@ -155,6 +155,10 @@ func (repo *Repository) GetProtectedBranches() ([]*ProtectedBranch, error) {

// IsProtectedBranch checks if branch is protected
func (repo *Repository) IsProtectedBranch(branchName string, doer *User) (bool, error) {
if doer == nil {
return true, nil
}

protectedBranch := &ProtectedBranch{
RepoID: repo.ID,
BranchName: branchName,

Cargando…
Cancelar
Guardar