1
0
mirror of https://github.com/dkhamsing/open-source-ios-apps.git synced 2024-12-27 00:42:43 +01:00
App-Open-Source-per-iPhone-.../.github/osia_get_lic.rb

23 lines
343 B
Ruby
Raw Normal View History

2016-06-13 16:16:06 +02:00
require 'octokit'
require 'awesome_print'
g = ARGV[0]
if g.nil?
puts "Usage: get_lic <repo> \n i.e. get_lic dkhamsing/BrandColors"
exit
end
client = Octokit
begin
r = client.repo g, accept: 'application/vnd.github.drax-preview+json'
ap r
lic = r[:license][:key]
print "Result: "
ap lic
rescue => e
puts "Error: #{e}"
end