Skip to content

Commit

Permalink
Merge pull request #714 from zenml-io/staging
Browse files Browse the repository at this point in the history
feat: link to commit (#712)
  • Loading branch information
Cahllagerfeld authored Jan 9, 2025
2 parents a82347f + 5a5e79f commit 00d74e3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/components/repositories/RepoBadge.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export function RepoBadge({ repositoryId, commit }: Props) {

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

0 comments on commit 00d74e3

Please sign in to comment.