Skip to content
This repository was archived by the owner on Jun 27, 2019. It is now read-only.

using highline to morph password #28

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions csv_issues_to_github.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
require 'octokit'
require 'faraday'
require 'csv'

require 'highline/import'
# BEGIN INTERACTIVE SECTION
# Comment out this section (from here down to where the end is marked) if you want to use this interactively

Expand All @@ -16,8 +16,7 @@
abort("You need to supply a username. Thank you, come again.")
end

puts "Password:"
password = gets.chomp
password = ask("Password: ") { |q| q.echo = "*" }
if password == ""
abort("You need to supply a password. Thank you, come again.")
end
Expand Down Expand Up @@ -64,7 +63,7 @@
csv.each do |row|
client.create_issue(org_repo, row['title'], row['description'], options = {
:assignee => row['assignee_username'],
:labels => [row['label1'],row['label2'],row['label3']]}) #Add or remove label columns here.
:labels => [row['label1'],row['label2'],row['label3'],row['label4'],row['label5']]}) #Add or remove label columns here.
puts "Imported issue: #{row['title']}"
end