increased the amount of prog languages shown from 1-3 - #2763
Open
fragan7dsouza wants to merge 1 commit into
Open
increased the amount of prog languages shown from 1-3#2763fragan7dsouza wants to merge 1 commit into
fragan7dsouza wants to merge 1 commit into
Conversation
|
@fragantrio is attempting to deploy a commit to the DeepSource Team on Vercel. A member of the Team first needs to authorize it. |
There was a problem hiding this comment.
Pull request overview
This PR aims to resolve #2246 by expanding language handling across the pipeline so each repository can surface up to three top languages (instead of only the primary language), and enabling browsing/filtering by those additional languages.
Changes:
- Update the data population script to fetch/store the top 3 repo languages and corresponding slugs, and count tags across all stored languages.
- Update the language page filtering logic to match repositories by any of their language slugs (primary or secondary).
- Update repo cards to display multiple languages, and add a unit test covering the new languages fields.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| pages/language/[slug].vue | Filters repositories by slugs (multi-language support) instead of only the single slug. |
| gfi/populate.py | Fetches/stores top 3 languages + slugs; updates tag counting to include all stored languages. |
| components/RepoBox.vue | Displays repo.languages (comma-separated) when present, otherwise falls back to repo.language. |
| gfi/test_data.py | Adds a test validating get_repository_info() language/languages/slug/slugs behavior. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+177
to
+193
| # Fetch top 3 languages | ||
| rate_limiter.acquire() | ||
| try: | ||
| langs = list(repository.languages()) | ||
| langs_sorted = sorted(langs, key=itemgetter(1), reverse=True) | ||
| top_langs = [l[0] for l in langs_sorted[:3]] | ||
| except Exception as e: | ||
| logger.warning("Failed to fetch languages for {}/{}: {}", owner, name, e) | ||
| top_langs = [] | ||
|
|
||
| if not top_langs: | ||
| top_langs = [repository.language] | ||
|
|
||
| info["language"] = top_langs[0] | ||
| info["languages"] = top_langs | ||
| info["slug"] = slugify(top_langs[0], replacements=SLUGIFY_REPLACEMENTS) | ||
| info["slugs"] = [slugify(lang, replacements=SLUGIFY_REPLACEMENTS) for lang in top_langs] |
Comment on lines
+13
to
+17
| const repositories = Repositories.filter(repository => { | ||
| if (repository.slugs) { | ||
| return repository.slugs.includes(route.params.slug) | ||
| } | ||
| return repository.slug === route.params.slug |
Comment on lines
+83
to
+89
| # Mock languages | ||
| mock_repo.languages.return_value = [ | ||
| ("Python", 1000), | ||
| ("TypeScript", 500), | ||
| ("JavaScript", 300), | ||
| ("HTML", 100), | ||
| ] |
| } | ||
| } | ||
|
|
||
| rate_limiter = GitHubRateLimiter(mock_client, requests_per_second=100.0) |
fragan7dsouza
force-pushed
the
my-first-contribution
branch
from
June 23, 2026 07:41
88e40ab to
20ef811
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
this change resolves #2246 increasing the programming languages shown from 1 to 3