diff --git a/src/lib/server/gitea.ts b/src/lib/server/gitea.ts index b7fcd17..0146147 100644 --- a/src/lib/server/gitea.ts +++ b/src/lib/server/gitea.ts @@ -52,9 +52,10 @@ async function getRepoCommits(fetch: typeof globalThis.fetch, url: string) { let finalData = []; for (let commit of data) { - // Filter out other users - if (commit.author.login == 'voidarc') { + // Filter out other users and do a null check for non-gitea commits that might exist + if (commit.author != null && commit.author.login == 'voidarc') { finalData.push(commit); + } else { } } @@ -71,7 +72,7 @@ async function fetchLatestCommits( for (let repo of repos) { let commits = await getRepoCommits(fetch, repo.url); for (let commit of commits) { - console.log(commit); + // console.log(commit); let newCommit: GitCommit = { message: commit.commit.message, hash: commit.sha, diff --git a/src/routes/Commits.svelte b/src/routes/Commits.svelte index 4ca7f81..349edd2 100644 --- a/src/routes/Commits.svelte +++ b/src/routes/Commits.svelte @@ -206,7 +206,19 @@ {commit.shortHash}

{commit.message}

-
some
+
+ +
+ +
+ {#if commit.diff.deletions > 0} +
+{commit.diff.additions}
+
-{commit.diff.deletions}
+ {:else} +
+{commit.diff.additions}
+ {/if} +
+