Created
December 29, 2014 23:19
-
-
Save kevinhughes27/14fb223a2cd3560f966e to your computer and use it in GitHub Desktop.
One time I didn't have internet so I wrote up a bunch of issues in json and then used this script to push them up to Github
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'json' | |
require 'octokit' | |
Octokit.configure do |c| | |
c.login = 'pickle27' | |
c.password = '<github token>' | |
end | |
repo = ARGV[0] | |
file = ARGV[1] | |
# json file | |
# [ | |
# "title": "", | |
# "label": "", | |
# "desc": "" | |
# ] | |
issues = JSON.parse(File.read(file)) | |
issues.each do |issue| | |
puts Octokit.create_issue(repo, issue['title'], issue['desc'], label: issue['label']) | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment