diff --git a/alfred-project-manager-1.5.0.alfredworkflow b/alfred-project-manager-1.5.0.alfredworkflow index a3641c3..7a5c09d 100644 Binary files a/alfred-project-manager-1.5.0.alfredworkflow and b/alfred-project-manager-1.5.0.alfredworkflow differ diff --git a/repo.go b/repo.go index dcdcd03..139830d 100644 --- a/repo.go +++ b/repo.go @@ -42,14 +42,15 @@ func gitOriginAt(path string) (string, error) { func urlForOrigin(origin string) string { if strings.HasPrefix(origin, "git@github.com") { + start := strings.Index(origin, ":") // format: git@github.com:user/repo.git end := len(origin) - 1 // sometimes the .git can be missing - indexOfLastPeriod := strings.LastIndex(origin, ".") + indexOfLastPeriod := strings.LastIndex(origin[start+1:], ".") if indexOfLastPeriod != -1 { end = indexOfLastPeriod } - repo := origin[strings.Index(origin, ":")+1 : end] + repo := origin[start+1 : end] url := fmt.Sprintf("https://github.com/%s", repo) return url } else if strings.HasPrefix(origin, "http") { diff --git a/workflow/alfred-project-manager b/workflow/alfred-project-manager index 2bf8588..ad0d209 100755 Binary files a/workflow/alfred-project-manager and b/workflow/alfred-project-manager differ