Allow to exclude organizations in config #199
Conversation
Hey @drogus, maybe this could be done another way. Instead of filters orgs, which means we are chasing a rabbit, why not base it on the max number of repos in an org? Eg. we sync the first 1k and display a message on the service hook page that there is more than 1k so we could not sync all repos? |
@joshk I'm fine with such a solution, but we would need to do another request for each organization, because there is no repositories count on the orgs list. It does not seem to be a big overhead, though. |
@@ -111,7 +111,8 @@ def normalize(data) | |||
:sponsors => { :platinum => [], :gold => [], :workers => {} }, | |||
:redis => { :url => 'redis://localhost:6379' }, | |||
:repository_filter => { :include => [/^rails\/rails/], :exclude => [/\/rails$/] }, | |||
:encryption => (Travis.env == 'development' ? { key: 'secret'*10 } : {}) | |||
:encryption => (Travis.env == 'development' ? { key: 'secret'*10 } : {}), | |||
:organization_filter => { :repositories_limit => 1000 } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe rename this sync
instead of organization_filter
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@joshk it may be confusing then, I would take "sync.repositories_limit" as a limit of all the repositories you can fetch for a user
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
then i think you need to use sync.organizations.repository_limit
, wdyt?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
seems good!
This looks a lot nicer, nice and generic :) |
…ter.repositories_limit
Allow to exclude organizations in config
It's pretty similar to exclude/include repos list. The purpose is to allow excluding huge organizations, which is the problem in travis-ci/travis-ci#837