Skip to content
This repository has been archived by the owner on May 10, 2018. It is now read-only.

Allow to exclude organizations in config #199

Merged
merged 2 commits into from Mar 25, 2013
Merged

Conversation

drogus
Copy link
Contributor

@drogus drogus commented Mar 24, 2013

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

@joshk
Copy link
Contributor

joshk commented Mar 24, 2013

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?

@drogus
Copy link
Contributor Author

drogus commented Mar 25, 2013

@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 }
Copy link
Contributor

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?

Copy link
Contributor Author

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

Copy link
Contributor

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?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

seems good!

@joshk
Copy link
Contributor

joshk commented Mar 25, 2013

This looks a lot nicer, nice and generic :)

drogus added a commit that referenced this pull request Mar 25, 2013
Allow to exclude organizations in config
@drogus drogus merged commit 3c67759 into master Mar 25, 2013
@sarahhodne sarahhodne deleted the ps-exclude-organizations branch March 26, 2013 10:43
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
2 participants