diff --git a/appview/pages/templates/repo/pulls/pull.html b/appview/pages/templates/repo/pulls/pull.html index 1b2f5596..3e3b96d9 100644 --- a/appview/pages/templates/repo/pulls/pull.html +++ b/appview/pages/templates/repo/pulls/pull.html @@ -88,16 +88,17 @@
{{ i "git-commit-horizontal" "w-4 h-4" }}
- {{ if not $.Pull.IsPatchBased }} - {{ $fullRepo := $.RepoInfo.FullName }} - {{ if $.Pull.IsForkBased }} - {{ if $.Pull.PullSource.Repo }} - {{ $fullRepo = printf "%s/%s" $owner $.Pull.PullSource.Repo.Name }} - {{ slice .SHA 0 8 }} - {{ else }} - {{ slice .SHA 0 8 }} - {{ end }} - {{ end }} + + {{ $fullRepo := "" }} + {{ if and $.Pull.IsForkBased $.Pull.PullSource.Repo }} + {{ $fullRepo = printf "%s/%s" $owner $.Pull.PullSource.Repo.Name }} + {{ else if $.Pull.IsBranchBased }} + {{ $fullRepo = $.RepoInfo.FullName }} + {{ end }} + + + {{ if $fullRepo }} + {{ slice .SHA 0 8 }} {{ else }} {{ slice .SHA 0 8 }} {{ end }}