Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion components/RepoBox.vue
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
class="flex-row flex text-sm py-1 font-mono"
:class="{ 'text-honey': isCardOpen, 'text-vanilla-400': !isCardOpen }"
>
<div class="mr-4"><span class="text-vanilla-400">lang: </span>{{ repo.language }}</div>
<div class="mr-4"><span class="text-vanilla-400">lang: </span>{{ (repo.languages || [repo.language]).join(', ') }}</div>
<div class="mr-4"><span class="text-vanilla-400">stars: </span>{{ repo.stars_display }}</div>
<div class="mr-4">
<span class="text-vanilla-400">last activity: </span><span>{{ lastModifiedDisplay }}</span>
Expand Down
1 change: 1 addition & 0 deletions data/generated.sample.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"owner": "wp-graphql",
"description": "\ud83d\ude80 GraphQL API for WordPress",
"language": "PHP",
"languages": ["PHP", "JavaScript"],
"slug": "php",
"url": "https://github.com/wp-graphql/wp-graphql",
"stars": 2925,
Expand Down
13 changes: 12 additions & 1 deletion gfi/populate.py
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,16 @@ def get_repository_info(
info["last_modified"] = repository.pushed_at.isoformat()
info["id"] = str(repository.id)

# Fetch languages
rate_limiter.acquire()
languages_dict = repository.languages()
if languages_dict:
sorted_languages = sorted(languages_dict.items(), key=lambda x: x[1], reverse=True)
top_languages = [lang for lang, _ in sorted_languages[:3]]
info["languages"] = top_languages
else:
info["languages"] = [repository.language] if repository.language else []

# get the latest issues with the tag
issues = []
for issue in good_first_issues:
Expand Down Expand Up @@ -264,7 +274,8 @@ def process_repo(identifier):
for result in results:
if result:
REPOSITORIES.append(result)
TAGS[result["language"]] += 1
for lang in result.get("languages", [result["language"]]):
TAGS[lang] += 1

# write to generated JSON files

Expand Down
Loading