JetBrains: Warn user when copying a link to a branch that doesn’t exist on the remote
Created by: vdavid
Summary
When the user uses the "Copy link" feature on a branch that's not pushed, the link goes 404. Warning the user and/or letting them link to main
instead would be nice.
Context
We have a {right click on editor} → Sourcegraph → Copy link to file feature

Problem
@courier-new wrote for VS Code, but it also applies to JetBrains: “often, I haven’t published my branch, and I just get an ugly 404 page and end up having to go modify the URL manually.”
Solution
a.) Warn the user when copying a link to a branch that doesn't exist on the default remote b.) If the warning will be a popup that we can customize, offer a “copy link to {default branch} instead” option