Retry merging once after 5 seconds.
This commit is contained in:
parent
68e0c5f904
commit
cd03c0f86d
@ -39,6 +39,8 @@ module Cask
|
|||||||
|
|
||||||
print "#{Formatter.url(pr["html_url"])} "
|
print "#{Formatter.url(pr["html_url"])} "
|
||||||
|
|
||||||
|
retried = false
|
||||||
|
|
||||||
begin
|
begin
|
||||||
GitHub.merge_pull_request(
|
GitHub.merge_pull_request(
|
||||||
tap.full_name,
|
tap.full_name,
|
||||||
@ -48,6 +50,12 @@ module Cask
|
|||||||
)
|
)
|
||||||
puts "#{Tty.bold}#{Formatter.success("✔")}#{Tty.reset}"
|
puts "#{Tty.bold}#{Formatter.success("✔")}#{Tty.reset}"
|
||||||
rescue
|
rescue
|
||||||
|
unless retried
|
||||||
|
retried = true
|
||||||
|
sleep 5
|
||||||
|
retry
|
||||||
|
end
|
||||||
|
|
||||||
puts "#{Tty.bold}#{Formatter.error("✘")}#{Tty.reset}"
|
puts "#{Tty.bold}#{Formatter.error("✘")}#{Tty.reset}"
|
||||||
failed << pr["html_url"]
|
failed << pr["html_url"]
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user