Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How do the contribution circle calculated? #42

Closed
dukechain2333 opened this issue Oct 16, 2022 · 3 comments
Closed

How do the contribution circle calculated? #42

dukechain2333 opened this issue Oct 16, 2022 · 3 comments

Comments

@dukechain2333
Copy link

dukechain2333 commented Oct 16, 2022

Hi

I am not a front-end guy so I was really surprised when I see my circle here. Most of my repos are for Python and Jupyter-notebook. I really have no idea why the other part and html part took so much space.

Could you shed some light on how those contributions are calculated?

Thanks a lot!

image

@dukechain2333
Copy link
Author

dukechain2333 commented Oct 16, 2022

To make some contrast, contribution statics from another tool is like this, which seems more fit to my status.

image

@yoshi389111
Copy link
Owner

Hi dukechain2333. Thanks for visiting my repository.

What this chart represents is which languages your commits over the past year have contributed to.
It does not represent the language used in your repository.

Each commit has a target repository.
Each repository has a primary language.

Each commit is calculated as a contribution to the primary language of the target repository.

This information is retrieved via GitHub's GraphQL API.

The query is as follows:

query {
  user(login: "dukechain2333") {
    contributionsCollection {
      commitContributionsByRepository(maxRepositories: 100) {
        repository {
          nameWithOwner
          primaryLanguage {
            name
          }
        }
        contributions {
          totalCount
        }
      }
    }
  }
}

Results are as follows (public only):

{
  "data": {
    "user": {
      "contributionsCollection": {
        "commitContributionsByRepository": [
          {
            "repository": {
              "nameWithOwner": "enligencelab/enligencelab.github.io",
              "primaryLanguage": {
                "name": "HTML"
              }
            },
            "contributions": {
              "totalCount": 224
            }
          },
          {
            "repository": {
              "nameWithOwner": "dukechain2333/dukechain2333",
              "primaryLanguage": null
            },
            "contributions": {
              "totalCount": 179
            }
          },
          {
            "repository": {
              "nameWithOwner": "dukechain2333/BigData-Develop-Course",
              "primaryLanguage": {
                "name": "Scala"
              }
            },
            "contributions": {
              "totalCount": 4
            }
          },
          {
            "repository": {
              "nameWithOwner": "enligencelab/.github",
              "primaryLanguage": null
            },
            "contributions": {
              "totalCount": 3
            }
          },
          {
            "repository": {
              "nameWithOwner": "dukechain2333/IBM-Data-Science-Certificate-Capstone",
              "primaryLanguage": {
                "name": "Jupyter Notebook"
              }
            },
            "contributions": {
              "totalCount": 3
            }
          },
          {
            "repository": {
              "nameWithOwner": "dukechain2333/BigData-Develop-Course-ShortPeriod",
              "primaryLanguage": {
                "name": "Scala"
              }
            },
            "contributions": {
              "totalCount": 3
            }
          },
          {
            "repository": {
              "nameWithOwner": "dukechain2333/TranslHero",
              "primaryLanguage": {
                "name": "Python"
              }
            },
            "contributions": {
              "totalCount": 3
            }
          },
          {
            "repository": {
              "nameWithOwner": "dukechain2333/EasyVocab",
              "primaryLanguage": {
                "name": "HTML"
              }
            },
            "contributions": {
              "totalCount": 3
            }
          },
          {
            "repository": {
              "nameWithOwner": "dukechain2333/HBase-Develop-Course",
              "primaryLanguage": {
                "name": "Java"
              }
            },
            "contributions": {
              "totalCount": 2
            }
          },
          {
            "repository": {
              "nameWithOwner": "dukechain2333/OperationDash",
              "primaryLanguage": {
                "name": "Python"
              }
            },
            "contributions": {
              "totalCount": 1
            }
          },
          {
            "repository": {
              "nameWithOwner": "dukechain2333/BaiduTranslate-Terminal",
              "primaryLanguage": {
                "name": "Python"
              }
            },
            "contributions": {
              "totalCount": 1
            }
          },
          {
            "repository": {
              "nameWithOwner": "liyupi/rubbish-yingxiaohao",
              "primaryLanguage": {
                "name": "JavaScript"
              }
            },
            "contributions": {
              "totalCount": 1
            }
          }
        ]
      }
    }
  }
}
Repo Contrib Lang
enligencelab/enligencelab.github.io 224 HTML
dukechain2333/dukechain2333 179 null
dukechain2333/BigData-Develop-Course 4 Scale
enligencelab/.github 3 null
dukechain2333/IBM-Data-Science-Certificate-Capstone 3 Jupyter Notebook
dukechain2333/BigData-Develop-Course-ShortPeriod 3 Scala
dukechain2333/TranslHero 3 Python
dukechain2333/EasyVocab 3 HTML
dukechain2333/HBase-Develop-Course 2 Java
dukechain2333/OperationDash 1 Python
dukechain2333/BaiduTranslate-Terminal 1 Python
liyupi/rubbish-yingxiaohao 1 JavaScript

@dukechain2333
Copy link
Author

That helps a lot. Thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants