@@ -424,13 +424,21 @@ repoMetrics = {
424424 ...row,
425425 }))
426426}
427- ctbs = {
427+ ctbs_all = {
428428 return transpose(ctbs_in[repo]).map(row => ({
429429 ...row,
430430 }))
431431}
432432
433+ auts = ctbs_all.filter(function(ctb) {
434+ return ctb.is_author
435+ })
436+ ctbs = ctbs_all.filter(function(ctb) {
437+ return !ctb.is_author
438+ })
439+
433440ctbs_gh = ctbs.map((ctb) => ctb['login']).filter(item => item != null);
441+ auts_gh = auts.map((aut) => aut['login']).filter(item => item != null);
434442```
435443
436444
@@ -483,30 +491,26 @@ htl.html`${releases[0].total} releases (latest: ${release_latest}), ${releases[0
483491gitlog_txt_total = htl.html`${gitlog_total_commits} commits since ${gitlog_first_commit}`;
484492gitlog_txt_recent = htl.html`${gitlog_recent_commits} commits in past year`;
485493
486- maintainer_count = repoMetrics.filter(function(m) {
487- return m.name == "maintainer_count"
488- })[0].value;
489- maintainer_count_txt = pluraliseObjects(maintainer_count, "primary maintainer");
494+ author_count = auts_gh.length;
495+ author_count_txt = pluraliseObjects(author_count, "primary author");
490496
491- maintainer_gh = [].concat(ctbs_gh.slice(0, maintainer_count) || []);
492- maintainer_gh_list = maintainer_gh.length == 0 ? undefined:
493- (maintainer_gh.length == 1 ? htl.html`
494- <div onclick=${() => localStorage.setItem('orgmetricsMaintainer', maintainer_gh)}>
495- <li><a href='/contributor.html'>${maintainer_gh}</a></li>
497+ author_gh_list = auts_gh.length == 0 ? undefined:
498+ (auts_gh.length == 1 ? htl.html`
499+ <div onclick=${() => localStorage.setItem('orgmetricsMaintainer', auts_gh)}>
500+ <li><a href='/contributor.html'>${auts_gh}</a></li>
496501</div>
497- ` : maintainer_gh .map(m => htl.html`
502+ ` : auts_gh .map(m => htl.html`
498503<div onclick=${() => localStorage.setItem('orgmetricsMaintainer', m)}>
499504<li><a href='/contributor.html'>${m}</a></li>
500505</div>
501506`));
502- maintainer_gh_list_txt = maintainer_gh .length > 0 ? htl.html`<ul>${maintainer_gh_list }</ul>` : undefined;
507+ author_gh_list_txt = auts_gh .length > 0 ? htl.html`<ul>${author_gh_list }</ul>` : undefined;
503508
504- ctb_gh = [].concat(ctbs_gh.slice(maintainer_count) || []);
505- ctb_count = ctb_gh.length;
509+ ctb_count = ctbs_gh.length;
506510ctb_count_txt = pluraliseObjects(ctb_count, "additional contributor");
507- ctb_count_list = ctb_gh .map((item, i) => htl.html`
511+ ctb_count_list = ctbs_gh .map((item, i) => htl.html`
508512<span onclick=${() => localStorage.setItem('orgmetricsMaintainer', item)}>
509- <a href='/contributor.html'>${item}</a>${i < ctb_gh .length - 1 ? ", " : ""}</span>`);
513+ <a href='/contributor.html'>${item}</a>${i < ctbs_gh .length - 1 ? ", " : ""}</span>`);
510514ctb_count_html = ctb_count == 0 ? htl.html`<div>No additional contributors</div>` :
511515 htl.html`<div>${ctb_count_txt}: ${ctb_count_list}</div>`;
512516
@@ -605,7 +609,7 @@ htl.html`<ul>
605609 <li>${releases_txt_total}</li>
606610 <li>${gitlog_txt_total}</li>
607611 <li>${gitlog_txt_recent}</li>
608- <li>${maintainer_count_txt }${maintainer_gh_list_txt }</li>
612+ <li>${author_count_txt }${author_gh_list_txt }</li>
609613 <li>${ctb_count_html}</li>
610614 <li>${test_coverage_txt}</li>
611615</ul>`
0 commit comments