Merge pull request #290 from teaxyz/fetch-all-repos

Contributors section includes all repos
This commit is contained in:
Thomas Smith 2023-03-09 09:34:17 -05:00 committed by GitHub
commit eeae257c22
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -738,11 +738,13 @@
var contributorsList = $("#contributors-list");
$.getJSON("https://api.github.com/repos/teaxyz/cli/contributors", function(cliContributors) {
$.getJSON("https://api.github.com/repos/teaxyz/pantry.extra/contributors", function(extraContributors) {
var allContributors = cliContributors.concat(extraContributors);
var uniqueContributors = {};
$.each(allContributors, function(i, contributor) {
var repos = ["cli", "pantry.extra", "pantry.zero", "white-paper", "setup", "brewkit", "www", "kettle", "demos"];
var uniqueContributors = {};
$.each(repos, function(i, repo) {
$.getJSON("https://api.github.com/repos/teaxyz/" + repo + "/contributors", function(contributors) {
$.each(contributors, function(j, contributor) {
if (!(contributor.id in uniqueContributors)) {
uniqueContributors[contributor.id] = true;
contributorsList.append("<div class='col-3 col-sm-3 col-md-3 col-lg-1 col-xl-1 ps-0'>" + "<a href='" + contributor.html_url + "' target='_blank'><img class='con-img mb-3' src='" + contributor.avatar_url + "'></a>" + "<p class='small' style='hyphens:auto;'>" + contributor.login + "</p>" + "</div>");