diff --git a/static/js/portico/team.js b/static/js/portico/team.js index bec394581d..2b58c7c732 100644 --- a/static/js/portico/team.js +++ b/static/js/portico/team.js @@ -1,4 +1,4 @@ -const contributors_list = page_params.contrib; +const contributors_list = page_params.contributors; const repo_name_to_tab_name = { zulip: "server", diff --git a/tools/fetch-contributor-data b/tools/fetch-contributor-data index 2c93d25170..90293922a7 100755 --- a/tools/fetch-contributor-data +++ b/tools/fetch-contributor-data @@ -39,7 +39,7 @@ args = parser.parse_args() class ContributorsJSON(TypedDict): date: str - contrib: List[Dict[str, Union[int, str]]] + contributors: List[Dict[str, Union[int, str]]] class Contributor(TypedDict): avatar_url: str @@ -85,7 +85,7 @@ def update_contributor_data_file() -> None: repo_names = ['zulip', 'zulip-desktop', 'zulip-mobile', 'python-zulip-api', 'zulip-js', 'zulipbot', 'zulip-terminal', 'zulip-ios-legacy', 'zulip-android'] - data: ContributorsJSON = dict(date=str(date.today()), contrib=[]) + data: ContributorsJSON = dict(date=str(date.today()), contributors=[]) contributor_username_to_data: Dict[str, Dict[str, Union[str, int]]] = {} for repo_name in repo_names: @@ -113,7 +113,7 @@ def update_contributor_data_file() -> None: original_commits = total_commits - duplicate_commits_count contributor_username_to_data[committer]['server'] = original_commits - data['contrib'] = list(contributor_username_to_data.values()) + data['contributors'] = list(contributor_username_to_data.values()) write_to_disk(data, settings.CONTRIBUTOR_DATA_FILE_PATH) if __name__ == "__main__": diff --git a/zerver/tests/fixtures/authors.json b/zerver/tests/fixtures/authors.json index 8e039a18b4..3c4867790e 100644 --- a/zerver/tests/fixtures/authors.json +++ b/zerver/tests/fixtures/authors.json @@ -1,5 +1,5 @@ { - "contrib": [{ + "contributors": [{ "name": "eeshangarg", "python-zulip-api": 57, "server": 179, diff --git a/zerver/views/portico.py b/zerver/views/portico.py index 4b17bff9ee..c6e97bf275 100644 --- a/zerver/views/portico.py +++ b/zerver/views/portico.py @@ -59,14 +59,14 @@ def team_view(request: HttpRequest) -> HttpResponse: with open(settings.CONTRIBUTOR_DATA_FILE_PATH) as f: data = ujson.load(f) except FileNotFoundError: - data = {'contrib': {}, 'date': "Never ran."} + data = {'contributors': {}, 'date': "Never ran."} return TemplateResponse( request, 'zerver/team.html', context={ 'page_params': { - 'contrib': data['contrib'], + 'contributors': data['contributors'], }, 'date': data['date'], },