Closed jamesdabbs closed 8 years ago
require "httparty" require "pry" require "./token"
# #
body = { state: "closed" }.to_json
s = HTTParty.patch( "https://api.github.com/repos/jamesdabbs/class-notes/issues/7", headers: { "Authorization" => "token #{Token}", "User-Agent" => "Microsoft Windows" }, body: body
)
a = (File.read FILE)
comment = { body: a }.to_json
c = HTTParty.post( "https://api.github.com/repos/jamesdabbs/class-notes/issues/7/comments", headers: { "Authorization" => "token #{Token}", "User-Agent" => "Microsoft Windows" }, body: comment )
puts c #
Write (and run) a ruby script that
You'll probably want to use
File.read __FILE__
for the script to read its own contents.