manage collaborators on an app
sharing:add EMAIL add a collaborator to an app
Example:
$ heroku sharing:add collaborator@example.com Adding collaborator@example.com to myapp collaborators... done
# File lib/heroku/command/sharing.rb, line 38 def add unless email = shift_argument error("Usage: heroku sharing:add EMAIL\nMust specify EMAIL to add sharing.") end validate_arguments! action("Adding #{email} to #{app} collaborators") do api.post_collaborator(app, email) end end
sharing list collaborators on an app
Example:
$ heroku sharing === myapp Collaborators collaborator@example.com email@example.com
# File lib/heroku/command/sharing.rb, line 20 def index validate_arguments! # this is never empty, as it always includes the owner collaborators = api.get_collaborators(app).body styled_header("#{app} Collaborators") styled_array(collaborators.map {|collaborator| collaborator["email"]}) end
sharing:remove EMAIL remove a collaborator from an app
Example:
$ heroku sharing:remove collaborator@example.com Removing collaborator@example.com to myapp collaborators... done
# File lib/heroku/command/sharing.rb, line 58 def remove unless email = shift_argument error("Usage: heroku sharing:remove EMAIL\nMust specify EMAIL to remove sharing.") end validate_arguments! action("Removing #{email} from #{app} collaborators") do api.delete_collaborator(app, email) end end
sharing:transfer EMAIL transfer an app to a new owner
Example:
$ heroku sharing:transfer collaborator@example.com Transferring myapp to collaborator@example.com... done
# File lib/heroku/command/sharing.rb, line 78 def transfer unless email = shift_argument error("Usage: heroku sharing:transfer EMAIL\nMust specify EMAIL to transfer an app.") end validate_arguments! action("Transferring #{app} to #{email}") do api.put_app(app, "transfer_owner" => email) end end