mirror of https://github.com/zulip/zulip.git
team: Rename contrib to contributors in page_params.
This commit is contained in:
parent
95b1a7c8d1
commit
9e0ff58a6d
|
@ -1,4 +1,4 @@
|
|||
const contributors_list = page_params.contrib;
|
||||
const contributors_list = page_params.contributors;
|
||||
|
||||
const repo_name_to_tab_name = {
|
||||
zulip: "server",
|
||||
|
|
|
@ -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__":
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"contrib": [{
|
||||
"contributors": [{
|
||||
"name": "eeshangarg",
|
||||
"python-zulip-api": 57,
|
||||
"server": 179,
|
||||
|
|
|
@ -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'],
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue