window.addEventListener('DOMContentLoaded', async () => { const repository = 'ghndrx/docker-test-image'; // Replace with your desired repository try { const response = await fetch(`https://api.github.com/repos/${repository}/commits`); const commits = await response.json(); const commitList = document.getElementById('commit-list'); if (commits.length > 0) { commits.forEach(commit => { const commitElement = document.createElement('div'); commitElement.classList.add('commit'); commitElement.innerHTML = `

${commit.commit.author.name}

${commit.commit.message}

`; commitList.appendChild(commitElement); }); } else { commitList.innerHTML = '

No commits found.

'; } } catch (error) { console.error('Error fetching commits:', error); } });