Skip to content

Instantly share code, notes, and snippets.

@bajtos
Created April 2, 2025 08:46
Show Gist options
  • Save bajtos/9cd3bee260eb04a269cfbe88c1be64de to your computer and use it in GitHub Desktop.
Save bajtos/9cd3bee260eb04a269cfbe88c1be64de to your computer and use it in GitHub Desktop.
const ORG_NAME = 'CheckerNetwork';
// GitHub API has rate limiting so it's a good idea to set a User-Agent header.
const response = await fetch(`https://api.github.com/orgs/${ORG_NAME}/repos?per_page=100`, {
headers: {
"Accept": "application/vnd.github.v3+json",
}
});
if (!response.ok) {
throw new Error(`Failed to fetch repositories: ${response.status} ${await response.text()}`);
}
const repos = await response.json();
// Log repo names or full information
repos
.filter(repo => !repo.archived)
.forEach(repo => console.log('- [ ] [%s](%s)', repo.full_name, repo.html_url));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment