readthedocs / readthedocs.org

The source code that powers readthedocs.org
https://readthedocs.org/
MIT License
8.03k stars 3.58k forks source link

Clicking "Build version" tries to build non-existant branch #10793

Closed dracos closed 1 year ago

dracos commented 1 year ago

Details

Expected Result

As I don't have a "Default branch" set under "Advanced Settings", I expected that clicking "Build version" button on the front page or the Builds page would build the default branch for the repository (which is "main").

Actual Result

It tries to build the master branch, which does not exist.

It works fine for pushes to GitHub triggering builds, it's only the manual button in the admin that does this.

stsewd commented 1 year ago

Hi, this is because you don't have your account linked to GitHub, RTD makes use of the GitHub API in order to find the default branch automatically, if you don't want to link your account, you can change the default branch from the Advanced Settings menu.

dracos commented 1 year ago

Oh, weird, wonder why I hadn't done that. Thanks!