Search code examples
gitgithubcapistranogit-fork

Getting forked repos in capistrano


My requirement is simple: I need to find out which all forked repos exists from the main repo during cap deploy.

I have tried quite a few ways but always hit a roadblock somewhere: * I tried using github API, but OAuth2 seems to be a problem for me and I dont feel basic auth is secure enough for this. * I am not getting a git command that I can execute on the deploy machine to get this data.

Any kind of pointers will be helpful.


Solution

  • This isn't much of an answer, but I'll give it a shot. I'd suggest that you start by simply writing a ruby app which will list your forks. Since Capistrano is just a ruby app built on Rake, you should be able to reuse your code in Capistrano. I'd suggest that you use the Ruby API: https://github.com/octokit/octokit.rb

    I hope this helps!