mirror of
https://github.com/dkhamsing/open-source-ios-apps.git
synced 2024-12-23 01:32:21 +03:00
[script] add get lic
This commit is contained in:
parent
27dce1cdec
commit
40a4ab00d4
22
.github/osia_get_lic.rb
vendored
Normal file
22
.github/osia_get_lic.rb
vendored
Normal file
@ -0,0 +1,22 @@
|
||||
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
|
Loading…
Reference in New Issue
Block a user