drdoctr / doctr

A tool for automatically deploying docs from Travis CI to GitHub pages.
https://drdoctr.github.io
MIT License
107 stars 30 forks source link

Issues with travis-ci.com #335

Closed asmeurer closed 5 years ago

asmeurer commented 5 years ago

There are some issues with travis-ci.com that weren't fixed at https://github.com/drdoctr/doctr/pull/310

It looks like repos that aren't activated on either lead to a KeyError.

Also, apparently the travis-ci.com API has a key to indicate if a repo is also on .org, but it is currently broken. See https://travis-ci.community/t/active-on-org-from-api-v3-is-wrong/1199.

asmeurer commented 5 years ago

Apparently it is possible to get the key from .com without authentication https://github.com/travis-ci/travis-ci/issues/9954. So I need to refactor a lot of what I did. Fortunately it will be a lot simpler, and less cumbersome on the user.

asmeurer commented 5 years ago

It seems repos are now automatically seen as "active" on travis-ci.com. On .org, they are inactive by default unless you check the box on travis-ci.org. So if someone has a repo enabled on both, it means they manually enabled it on travis-ci.org. Should we still ask in that case which one they want to use, or assume it means .org in that case?

It's possible this behavior may change in the future as Travis continues its migration.

asmeurer commented 5 years ago

Oh I guess that's because it uses the GitHub apps integration, which by default allows access to all repos. So Travis just assumes that if it has access to a repo in the apps integration that it is "enabled". You can also restrict it.

So it makes sense to keep the "ask on both" logic, because both actually means they enabled the travis-ci.com apps integration.

asmeurer commented 5 years ago

I am almost done here. I need to fix some issue with --token on private repositories. I also need to do real Travis tests on a private repo to make sure the encrypted key/token work properly.

asmeurer commented 5 years ago

I keep hitting API limits testing private repos. I don't know if there is some issue with my code or if this is just Travis trying to scan all my repos again. Either way, it is making the testing go slowly.