Thanks for the pointers. I created 
https://issues.apache.org/jira/browse/SLING-7176 to track this.
Feel free to extend it with your own ideas.

> On 4. Oct 2017, at 11:49, Bertrand Delacretaz <[email protected]> wrote:
> 
> Hi,
> 
> On Wed, Oct 4, 2017 at 9:57 AM, Robert Munteanu <[email protected]> wrote:
>> ...The 'canonical' way of doing this is by accessing https://api.github.co
>> m/orgs/${github_org}/repos and filtering based on the repo name...
> 
> Note that this would require handling multiple pages, it looks like
> the max number of results is 200:
> 
> $ curl -s "https://api.github.com/orgs/apache/repos?page=1&per_page=200";
> | grep html_url | wc -l
>     200
> $ curl -s "https://api.github.com/orgs/apache/repos?page=1&per_page=210";
> | grep html_url | wc -l
>     200
> $ curl -s "https://api.github.com/orgs/apache/repos?page=2&per_page=210";
> | grep html_url | wc -l
>     200
> 
> But otherwise grabbing that is easy in our Groovy templates, something like:
> 
> URL url = new 
> URL("https://api.github.com/orgs/apache/repos?page=1&per_page=100";)
> def json = new groovy.json.JsonSlurper().parseText(url.text)
> json.each ( {
>    it ->
>    if(it.full_name.contains("struts")) {
>        println it.html_url
>    }
> })
> 
> -Bertrand

Reply via email to