- {{ 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 }}