forked from tangled.org/core
Monorepo for Tangled

appview/pulls: handle deleted forks in branch status check

Signed-off-by: oppiliappan <me@oppi.li>

oppi.li 779b15d2 62a3b473

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