Skip to content

Conversation

@saishmungase
Copy link
Contributor

@saishmungase saishmungase commented Oct 24, 2025

Description

This PR implements the correct logic for handling forked repositories.

When a repository is a fork, its stats (stars, forks, description) are often not what we want to display. This implementation correctly fetches the parent repository's details by making a second API call to the repo's specific URL.

It then uses the parent's stats (stargazers_count, forks_count, description, etc.) for building the final project object. This ensures that contributions to popular open-source projects are accurately represented.

This PR also includes a small fix to ensure the parent's description is used for the project, not the fork's.

Before

first-hackerrank

After

second-hackerrank

Fixes : #155

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.

Bug: Forked repository stats are sourced from the user's fork instead of the upstream parent repository

1 participant