diff --git a/static/js/portico/team.js b/static/js/portico/team.js index 12de89db34..a55bdb81b8 100644 --- a/static/js/portico/team.js +++ b/static/js/portico/team.js @@ -2,19 +2,20 @@ // eslint's error. /* global contributors_list */ +// `repos` are repositories to be shown as tabs, whereas `hidden_repos` are +// repositories that should count towards the total but not have tabs. var repos = ['server', 'desktop', 'mobile', 'python-zulip-api', 'zulip-js', 'zulipbot', 'terminal']; +var hidden_repos = ['zulip-android', 'zulip-ios-legacy']; function contrib_total_commits(contrib) { var commits = 0; - repos.forEach(function (repo) { + repos.concat(hidden_repos).forEach(function (repo) { commits += contrib[repo] || 0; }); return commits; } // TODO (for v2 of /team contributors): -// - Freeze contributions data for legacy repo (ios, android) and include them -// in totals tab. // - Lazy-render all but the total tab. // - Make tab header responsive. // - Display full name instead of github username. diff --git a/tools/update-authors-json b/tools/update-authors-json index f775bb2e1c..387fc3f01d 100755 --- a/tools/update-authors-json +++ b/tools/update-authors-json @@ -67,6 +67,10 @@ def run_production() -> None: dictionary. Retry fetching each repository if responded with non HTTP 200 status. """ + + # This dictionary should hold all repositories that should be included in + # the total count, including those that should *not* have tabs on the team + # page (e.g. if they are deprecated). repositories = { 'server': 'https://api.github.com/repos/zulip/zulip/stats/contributors', 'desktop': 'https://api.github.com/repos/zulip/zulip-electron/stats/contributors', @@ -75,6 +79,8 @@ def run_production() -> None: 'zulip-js': 'https://api.github.com/repos/zulip/zulip-js/stats/contributors', 'zulipbot': 'https://api.github.com/repos/zulip/zulipbot/stats/contributors', 'terminal': 'https://api.github.com/repos/zulip/zulip-terminal/stats/contributors', + 'zulip-ios-legacy': 'https://api.github.com/repos/zulip/zulip-ios-legacy/stats/contributors', + 'zulip-android': 'https://api.github.com/repos/zulip/zulip-android/stats/contributors', } data = dict(date=str(date.today()), contrib=[]) # type: ContributorsJSON