zielu / GitToolBox

GitToolBox IntelliJ plugin
GNU General Public License v3.0
604 stars 71 forks source link

[BUG] Open File Link navigates to a 404 page in GitHub #473

Closed DRigby26 closed 1 year ago

DRigby26 commented 1 year ago

Describe the bug When clicking "Open File Link" the GitHub URL that opens is incorrect and causes a 404. From what I can see, it looks like the URL is missing a branch name.

To Reproduce Steps to reproduce the behavior:

  1. Go to a file in a local git project that's hosted on GitHub
  2. Right click anywhere in the file then click "Open File Link" under GitToolBox
  3. The webpage that opens is a 404 page

Expected behavior The file in GitHub should be opened in browser

Plugin version 500.0.6+213

IDE version WebStorm 2023.1

zielu commented 1 year ago

Hi, do you have not pushed commits on the branch ?

DRigby26 commented 1 year ago

Ah nope, it looks like that was the problem. Thank you!

zielu commented 1 year ago

I will be adding better handling for such cases - if there are not pushed commits - open branch link instead of commit link.