dlvhdr / gh-dash

A beautiful CLI dashboard for GitHub 🚀
https://dlvhdr.github.io/gh-dash
MIT License
7.06k stars 208 forks source link

[BUG] repoPaths are case sensitive #308

Open Sanix-Darker opened 12 months ago

Sanix-Darker commented 12 months ago

Describe the bug The repoName should lower down along side withthe given path because TheAuthor/repo1 seems not equal to Theauthor/repo1, which is not true because those two redirect to the same project on github.

To Reproduce Steps to reproduce the behavior:

  1. Just set a repo name in the repoPath section with MAJ or MIN, dash will crash when you try to run a custom command saying the path for the given repo is not available.

Expected behavior Should not crash an resolve the repo(path and name) even with upper or lower cases + more details on the error maybe ?

    if !ok {
        return func() tea.Msg {
            return constants.ErrMsg{Err: fmt.Errorf(
                "Failed to find local path for repo %s from path: '%s'",
                repoName, repoPath,
            )}
        }
    }

https://github.com/dlvhdr/gh-dash/blob/555c5d9f5671b8fdf77a2dca9056ef8a8e86a316/ui/modelUtils.go#L112

Screenshots Screenshot from 2023-10-11 09-03-18

Desktop (please complete the following information):