GitHub rev resolution fails if branch name contains forward slashes
Created by: lguychard
- Visit https://github.com/sourcegraph/sourcegraph/blob/bl/wip/dev/CLA.txt
- Witness "Configure Sourcegraph" instead of "View Repository on Sourcegraph" button
- Witness "View file on Sourcegraph" links to a broken location (https://sourcegraph.com/github.com/sourcegraph/sourcegraph@bl/-/blob/wip/dev/CLA.txt?diff=87a76b38af1dcb657013387504240cc850a8487a), which 404s on sourcegraph.com
This is because our GitHub parseURL()
function relies on DOM inspection (!) through getBranchName()
when the branch name contains forward slashes, and the selectors in getBranchName()
are currently broken. Additionally, I'm pretty sure that even with working selectors there's other bugs lurking there...