Skip to content

Commit 00d74e3

Browse files
Merge pull request #714 from zenml-io/staging
feat: link to commit (#712)
2 parents a82347f + 5a5e79f commit 00d74e3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/components/repositories/RepoBadge.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ export function RepoBadge({ repositoryId, commit }: Props) {
2424

2525
if (data?.body?.source?.attribute === "GitHubCodeRepository") {
2626
name = `${repositoryMetadata?.owner}/${repositoryMetadata?.repository}`;
27-
url = `https://www.github.com/${name}`;
27+
url = `https://www.github.com/${name}` + (commit ? `/tree/${commit}` : "");
2828
} else if (data?.body?.source?.attribute === "GitLabCodeRepository") {
2929
name = `${repositoryMetadata?.group}/${repositoryMetadata?.project}`;
3030
url = `https://www.gitlab.com/${name}`;
@@ -50,7 +50,7 @@ export function RepoBadge({ repositoryId, commit }: Props) {
5050
<div className="group/copybutton mr-1">
5151
<Tag
5252
color="grey"
53-
className="inline-flex items-center font-semibold text-neutral-900"
53+
className="inline-flex items-center font-semibold text-neutral-900"
5454
rounded={false}
5555
emphasis="subtle"
5656
>

0 commit comments

Comments
 (0)