Class: Recipes::Github

Inherits:
Rails::AppBuilder
  • Object
show all
Defined in:
lib/potassium/recipes/github.rb

Instance Method Summary collapse

Instance Method Details

#askObject



4
5
6
7
8
9
10
# File 'lib/potassium/recipes/github.rb', line 4

def ask
  github_repo_create = answer(:github) do
    Ask.confirm('Do you want to create a Github repository?')
  end
  set(:github_repo, github_repo_create)
  setup_repo if github_repo_create
end

#createObject



19
20
21
22
23
24
# File 'lib/potassium/recipes/github.rb', line 19

def create
  return unless selected?(:github_repo)

  create_github_repo
  copy_file '../assets/.github/pull_request_template.md', '.github/pull_request_template.md'
end

#setup_repoObject



12
13
14
15
16
17
# File 'lib/potassium/recipes/github.rb', line 12

def setup_repo
  setup_repo_private
  setup_repo_org
  setup_repo_name
  set(:github_access_token, get_access_token)
end