Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gitlab supportedDomain modifies the domain name and returns an url #175

Open
enekofb opened this issue Dec 28, 2022 · 0 comments
Open

gitlab supportedDomain modifies the domain name and returns an url #175

enekofb opened this issue Dec 28, 2022 · 0 comments
Labels
bug Something isn't working gitlab Gitlab related issues and PRs

Comments

@enekofb
Copy link

enekofb commented Dec 28, 2022

Describe the bug

Gitlab SupportedDomain function implementation
returns a URL which seems to be breaking the SupportedDomain contract

It also updates the field overwriting the original value

To Reproduce

Create a test case like the following

	clientOptions := []gitprovider.ClientOption{}

	clientOptions = append(clientOptions, gitprovider.WithDomain("gitlab.git.xx"))

	c, err := gitlab.NewClient(os.Getenv("GITLAB_ENTERPRISE_TOKEN"), "", clientOptions...)
	checkErr(err)
	log.Printf("client supported domain: %s", c.SupportedDomain())

it will output a domain name value which is an URL

2022/12/28 22:44:08 client supported domain: https://gitlab.git.xx```

<!--
Steps to reproduce the behaviour
-->

### Expected behavior

A clear and concise description of what you expected to happen.

Given the previous example, I would expect to return a domain name instead of a url

```bash
2022/12/28 22:44:08 client supported domain: gitlab.git.xx```

### Additional context

- Go version: go version go1.19.1 darwin/arm64
- Git provider: gitlab
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working gitlab Gitlab related issues and PRs
Projects
None yet
Development

No branches or pull requests

2 participants