     if repos.length > 0
       callback undefined, repos
     else  
-      gh = new GitHubApi version: "3.0.0"
-      gh.repos.getFromOrg {org: "communities"}, (err, repos) ->
-        repos = _.filter repos, (repo) -> repo.name != 'gitcommunities.com'
+      ghRepos.getFromOrg {org: "communities"}, (err, repos) ->
+        repos = _.filter repos, (repo) -> repo.name != "gitcommunities.com"
         communitiesFetchFuncs = []
         _.each repos, (repo) ->
           communitiesFetchFuncs.push async.apply getCommunity, repo.name

    #     return
    gitty.commit __dirname + "/repos/#{name}", "initial", (err, data) ->
      gitty.remote.add __dirname + "/repos/#{name}", "origin", "https://github.com/communities/#{name}.git", (err, data) ->
        console.log "origin was add", err, data
        gitty.push __dirname + "/repos/#{name}", "origin", "master", (err, data) ->
          if err
            callback err

gitty   = require "gitty"

GitHubApi = require "github"
ghRepos   = new GitHubApi({version: "3.0.0"}).repos


redis = require "redis"
rc    = redis.createClient()
