diff --git a/src/main/java/tfb/status/view/HomePageView.java b/src/main/java/tfb/status/view/HomePageView.java index bebfd256..394431aa 100644 --- a/src/main/java/tfb/status/view/HomePageView.java +++ b/src/main/java/tfb/status/view/HomePageView.java @@ -167,6 +167,7 @@ public static final class ResultsGitView { public final String commitId; @Nullable public final String repositoryUrl; @Nullable public final String branchName; + @Nullable public final String commitUrl; public ResultsGitView(String commitId, @Nullable String repositoryUrl, @@ -174,6 +175,12 @@ public ResultsGitView(String commitId, this.commitId = Objects.requireNonNull(commitId); this.repositoryUrl = repositoryUrl; this.branchName = branchName; + if (this.repositoryUrl != null) { + this.commitUrl = repositoryUrl.replace(".git$", "") + + "/tree/" + this.commitId; + } else { + this.commitUrl = null; + } } } } diff --git a/src/main/resources/mustache/detail.mustache b/src/main/resources/mustache/detail.mustache index 5039f23b..11f6c3db 100644 --- a/src/main/resources/mustache/detail.mustache +++ b/src/main/resources/mustache/detail.mustache @@ -28,10 +28,16 @@ The HTML of the results detail page. {{#git}}
{{commitId}}
{{commitId}}
{{/commitUrl}}
+ {{repositoryUrl}}
{{/repositoryUrl}}
- {{^repositoryUrl}}(unknown, probably https://github.com/TechEmpower/FrameworkBenchmarks.git
){{/repositoryUrl}}{{branchName}}
{{/branchName}}
{{^branchName}}(unknown, probably master
){{/branchName}}