audit: fix GitHub repository audit

In the data returned from the GitHub API, “watchers_count” is actually the
number of stars.

See https://developer.github.com/v3/activity/starring/#starring-vs-watching

Closes Homebrew/homebrew#44477.

Signed-off-by: Xu Cheng <xucheng@me.com>
This commit is contained in:
Daniel Lee Harple 2015-09-30 12:59:00 -04:00 committed by Xu Cheng
parent d3d1b6f0fe
commit 6b3b398858

View File

@ -477,7 +477,7 @@ class FormulaAuditor
end end
problem "GitHub fork (not canonical repository)" if metadata["fork"] problem "GitHub fork (not canonical repository)" if metadata["fork"]
if (metadata["forks_count"] < 10) && (metadata["watchers_count"] < 10) && if (metadata["forks_count"] < 10) && (metadata["subscribers_count"] < 10) &&
(metadata["stargazers_count"] < 20) (metadata["stargazers_count"] < 20)
problem "GitHub repository not notable enough (<10 forks, <10 watchers and <20 stars)" problem "GitHub repository not notable enough (<10 forks, <10 watchers and <20 stars)"
end end