sindresorhus/refined-github

[BUG] `See this view on the default branch` points to non-existing `master` #2728

webknjaz posted onGitHub

You can observe this here: https://github.com/ansible/pylibssh/blob/devel/README.rst.

The repo default branch is devel, master doesn't exist. Clicking the button redirects to https://github.com/ansible/pylibssh/blob/master/README.rst with 404.


Did that repo change branch recently? It works correctly for me, maybe it's just cached: https://github.com/ansible/pylibssh/blob/e3569b2e9446dd05c51ade137040bc7b546cb7e6/README.rst

<img width="357" alt="Screen Shot 2020-01-23 at 00 00 52" src="https://user-images.githubusercontent.com/1402241/72915791-70ba1c80-3d73-11ea-9e83-2c3bd71594aa.png">

posted by fregante about 5 years ago
posted by fregante about 5 years ago

Yeah that's it ansible/pylibssh@e3569b2

No. That's not it. The repo had devel as its main branch from the very beginning. It was just wrong copy-paste when I first added the Travis CI badge there which I fixed. master never existed.

posted by webknjaz about 5 years ago

We don’t default to master, GitHub tells us via the API or via the DOM. If GitHub tells us master then at some point that was the default branch (according to GitHub)

https://github.com/sindresorhus/refined-github/blob/master/source/libs/get-default-branch.ts

posted by fregante about 5 years ago

How can I debug it with DevTools? I've tried inspecting it by sticking debugger in different places but only found out that this func returns master and the implication seems minified so it's hard to put debug inside...

posted by webknjaz about 5 years ago

You can try emptying the cache at the bottom of the options page.

posted by fregante about 5 years ago

Thanks! Clearing the cache helped. Still have no idea how it got there, though.

posted by webknjaz about 5 years ago

This is kind of weird, for me the link just appeared on a new repo I visited on the root, pointing to the same page. master was the right branch, but it should't appear when you're already on master. I cleared the cache and I couldn't reproduce.

posted by fregante about 5 years ago

Closing in favor of the above clearer issue

posted by fregante about 5 years ago

Fund this Issue

$0.00
Funded

Pull requests