This commit is contained in:
Stijnus
2025-01-24 16:51:43 +01:00
parent 7378d7598b
commit b0fe1fc871
5 changed files with 28 additions and 7 deletions

View File

@@ -101,12 +101,15 @@ export default function ConnectionsTab() {
try {
setIsFetchingStats(true);
// Fetch repositories
const reposResponse = await fetch('https://api.github.com/user/repos?sort=updated&per_page=10', {
headers: {
Authorization: `Bearer ${token}`,
// Fetch repositories - only owned by the authenticated user
const reposResponse = await fetch(
'https://api.github.com/user/repos?sort=updated&per_page=10&affiliation=owner',
{
headers: {
Authorization: `Bearer ${token}`,
},
},
});
);
if (!reposResponse.ok) {
throw new Error('Failed to fetch repositories');