-
Notifications
You must be signed in to change notification settings - Fork 30
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
Add support for public repos on travis-ci.com #310
Conversation
This is because public repos can now be on travis-ci.com, but they still require authentication.
I think I need to fix the logic to check if both .com and .org exist and ask in that case. Otherwise we have situations like doctr where the .com "exists" but isn't working https://travis-ci.com/drdoctr/doctr, or conversely, repos like the one in the issue, or drdoctr/travis-ci-com-testing that exist and are run on both (https://travis-ci.com/drdoctr/travis-ci-com-testing, https://travis-ci.org/drdoctr/travis-ci-com-testing). I don't think we need to actually support both, as assumedly this situation won't last forever. |
It doesn't seem easy to detect whether or not we are running in .com or .org for the commit message (travis-ci/travis-ci#8935, travis-ci/travis-ci#7552). I'll play with it some more and see if it's possible to extract it. |
I'm not seeing a way, other than saving it somehow in the configure stage, which is annoying considering it's just for the commit message. |
I guess this is ready for review. I still need to do a lot more testing of it. Unfortunately, Travis never got back to me on my questions, so for now:
|
Travis now has |
Also remove travis_tld(), which is no longer needed (and didn't actually work anyway).
Also print it in green so it is noticeable.
--no-authenticate implies --no-upload. --no-upload no longer doesn't ask for authentication (use --no-authenticate instead). This is because authentication is now needed for other things than uploading the key (particularly, making API requests to travis-ci.com).
…repo or travis-ci.com
I think this is ready to go. The travis-ci.com testing is at https://travis-ci.com/drdoctr/travis-ci-com-testing. I've also split out a new I'll let this sit for a bit in case anyone wants to review/test. Otherwise I'll merge and get a release out, probably tomorrow or Thursday. I'm still unsure but likely #332 should also go in the release. |
Also I have not physically tested this on a private repo. That might be a good thing to do. |
Oh I forgot to add some flags to specify which to use from the command line. Also it looks like there is a bug for repos that aren't activated on either yet (KeyError). |
Fixes #309
This is still not fully tested, and I have a few things that need to be fixed (like the url in the commit message).
I'm unsure if the logic here is correct.
I test travis-ci.org first and then travis-ci.com. The reason is that travis-ci.com always requires authentication, so .org is preferred. However, maybe it should be the other way around, as apparently it's possible to enable both.