Skip to content

Commit

Permalink
change url parse method
Browse files Browse the repository at this point in the history
Co-authored-by: Johan Lindell <[email protected]>
  • Loading branch information
rerikson and lindell authored Jun 28, 2024
1 parent c1092ae commit 5f059d7
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion internal/scm/azuredevops/repository.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,13 @@ func (a *AzureDevOps) convertRepo(repo *git.GitRepository) repository {
if a.SSHAuth {
cloneURL = *repo.SshUrl
} else {
cloneURL = fmt.Sprintf("https://%s@%s", a.pat, strings.TrimPrefix(*repo.RemoteUrl, "https://"))
u, err := url.Parse(*repo.RemoteUrl)

Check failure on line 16 in internal/scm/azuredevops/repository.go

View workflow job for this annotation

GitHub Actions / golangci-lint

[golangci] reported by reviewdog 🐶 undefined: url Raw Output: internal/scm/azuredevops/repository.go:16:13: undefined: url

Check failure on line 16 in internal/scm/azuredevops/repository.go

View workflow job for this annotation

GitHub Actions / golangci-lint

[golangci] reported by reviewdog 🐶 undefined: url Raw Output: internal/scm/azuredevops/repository.go:16:13: undefined: url

Check failure on line 16 in internal/scm/azuredevops/repository.go

View workflow job for this annotation

GitHub Actions / Test (macos-latest)

undefined: url

Check failure on line 16 in internal/scm/azuredevops/repository.go

View workflow job for this annotation

GitHub Actions / Build

undefined: url

Check failure on line 16 in internal/scm/azuredevops/repository.go

View workflow job for this annotation

GitHub Actions / Fuzzing

undefined: url

Check failure on line 16 in internal/scm/azuredevops/repository.go

View workflow job for this annotation

GitHub Actions / Test (ubuntu-latest)

undefined: url

Check failure on line 16 in internal/scm/azuredevops/repository.go

View workflow job for this annotation

GitHub Actions / Test and Coverage

undefined: url
if err != nil {
return repository{}, errors.Wrap(err, "could not parse Azure Devops remote url")

Check failure on line 18 in internal/scm/azuredevops/repository.go

View workflow job for this annotation

GitHub Actions / golangci-lint

[golangci] reported by reviewdog 🐶 undefined: errors Raw Output: internal/scm/azuredevops/repository.go:18:25: undefined: errors

Check failure on line 18 in internal/scm/azuredevops/repository.go

View workflow job for this annotation

GitHub Actions / golangci-lint

[golangci] reported by reviewdog 🐶 undefined: errors Raw Output: internal/scm/azuredevops/repository.go:18:25: undefined: errors

Check failure on line 18 in internal/scm/azuredevops/repository.go

View workflow job for this annotation

GitHub Actions / Test (macos-latest)

undefined: errors

Check failure on line 18 in internal/scm/azuredevops/repository.go

View workflow job for this annotation

GitHub Actions / Build

undefined: errors

Check failure on line 18 in internal/scm/azuredevops/repository.go

View workflow job for this annotation

GitHub Actions / Fuzzing

undefined: errors

Check failure on line 18 in internal/scm/azuredevops/repository.go

View workflow job for this annotation

GitHub Actions / Test (ubuntu-latest)

undefined: errors

Check failure on line 18 in internal/scm/azuredevops/repository.go

View workflow job for this annotation

GitHub Actions / Test and Coverage

undefined: errors
}
// Set the token as https://ACCESSTOKEN@remote-url
u.User = url.User(a.pat)

Check failure on line 21 in internal/scm/azuredevops/repository.go

View workflow job for this annotation

GitHub Actions / golangci-lint

[golangci] reported by reviewdog 🐶 undefined: url) (typecheck) Raw Output: internal/scm/azuredevops/repository.go:21:12: undefined: url) (typecheck) "github.com/lindell/multi-gitter/internal/scm/azuredevops" ^

Check failure on line 21 in internal/scm/azuredevops/repository.go

View workflow job for this annotation

GitHub Actions / Test (macos-latest)

undefined: url

Check failure on line 21 in internal/scm/azuredevops/repository.go

View workflow job for this annotation

GitHub Actions / Build

undefined: url

Check failure on line 21 in internal/scm/azuredevops/repository.go

View workflow job for this annotation

GitHub Actions / Fuzzing

undefined: url

Check failure on line 21 in internal/scm/azuredevops/repository.go

View workflow job for this annotation

GitHub Actions / Test (ubuntu-latest)

undefined: url

Check failure on line 21 in internal/scm/azuredevops/repository.go

View workflow job for this annotation

GitHub Actions / Test and Coverage

undefined: url
cloneURL = u.String()
}

defaultBranch := ""
Expand Down

0 comments on commit 5f059d7

Please sign in to comment.