Skip to content

Instantly share code, notes, and snippets.

@kevinhughes27
Created December 29, 2014 23:19
Show Gist options
  • Save kevinhughes27/14fb223a2cd3560f966e to your computer and use it in GitHub Desktop.
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
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