Get the github repos of a user, with more options. It doesn't want to show all the repos if they are more than 30. If I fixed it it wouldn't work without an API key. I know the appendRepos() works but I don't know if the API ones completely work.
Just load the script and do appendRepos(a, b);
(or use the simplified edition).
Important
Each IP has a GitHub API rate limit of 60 requests per hour.
<script src="https://cdn.jsdelivr.net/gh/jgc777/GitHubRepoAPI@main/api.js"></script> <!-- Load the API -->
<ul id="repo-list"></ul> <!-- Here will appear the repo list -->
<script>
const token = 'YOUR_API_KEY'; // Your API key with public repos read access
appendRepos("YOUR_GH_USERNAME", repo-list); // Call appendRepos
</script> <!-- Use the API to get the list -->
<meta name="github-username" content="YOUR_GH_USERNAME"> <!-- Define the user whose repos must be shown -->
<script src="https://cdn.jsdelivr.net/gh/jgc777/GitHubRepoAPI@main/simplified.js"></script> <!-- Load the Simplified API -->
<ul id="repo-list"></ul> <!-- Here will appear the repo list -->
It's a simplified version of the code with no sorting and which automatically appends the repos to the repo-list list element (<ul id="repo-list"></ul>
or similar). Works without an API key but you have to specify the username in the html with <meta name="github-username" content="your-github-username">
.
Here are the functions that this program includes.
Appends the repos of a given username to a list, with the links to them ordered by pinned and starcount.
Returns a (not sorted) list of all the repos for a given username.
Returns a (sorted by pinned and starcount) list of all the repos for a given username.
Needs an API key, else returns false.
Return if (true/false) a repo is pinned in the owners profile.
Needs an API key, else returns 0.
Returns the starcount of a given repo.
If it doesn't work click here.
<iframe src="./demo/" width="100%" height="auto">Error loading the demo</iframe>If it doesn't work click here.
<iframe src="./demo/simplified/" width="100%" height="auto">Error loading the simpliified demo</iframe>