Skip to content

Commit 7db6542

Browse files
timvwclaude
andcommitted
fix: remove unused getRemoteType function
Remove getRemoteType() function that became unused after refactoring pr/mr commands to be explicit instead of auto-detecting the platform. The RemoteType enum is still used by checkoutPROrMR(), but the detection function is no longer needed since the command choice (pr vs mr) now determines the platform explicitly. Fixes linter error: func `getRemoteType` is unused (unused) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent c3513cc commit 7db6542

File tree

1 file changed

+0
-18
lines changed

1 file changed

+0
-18
lines changed

main.go

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -95,24 +95,6 @@ const (
9595
RemoteUnknown
9696
)
9797

98-
func getRemoteType() RemoteType {
99-
cmd := exec.Command("git", "remote", "get-url", "origin")
100-
output, err := cmd.Output()
101-
if err != nil {
102-
return RemoteUnknown
103-
}
104-
105-
url := strings.TrimSpace(string(output))
106-
if strings.Contains(url, "github.com") {
107-
return RemoteGitHub
108-
}
109-
if strings.Contains(url, "gitlab.com") || strings.Contains(url, "gitlab") {
110-
return RemoteGitLab
111-
}
112-
113-
return RemoteUnknown
114-
}
115-
11698
func getPRNumber(input string) (string, error) {
11799
// Check if it's a GitHub PR URL
118100
githubRegex := regexp.MustCompile(`^https://github\.com/.*/pull/([0-9]+)`)

0 commit comments

Comments
 (0)