scottopell / todo

0 stars 0 forks source link

Run custom hound server for github code #7

Closed scottopell closed 8 years ago

scottopell commented 9 years ago

Make public repos available via hound code search.

Convert github api output to hound configuration using jq

scottopell commented 9 years ago

working: curl -s https://api.github.com/users/scottopell/repos\?type\=sources | jq '{ "max-concurrent-indexers": "1", dbpath: "data", repos: [.[] | {(.name) : { url: .html_url }} ]}'

best guess: curl -s https://api.github.com/users/scottopell/repos\?type\=sources | jq '{ "max-concurrent-indexers": "1", dbpath: "data", repos: { (.[] | (.name) : { url: .html_url } ) } }'

scottopell commented 9 years ago

Ideal output: https://github.com/etsy/Hound/blob/master/config-example.json

{
    "max-concurrent-indexers" : 2,
    "dbpath" : "data",
    "repos" : {
        "project1" : {
            "url" : "https://www.github.com/YourOrganization/RepoOne.git"
        },
        "project2" : {
            "url" : "https://www.github.com/YourOrganization/RepoOne.git",
        }
    }
}
scottopell commented 8 years ago

finally. https://gist.github.com/scottopell/15ced492834487a762f65dc39a16091c