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

Add GitHub stars to /distribution #1293

Open
oalders opened this issue Oct 21, 2024 · 2 comments
Open

Add GitHub stars to /distribution #1293

oalders opened this issue Oct 21, 2024 · 2 comments

Comments

@oalders
Copy link
Member

oalders commented Oct 21, 2024

We're already doing something like this for https://fastapi.metacpan.org/distribution/App-perlimports:

{
   "name" : "App-perlimports",
   "bugs" : {
      "github" : {
         "active" : 10,
         "open" : 10,
         "closed" : 105,
         "source" : "https://github.com/perl-ide/App-perlimports"
      }
   },
   "river" : {
      "total" : 0,
      "bucket" : 0,
      "immediate" : 0,
      "bus_factor" : 1
   }
}

If we could add GitHub stars (and watchers?) to the this endpoint we could easily incorporate that into the front end without the extra GitHub requests. Hopefully that would encourage more people to star the repository in question.

@haarg
Copy link
Member

haarg commented Oct 21, 2024

The graphql for this:

query {
    repository(owner: %s, name: %s) {
        stargazerCount: stargazerCount
        watchers: watchers {
            totalCount
        }
    }
}

Could be added to the tickets script rather easily.

@mickeyn
Copy link
Contributor

mickeyn commented Oct 21, 2024

We should be able to add it to the GitHub GraphQL query if it supports this info.

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

3 participants