···334 return nil
335 }
33600000337 // user can only delete branch if they are a collaborator in the repo that the branch belongs to
338 perms := s.enforcer.GetPermissionsInRepo(user.Did, repo.Knot, repo.DidSlashRepo())
339 if !slices.Contains(perms, "repo:push") {
···334 return nil
335 }
336337+ // deleted fork
338+ if repo == nil {
339+ return nil
340+ }
341+342 // user can only delete branch if they are a collaborator in the repo that the branch belongs to
343 perms := s.enforcer.GetPermissionsInRepo(user.Did, repo.Knot, repo.DidSlashRepo())
344 if !slices.Contains(perms, "repo:push") {