Contributors section includes all repos

This commit is contained in:
Thomas Smith 2023-03-08 17:19:50 -05:00
parent 1ab00b121d
commit 042335b951

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>");