Last active
September 2, 2022 00:35
-
-
Save tinacious/37ccc9ac519e7339ca332fc19de32b4c to your computer and use it in GitHub Desktop.
Get all of the public repositories by name for a Github user
This file contains hidden or 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
# Replace "octocat" with you, or the user you're creeping. | |
export GIST_GITHUB_USERNAME="octocat"; | |
export GIST_GITHUB_PAGE="1"; | |
curl https://api.github.com/users/$GIST_GITHUB_USERNAME/repos\?sort\=created\&direction\=desc\&page\=$GIST_GITHUB_PAGE | jq '.[].html_url' | |
# Other properties of relevance: | |
# html_url description license.url | |
# Given username = tinacious | |
# curl https://api.github.com/users/tinacious/repos | jq .[].full_name | |
# Outputs | |
# "tinacious/<repo-name-1>" | |
# "tinacious/<repo-name-2>" | |
# References | |
# - Github v3 API: https://docs.github.com/en/free-pro-team@latest/rest/reference/repos#list-repositories-for-a-user | |
# Dependencies | |
# - curl | |
# - jq: https://stedolan.github.io/jq |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment