diff --git a/src/actions/github.ts b/src/actions/github.ts index 6ea9f8c..2789e79 100644 --- a/src/actions/github.ts +++ b/src/actions/github.ts @@ -4,6 +4,7 @@ import { Octokit } from '@octokit/rest'; import { env } from '@/env'; import type { Repository } from '@/interfaces/github'; +import { githubUsername } from '@/lib/metadata'; export async function fetchGithubRepos() { try { @@ -12,7 +13,7 @@ export async function fetchGithubRepos() { }); const response = await octokit.repos.listForUser({ - username: 'kWAYTV', + username: githubUsername, sort: 'updated', per_page: 100 }); diff --git a/src/lib/metadata.ts b/src/lib/metadata.ts index 68e455a..c4eade1 100644 --- a/src/lib/metadata.ts +++ b/src/lib/metadata.ts @@ -27,5 +27,6 @@ export const baseUrl = ? new URL('http://localhost:3000') : new URL(`https://${process.env.VERCEL_URL!}`); -export const githubProfileUrl = 'https://github.com/kWAYTV'; -export const githubRepoUrl = 'https://github.com/kWAYTV/portfolio'; +export const githubUsername = 'kWAYTV'; +export const githubProfileUrl = `https://github.com/${githubUsername}`; +export const githubRepoUrl = `https://github.com/${githubUsername}/portfolio`;