Skip to content

increased the amount of prog languages shown from 1-3 - #2763

Open
fragan7dsouza wants to merge 1 commit into
DeepSourceCorp:masterfrom
fragan7dsouza:my-first-contribution
Open

increased the amount of prog languages shown from 1-3#2763
fragan7dsouza wants to merge 1 commit into
DeepSourceCorp:masterfrom
fragan7dsouza:my-first-contribution

Conversation

@fragan7dsouza

Copy link
Copy Markdown

this change resolves #2246 increasing the programming languages shown from 1 to 3

Copilot AI review requested due to automatic review settings June 23, 2026 07:29
@vercel

vercel Bot commented Jun 23, 2026

Copy link
Copy Markdown

@fragantrio is attempting to deploy a commit to the DeepSource Team on Vercel.

A member of the Team first needs to authorize it.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 thread gfi/populate.py
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 thread pages/language/[slug].vue
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 thread gfi/test_data.py
Comment on lines +83 to +89
# Mock languages
mock_repo.languages.return_value = [
("Python", 1000),
("TypeScript", 500),
("JavaScript", 300),
("HTML", 100),
]
Comment thread gfi/test_data.py
}
}

rate_limiter = GitHubRateLimiter(mock_client, requests_per_second=100.0)
@fragan7dsouza
fragan7dsouza force-pushed the my-first-contribution branch from 88e40ab to 20ef811 Compare June 23, 2026 07:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

Increase amount of programming languages shown from Top 1 to Top 3.

2 participants