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

appview: repo: use committer email for verification in commit view

Signed-off-by: Anirudh Oppiliappan <anirudh@tangled.sh>

anirudh.fi 824eec6b 9bc7a2ac

verified
Changed files
+3 -2
appview
pages
templates
repo
+2 -1
appview/pages/templates/repo/commit.html
···
<div class="mb-1">This commit was signed with the committer's <span class="text-green-600 font-semibold">known signature</span>.</div>
<div class="flex items-center gap-2 my-2">
{{ i "user" "w-4 h-4" }}
-
<a href="/{{ $didOrHandle }}">{{ $didOrHandle }}</a>
</div>
<div class="my-1 pt-2 text-xs border-t">
<div class="text-gray-600 dark:text-gray-300">SSH Key Fingerprint:</div>
···
<div class="mb-1">This commit was signed with the committer's <span class="text-green-600 font-semibold">known signature</span>.</div>
<div class="flex items-center gap-2 my-2">
{{ i "user" "w-4 h-4" }}
+
{{ $committerDidOrHandle := index $.EmailToDidOrHandle $commit.Committer.Email }}
+
<a href="/{{ $committerDidOrHandle }}">{{ $committerDidOrHandle }}</a>
</div>
<div class="my-1 pt-2 text-xs border-t">
<div class="text-gray-600 dark:text-gray-300">SSH Key Fingerprint:</div>
+1 -1
appview/repo/repo.go
···
return
}
-
emailToDidMap, err := db.GetEmailToDid(rp.db, []string{result.Diff.Commit.Author.Email}, true)
if err != nil {
log.Println("failed to get email to did mapping:", err)
}
···
return
}
+
emailToDidMap, err := db.GetEmailToDid(rp.db, []string{result.Diff.Commit.Committer.Email, result.Diff.Commit.Author.Email}, true)
if err != nil {
log.Println("failed to get email to did mapping:", err)
}