@@ -424,12 +424,21 @@ repoMetrics = {
424424 ...row,
425425 }))
426426}
427- ctbs = {
427+ ctbs_all = {
428428 return transpose(ctbs_in[repo]).map(row => ({
429429 ...row,
430430 }))
431431}
432- ctbs_gh = ctbs.map((ctb) => ctb['gh_handle']).filter(item => item != null);
432+
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+
440+ ctbs_gh = ctbs.map((ctb) => ctb['login']).filter(item => item != null);
441+ auts_gh = auts.map((aut) => aut['login']).filter(item => item != null);
433442```
434443
435444
@@ -482,30 +491,26 @@ htl.html`${releases[0].total} releases (latest: ${release_latest}), ${releases[0
482491gitlog_txt_total = htl.html`${gitlog_total_commits} commits since ${gitlog_first_commit}`;
483492gitlog_txt_recent = htl.html`${gitlog_recent_commits} commits in past year`;
484493
485- maintainer_count = repoMetrics.filter(function(m) {
486- return m.name == "maintainer_count"
487- })[0].value;
488- maintainer_count_txt = pluraliseObjects(maintainer_count, "primary maintainer");
494+ author_count = auts_gh.length;
495+ author_count_txt = pluraliseObjects(author_count, "primary author");
489496
490- maintainer_gh = [].concat(ctbs_gh.slice(0, maintainer_count) || []);
491- maintainer_gh_list = maintainer_gh.length == 0 ? undefined:
492- (maintainer_gh.length == 1 ? htl.html`
493- <div onclick=${() => localStorage.setItem('orgmetricsMaintainer', maintainer_gh)}>
494- <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>
495501</div>
496- ` : maintainer_gh .map(m => htl.html`
502+ ` : auts_gh .map(m => htl.html`
497503<div onclick=${() => localStorage.setItem('orgmetricsMaintainer', m)}>
498504<li><a href='/contributor.html'>${m}</a></li>
499505</div>
500506`));
501- 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;
502508
503- ctb_gh = [].concat(ctbs_gh.slice(maintainer_count) || []);
504- ctb_count = ctb_gh.length;
509+ ctb_count = ctbs_gh.length;
505510ctb_count_txt = pluraliseObjects(ctb_count, "additional contributor");
506- ctb_count_list = ctb_gh .map((item, i) => htl.html`
511+ ctb_count_list = ctbs_gh .map((item, i) => htl.html`
507512<span onclick=${() => localStorage.setItem('orgmetricsMaintainer', item)}>
508- <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>`);
509514ctb_count_html = ctb_count == 0 ? htl.html`<div>No additional contributors</div>` :
510515 htl.html`<div>${ctb_count_txt}: ${ctb_count_list}</div>`;
511516
@@ -604,7 +609,7 @@ htl.html`<ul>
604609 <li>${releases_txt_total}</li>
605610 <li>${gitlog_txt_total}</li>
606611 <li>${gitlog_txt_recent}</li>
607- <li>${maintainer_count_txt }${maintainer_gh_list_txt }</li>
612+ <li>${author_count_txt }${author_gh_list_txt }</li>
608613 <li>${ctb_count_html}</li>
609614 <li>${test_coverage_txt}</li>
610615</ul>`
0 commit comments