MCPcopy
hub / github.com/eth0izzle/shhgit / ProcessRepositories

Function ProcessRepositories

main.go:16–35  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

14var session = core.GetSession()
15
16func ProcessRepositories() {
17 threadNum := *session.Options.Threads
18
19 for i := 0; i < threadNum; i++ {
20 go func(tid int) {
21
22 for {
23 repositoryId := <-session.Repositories
24 repo := core.GetRepository(session, repositoryId)
25
26 if repo.GetPermissions()["pull"] &&
27 uint(repo.GetStargazersCount()) >= *session.Options.MinimumStars &&
28 uint(repo.GetSize()) < *session.Options.MaximumRepositorySize {
29
30 processRepositoryOrGist(repo.GetCloneURL())
31 }
32 }
33 }(i)
34 }
35}
36
37func ProcessGists() {
38 threadNum := *session.Options.Threads

Callers 1

mainFunction · 0.85

Calls 2

GetRepositoryFunction · 0.92
processRepositoryOrGistFunction · 0.85

Tested by

no test coverage detected