add debug for bug
This commit is contained in:
+2
-1
@@ -11,12 +11,13 @@ const router = express.Router();
|
|||||||
async function fetchLatestCommitFromGitHub() {
|
async function fetchLatestCommitFromGitHub() {
|
||||||
const githubOwner = process.env.GITHUB_OWNER; // Your GitHub username or org
|
const githubOwner = process.env.GITHUB_OWNER; // Your GitHub username or org
|
||||||
const githubRepo = process.env.GITHUB_REPO; // Your repository name
|
const githubRepo = process.env.GITHUB_REPO; // Your repository name
|
||||||
const githubToken = ""; // A GitHub personal access token for authentication (optional)
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const url = `https://api.github.com/repos/${githubOwner}/${githubRepo}/commits`;
|
const url = `https://api.github.com/repos/${githubOwner}/${githubRepo}/commits`;
|
||||||
const response = await axios.get(url);
|
const response = await axios.get(url);
|
||||||
|
|
||||||
|
console.log(response);
|
||||||
|
|
||||||
if (response.data && response.data.length > 0) {
|
if (response.data && response.data.length > 0) {
|
||||||
const latestCommit = response.data[0];
|
const latestCommit = response.data[0];
|
||||||
return {
|
return {
|
||||||
|
|||||||
Reference in New Issue
Block a user