team: Rename contrib_total_commits to calculate_total_commits.

This commit is contained in:
Vishnu KS 2020-07-23 11:53:50 +00:00 committed by Tim Abbott
parent 9e0ff58a6d
commit 6b9e7a4022
1 changed files with 2 additions and 2 deletions

View File

@ -16,7 +16,7 @@ const repo_name_to_tab_name = {
// if a user leaves and then revisits the same tab. // if a user leaves and then revisits the same tab.
const loaded_repos = []; const loaded_repos = [];
function contrib_total_commits(contributor) { function calculate_total_commits(contributor) {
let commits = 0; let commits = 0;
Object.keys(repo_name_to_tab_name).forEach((repo_name) => { Object.keys(repo_name_to_tab_name).forEach((repo_name) => {
commits += contributor[repo_name] || 0; commits += contributor[repo_name] || 0;
@ -42,7 +42,7 @@ export default function render_tabs() {
.map((c) => ({ .map((c) => ({
name: c.name, name: c.name,
avatar: c.avatar, avatar: c.avatar,
commits: contrib_total_commits(c), commits: calculate_total_commits(c),
})) }))
.sortBy("commits") .sortBy("commits")
.reverse() .reverse()