From 1e66dba35a81f02827477b680915bd406ff5001a Mon Sep 17 00:00:00 2001 From: patak Date: Wed, 21 Dec 2022 15:44:59 +0100 Subject: [PATCH] fix: github card for user/org --- components/status/StatusPreviewGitHub.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/status/StatusPreviewGitHub.vue b/components/status/StatusPreviewGitHub.vue index 5489cff4..5248453c 100644 --- a/components/status/StatusPreviewGitHub.vue +++ b/components/status/StatusPreviewGitHub.vue @@ -23,7 +23,7 @@ interface Meta { const meta = $computed(() => { const { url } = props.card const path = url.split('https://github.com/')[1] - const user = path.match(/([\w-]+)\//)?.[1] + const user = path.match(/([\w-]+)(\/|$)/)?.[1] const repo = path.match(/[\w-]+\/([\w-]+)/)?.[1] const repoPath = `${user}/${repo}` const inRepoPath = path.split(`${repoPath}/`)?.[1]