-
Notifications
You must be signed in to change notification settings - Fork 431
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Display last GitHub status message if cloning fails #929
Conversation
The status message would look like this: $ curl -sL https://status.github.com/api/last-message.json | jq -r .[]
good
Everything operating normally.
2017-01-13T16:55:51Z |
@@ -63,6 +71,16 @@ def dir | |||
def config | |||
data.config | |||
end | |||
|
|||
def github? | |||
if md = /[^@]+@(.*):/.match(data.source_url) |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
def github? | ||
if md = /[^@]+@(.*):/.match(data.source_url) | ||
# we will assume that the URL looks like one for git+ssh; e.g., [email protected]:travis-ci/travis-build.git | ||
host = md[1] |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
else | ||
host = URI.parse(data.source_url).host | ||
end | ||
host.downcase == 'github.com' || host.end_with?('.github.ghproxy.top') |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎷 🐻
Resolves travis-ci/travis-ci#1430.