stars, watchers, subscribers confusion
Opened this issue · 0 comments
pdurbin commented
Confusingly, "stars" and "watchers" are always the same number:
stars watchers repo
1120 1120 https://github.com/cs50/libcs50
732 732 https://github.com/IQSS/dataverse
http://developer.github.com/changes/2012-9-5-watcher-api/ via https://github.com/orgs/community/discussions/24795 explains that if you want what the GitHub UI calls watchers you should use subscribers_count
instead.
So we can get different numbers like this:
stars watchers repo
1120 138 https://github.com/cs50/libcs50
732 66 https://github.com/IQSS/dataverse
... with the following change:
$ git diff
diff --git a/parse.go b/parse.go
index 49b3fc2..8f35564 100644
--- a/parse.go
+++ b/parse.go
@@ -57,7 +57,7 @@ type Repo struct {
OpenIssues int `json:"open_issues_count"`
Size int `json:"size"`
Forks int `json:"forks_count"`
- Watchers int `json:"watchers_count"`
+ Watchers int `json:"subscribers_count"`
PushedAt time.Time `json:"pushed_at"`
CreatedAt time.Time `json:"created_at"`
Desc string `json:"description"`
However, is this a good idea? Old versions of the data will have the old meaning for "watchers" (same as stars) while new versions of the data will have a new meaning for "watchers" (subscribers). Perhaps we should introduce a new column called "subscribers" and drop the "watchers" column.