forked from tangled.org/core
this repo has no description

appview: handle deleted forks

Changed files
+8 -3
appview
pages
templates
repo
pulls
state
+5 -1
appview/pages/templates/repo/pulls/pulls.html
···
</span>
{{ if not .IsPatchBased }}
<span>from
-
{{ if not .IsBranchBased }}
+
{{ if .IsForkBased }}
+
{{ if .PullSource.Repo }}
<a href="/{{ $owner }}/{{ .PullSource.Repo.Name }}" class="no-underline hover:underline">{{ $owner }}/{{ .PullSource.Repo.Name }}</a>
+
{{ else }}
+
<span class="italic">[deleted fork]</span>
+
{{ end }}
{{ end }}
<span class="text-xs rounded bg-gray-100 dark:bg-gray-700 text-black dark:text-white font-mono px-2 mx-1/2 inline-flex items-center">
+3 -2
appview/state/pull.go
···
pullSourceRepo, err = db.GetRepoByAtUri(s.db, p.PullSource.RepoAt.String())
if err != nil {
log.Printf("failed to get repo by at uri: %v", err)
-
return
+
continue
+
} else {
+
p.PullSource.Repo = pullSourceRepo
}
}
-
p.PullSource.Repo = pullSourceRepo
}
}