gist logs: print last url
Closes Homebrew/homebrew#25514. Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
This commit is contained in:
parent
2f679153ee
commit
0b3d7ddf71
@ -20,8 +20,10 @@ def gist_logs f
|
|||||||
url = create_gist(files)
|
url = create_gist(files)
|
||||||
|
|
||||||
if ARGV.include? '--new-issue'
|
if ARGV.include? '--new-issue'
|
||||||
new_issue(repo, "#{f.name} failed to build on #{MACOS_FULL_VERSION}", url)
|
url = new_issue(repo, "#{f.name} failed to build on #{MACOS_FULL_VERSION}", url)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
ensure puts url if url
|
||||||
end
|
end
|
||||||
|
|
||||||
def load_logs name
|
def load_logs name
|
||||||
@ -43,12 +45,11 @@ def append_doctor files
|
|||||||
end
|
end
|
||||||
|
|
||||||
def create_gist files
|
def create_gist files
|
||||||
puts (url = post('gists', {'public' => true, 'files' => files})['html_url'])
|
post('gists', {'public' => true, 'files' => files})['html_url']
|
||||||
url
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def new_issue repo, title, body
|
def new_issue repo, title, body
|
||||||
puts post("repos/#{repo}/issues", {'title' => title, 'body' => body})['html_url']
|
post("repos/#{repo}/issues", {'title' => title, 'body' => body})['html_url']
|
||||||
end
|
end
|
||||||
|
|
||||||
def http
|
def http
|
||||||
|
Loading…
x
Reference in New Issue
Block a user