diff options
| author | Aleksandr Nogikh <nogikh@google.com> | 2022-12-14 10:51:43 +0100 |
|---|---|---|
| committer | Aleksandr Nogikh <wp32pw@gmail.com> | 2022-12-14 11:45:58 +0100 |
| commit | b18f0a64c547e066dca1eba82a3ada7ef5e54741 (patch) | |
| tree | e5e809882080bcb1131069b1d73a576bd9e43dcb /pkg/html/html.go | |
| parent | f6511626584e1f100818d9036909e0480ffd34c1 (diff) | |
pkg/html: add a commitLink template function
Diffstat (limited to 'pkg/html/html.go')
| -rw-r--r-- | pkg/html/html.go | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/pkg/html/html.go b/pkg/html/html.go index d9e4e5881..8dc075bb6 100644 --- a/pkg/html/html.go +++ b/pkg/html/html.go @@ -12,6 +12,7 @@ import ( "time" "github.com/google/syzkaller/dashboard/dashapi" + "github.com/google/syzkaller/pkg/vcs" ) func CreateGlob(glob string) *template.Template { @@ -40,6 +41,7 @@ var Funcs = template.FuncMap{ "formatList": formatStringList, "selectBisect": selectBisect, "dereference": dereferencePointer, + "commitLink": commitLink, } func selectBisect(rep *dashapi.BugReport) *dashapi.BisectResult { @@ -185,3 +187,7 @@ func dereferencePointer(v interface{}) interface{} { } return v } + +func commitLink(repo, commit string) string { + return vcs.CommitLink(repo, commit) +} |
