Sha256: ca11026913581bbc733973cbdaacc67160b6b8a2b74c1f97e22a5cef14705d8c
Contents?: true
Size: 791 Bytes
Versions: 4
Compression:
Stored size: 791 Bytes
Contents
# frozen_string_literal: true module Dude module Setup class Github def initialize(prompt) @prompt = prompt end def call(settings:) settings[:github][:token] = setup_token settings end private attr_reader :prompt def setup_token puts <<~HEREDOC You need to create personal token #{'1.'.bold} Log in to https://github.com/settings/tokens #{'2.'.bold} Copy the token and paste it below HEREDOC if prompt.yes?(Dude::Config.style_prompt('Open Github token creation page in your browser?')) `open https://github.com/settings/tokens` end prompt.ask(Dude::Config.style_prompt('Github token:'), required: true) end end end end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
dude-cli-2.1.0 | lib/dude/setup/github.rb |
dude-cli-2.1.0.alpha5 | lib/dude/setup/github.rb |
dude-cli-2.1.0.alpha4 | lib/dude/setup/github.rb |
dude-cli-2.1.0.alpha3 | lib/dude/setup/github.rb |