Skip to content
This repository has been archived by the owner on May 19, 2021. It is now read-only.

Star count discrepancy #40

Closed
Mottie opened this issue Mar 24, 2016 · 3 comments
Closed

Star count discrepancy #40

Mottie opened this issue Mar 24, 2016 · 3 comments

Comments

@Mottie
Copy link

Mottie commented Mar 24, 2016

The result shown in the autocomplete dropdown has a star count that doesn't match the actual repository star count.

awesome-autocomplete

The screenshot shows github-awesome-autocomplete having 375 stars, while the "Unstar" button is showing 281.

@rayrutjes
Copy link
Member

This is weird, here is a hit resulting from a query:

{
                    "name": "github-awesome-autocomplete",
                    "owner": "algolia",
                    "description": "Add instant search capabilities to GitHub's search bar",
                    "organization": "algolia",
                    "watchers": 375,
                    "forks": 45,
                    "fork": false,
                    "language": "JavaScript",
                    "full_name": "algolia/github-awesome-autocomplete",
                    "stars": "4",
                    "objectID": "algolia/github-awesome-autocomplete",

                    [...]
}

You are actually using the watcher value, which also is not accurate.
I think there might be a problem in the algolia robot parsing github?
Stars always equals 4, am I missing something?

@Mottie
Copy link
Author

Mottie commented Mar 24, 2016

If I use GitHub's API: https://api.github.com/search/repositories?q=github-awesome-autocomplete

The count is correct:

{
  "total_count": 2,
  "incomplete_results": false,
  "items": [
    {
      "id": 28206168,
      "name": "github-awesome-autocomplete",
      "full_name": "algolia/github-awesome-autocomplete",
      "owner": {
        "login": "algolia",
        "id": 2034458,
        "avatar_url": "https://avatars.githubusercontent.com/u/2034458?v=3",
        "gravatar_id": "",
        "url": "https://api.github.com/users/algolia",
        "html_url": "https://github.com/algolia",
        "followers_url": "https://api.github.com/users/algolia/followers",
        "following_url": "https://api.github.com/users/algolia/following{/other_user}",
        "gists_url": "https://api.github.com/users/algolia/gists{/gist_id}",
        "starred_url": "https://api.github.com/users/algolia/starred{/owner}{/repo}",
        "subscriptions_url": "https://api.github.com/users/algolia/subscriptions",
        "organizations_url": "https://api.github.com/users/algolia/orgs",
        "repos_url": "https://api.github.com/users/algolia/repos",
        "events_url": "https://api.github.com/users/algolia/events{/privacy}",
        "received_events_url": "https://api.github.com/users/algolia/received_events",
        "type": "Organization",
        "site_admin": false
      },
      "private": false,
      // ... collapsed
      "homepage": "https://github.algolia.com",
      "size": 12987,
      "stargazers_count": 282, // <--- now it's 282
      "watchers_count": 282,
      "language": "JavaScript",
      "has_issues": true,
      "has_downloads": true,
      "has_wiki": true,
      "has_pages": false,
      "forks_count": 23,
      "mirror_url": null,
      "open_issues_count": 15,
      "forks": 23,
      "open_issues": 15,
      "watchers": 282,
      "default_branch": "master",
      "score": 87.3987
    },

@redox
Copy link
Contributor

redox commented Mar 24, 2016

Yeah it's related to #31 -> the way we're importing the data (from https://www.githubarchive.org/) month over month don't take into account the "unstars/unwatch". Unfortunately, we cannot call the GitHub API to fix it, it's way too much restricted in terms of API calls/day.

Not yet sure what we could do to improve it.

I'm closing it in favor of #31

@redox redox closed this as completed Mar 24, 2016
@rayrutjes rayrutjes mentioned this issue Jun 28, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants