fabric8io / fabric8-generator

a jboss forge add on for the fabric8 upstream and SaaS generator wizards
Apache License 2.0
1 stars 12 forks source link

Filtering already imported repo before retuning from GithubImportPickRepositoriesStep #40

Closed corinnekrych closed 7 years ago

corinnekrych commented 7 years ago

we need to handle already imported repo that a little better - e.g. filtering out imported repos maybe atm the we just return with an empty result:

[null,null,null,null,{"warnings":[]},null,null]
jstrachan commented 7 years ago

when we query github for the list of repos, we could also query the BuildConfig objects from openshift via...

openshiftClient.buildConfigs().inNamespace(userNamespace).list();

then for each one, find their git repo URLs and filter them out of the resulting list of repos to import.

We may wanna cache the above results in a Cache (see the various other CacheManager stuff in forge) to speed up repeated calls to get/validate the repo