Add GITHUB_FORK_ALLOWLIST.
This commit is contained in:
parent
7bd2f511c4
commit
d0094d8bda
@ -96,12 +96,19 @@ module SharedAudits
|
|||||||
"#{tag} is a GitLab pre-release."
|
"#{tag} is a GitLab pre-release."
|
||||||
end
|
end
|
||||||
|
|
||||||
|
GITHUB_FORK_ALLOWLIST = %w[
|
||||||
|
variar/klogg
|
||||||
|
].freeze
|
||||||
|
|
||||||
def github(user, repo)
|
def github(user, repo)
|
||||||
metadata = github_repo_data(user, repo)
|
metadata = github_repo_data(user, repo)
|
||||||
|
|
||||||
return if metadata.nil?
|
return if metadata.nil?
|
||||||
|
|
||||||
return "GitHub fork (not canonical repository)" if metadata["fork"]
|
if metadata["fork"] && !GITHUB_FORK_ALLOWLIST.include?("#{user}/#{repo}")
|
||||||
|
return "GitHub fork (not canonical repository)"
|
||||||
|
end
|
||||||
|
|
||||||
if (metadata["forks_count"] < 30) && (metadata["subscribers_count"] < 30) &&
|
if (metadata["forks_count"] < 30) && (metadata["subscribers_count"] < 30) &&
|
||||||
(metadata["stargazers_count"] < 75)
|
(metadata["stargazers_count"] < 75)
|
||||||
return "GitHub repository not notable enough (<30 forks, <30 watchers and <75 stars)"
|
return "GitHub repository not notable enough (<30 forks, <30 watchers and <75 stars)"
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user