class Heroku::Command::Orgs

manage organization accounts

Public Instance Methods

default() click to toggle source

HIDDEN: orgs:default

# File lib/heroku/command/orgs.rb, line 50
def default
  error("orgs:default is no longer in the CLI.\nUse the HEROKU_ORGANIZATION environment variable instead.\nSee https://devcenter.heroku.com/articles/develop-orgs#default-org for more info.")
end
index() click to toggle source

orgs

lists the orgs that you are a member of.

# File lib/heroku/command/orgs.rb, line 14
def index
  response = org_api.get_orgs.body

  orgs = []
  response.fetch('organizations', []).each do |org|
    orgs << org
    org.fetch('child_orgs', []).each do |child|
      orgs << child
    end
  end

  orgs.map! do |org|
    name = org["organization_name"]
    t = []
    t <<  org["role"]
    [name, t.join(', ')]
  end

  if orgs.empty?
    display("You are not a member of any organizations.")
  else
    styled_array(orgs)
  end
end
open() click to toggle source

orgs:open –org ORG

opens the org interface in a browser

# File lib/heroku/command/orgs.rb, line 44
def open
  launchy("Opening web interface for #{org}", "https://dashboard.heroku.com/orgs/#{org}/apps")
end