Created
February 4, 2021 15:11
-
-
Save mxdvl/d30794bc3bce21ff8b534a0280e90ff8 to your computer and use it in GitHub Desktop.
Default @guardian repo branches
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const user = "orgs/guardian"; | |
const repos = await fetch( | |
`https://api.github.com/${user}/repos?per_page=100&sort=updated&direction=desc`, | |
).then((r) => r.json()); | |
type Repo = Record<string, string>; | |
repos | |
.filter((repo: Repo) => repo.default_branch !== "main") | |
.map((repo: Repo) => console.log(repo.default_branch, " — ",repo.full_name)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment