Class: Hyrb::Tasks::Github::CreateRepo
- Inherits:
-
Hyrb::Task
- Object
- Hyrb::Task
- Hyrb::Tasks::Github::CreateRepo
- Defined in:
- lib/hyrb/tasks/github.rb
Instance Attribute Summary
Attributes inherited from Hyrb::Task
Instance Method Summary collapse
Methods inherited from Hyrb::Task
depends, #initialize, prompt, prompts, #run_before
Constructor Details
This class inherits a constructor from Hyrb::Task
Instance Method Details
#run(env) ⇒ Object
46 47 48 49 50 51 52 53 54 55 56 57 58 |
# File 'lib/hyrb/tasks/github.rb', line 46 def run(env) if env.github_repo = env.github_client.repository?(env.project.repo_path) say "Github repo #{env.project.repo_path} exists", :yellow else # TODO: gitignore, teams env.github_repo = env.github_client.create(env.project.repo_name, { organization: env.project.github_org, description: env.project.description, private: true, }) say "Created Github repo #{env.project.repo_path}", :green end end |