DevLeonardoCommunity / github-stats

Aggregating and displaying YOUR GitHub Stats in meaningful metrics (we learn web development in the meantime)
https://public-github-stats.vercel.app
MIT License
71 stars 37 forks source link

feat: :heavy_plus_sign: Add total received stars #45

Closed dimassibassem closed 1 year ago

dimassibassem commented 1 year ago

Resolve #17

This pull request addresses issue #17 by enhancing the user profile page to display the total number of stars a user has received on their repositories. The star count excludes forked repositories, providing a more accurate representation of the user's contributions and achievements.

To achieve this, the GraphQL query userProfileQuery has been updated to filter out forked repositories using the isFork field in the repositories connection. This ensures that only the stars given to the user's own repositories are counted in the displayed star count.

Here's a snippet of the updated code:

export const userProfileQuery = `
query ($login: String!) {
    user(login: $login) {
        login
        avatarUrl
        bio
        name
        followers {
            totalCount
        } 
        starsCount: repositories(first: 0, isFork: false) {
            totalCount
        }
    }
}
`;

image

vercel[bot] commented 1 year ago

Someone is attempting to deploy a commit to a Personal Account owned by @Balastrong on Vercel.

@Balastrong first needs to authorize it.