From 80e4b82bebb683e7a03f000263c746fe843a93f1 Mon Sep 17 00:00:00 2001 From: quoije Date: Tue, 4 Feb 2025 22:53:55 -0500 Subject: [PATCH] add debug for bug --- routes/users.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/routes/users.js b/routes/users.js index bad085b..5b28fbf 100644 --- a/routes/users.js +++ b/routes/users.js @@ -11,12 +11,13 @@ const router = express.Router(); async function fetchLatestCommitFromGitHub() { const githubOwner = process.env.GITHUB_OWNER; // Your GitHub username or org const githubRepo = process.env.GITHUB_REPO; // Your repository name - const githubToken = ""; // A GitHub personal access token for authentication (optional) try { const url = `https://api.github.com/repos/${githubOwner}/${githubRepo}/commits`; const response = await axios.get(url); + console.log(response); + if (response.data && response.data.length > 0) { const latestCommit = response.data[0]; return {