 
 
   # Org
-  robot.respond /gho/i, (msg) ->
+  robot.respond /gho$/i, (msg) ->
     getOrgDetails msg, process.env.HUBOT_GITHUB_ORG
 
 

    msg.reply "There was an error getting the teams for organization: #{orgName}" if err
    msg.send "* <https://github.com/org/#{orgName}/teams/#{team.name}|#{team.name}> - #{team.description}" for team in res unless err and res.length == 0

getOrgRepos = (msg, orgName, repoType) ->
  ensureConfig msg.send
  github.repos.getFromOrg org: orgName, type: repoType, per_page: 100, (err, res) ->

  robot.respond /gho list teams/i, (msg) ->
    getOrgTeams msg, process.env.HUBOT_GITHUB_ORG

  robot.respond /gho create team ["'](.+)["']$/i, (msg) ->
    unless isAdmin msg.message.user
      msg.reply "Sorry, only admins can use this github organization command"
    else
      createOrgTeam msg, process.env.HUBOT_GITHUB_ORG, msg.match[1]

  # robot.respond /gho create team ["'](.+)["'] with (users|user|repo|repos) ["'](.+)["'] (and|plus|&) (repo|repos|user|users|member|members) ["'](.+)["']/i, (msg) ->

  # problems with regex matching here
  # robot.respond /gho create team ["'](.+)["'] with repos ["'](.+)["']$/i, (msg) ->
  #   unless isAdmin msg.message.user
  #     msg.reply "Sorry, only admins can use this github organization command"
  #   else
  #     createOrgTeamWithRepos msg, process.env.HUBOT_GITHUB_ORG, msg.match[1], msg.match[2]


  # Org.Repos
  robot.respond /gho list (repos|repositories)/i, (msg) ->
    getOrgRepos msg, process.env.HUBOT_GITHUB_ORG, "all"

