From 2da6ae3078e8c0d69df0cc8a2b089b50b5175da6 Mon Sep 17 00:00:00 2001 From: Richard Bergsma Date: Fri, 6 Jun 2025 21:40:28 +0200 Subject: [PATCH] Update .gitignore and development.astro for improved configuration and API integration - Specify .env file handling in .gitignore to prevent accidental exposure of sensitive data. - Change Git API URL to Gitea for fetching commits, ensuring compatibility with the new repository structure. --- .gitignore | 5 +++-- src/pages/development.astro | 9 ++------- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/.gitignore b/.gitignore index c6ed7d3..270d226 100644 --- a/.gitignore +++ b/.gitignore @@ -6,7 +6,8 @@ yarn-error.log* pnpm-debug.log* # Local env and secrets -.env* +.env +.env.* !.env.example # OS/IDE/editor files @@ -49,7 +50,7 @@ inter.zip .vercel/ .netlify/ -# Optional: ignore public/index.html if it’s generated dynamically +# Optional: ignore public/index.html if it's generated dynamically # public/index.html # Astro preview build cache (if used) diff --git a/src/pages/development.astro b/src/pages/development.astro index a6aa088..b88e7fd 100644 --- a/src/pages/development.astro +++ b/src/pages/development.astro @@ -7,17 +7,12 @@ const lang = Astro.params.lang || 'en'; const t = getTranslation(lang); // Fetch Git repository data at build time -const GIT_API_URL = 'https://git.365devnet.eu/api/v4/projects/Richard%2F365devnet'; -const GIT_COMMITS_URL = `${GIT_API_URL}/repository/commits`; +const GITEA_COMMITS_URL = 'https://git.365devnet.eu/api/v1/repos/365DevNet/365devnet/commits'; // Fetch commits data let commits: any[] = []; try { - const commitsResponse = await fetch(GIT_COMMITS_URL, { - headers: { - 'PRIVATE-TOKEN': import.meta.env.GITLAB_TOKEN || '', - }, - }); + const commitsResponse = await fetch(GITEA_COMMITS_URL); if (commitsResponse.ok) { commits = await commitsResponse.json();