softprops / hubcaps

a rust interface for github
http://docs.rs/hubcaps
MIT License
279 stars 68 forks source link

Count of repo watchers is not provided #239

Open awaitlink opened 4 years ago

awaitlink commented 4 years ago

Presently hubcaps offers these fields regarding watchers, stars, and forks count in hubcaps::repositories::Repo:

https://github.com/softprops/hubcaps/blob/d2d61ac6540eaae6ebb874c5026ce1d18eeec55f/src/repositories.rs#L515-L517

However, note that for legacy support reasons, watchers_count is the count of stars as well:

https://api.github.com/repos/softprops/hubcaps
{
  "forks_count": 41,
  "stargazers_count": 166,
  "watchers_count": 166,

  "subscribers_count": 4
}

Instead, subscribers_count should be offered, since that is the actual repo watcher count.

The same might need to be done in hubcaps::search::ReposItem as well.

JosephLing commented 4 years ago

Can I take this up?