Skip to content

Commit 04ebfdc

Browse files
committed
Adds org support for self hosted ADO
- Adds org support for self hosted ADO Self hosted ADO instances are unable to make use of this exporter due to organization not being set. This change joins the pointer to HostURL with the pointer to organization to replicate the functionality that exists when using cloud ADO.
1 parent 185ede8 commit 04ebfdc

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

azure-devops-client/main.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ func (c *AzureDevopsClient) rest() *resty.Client {
9696
if c.restClient == nil {
9797
c.restClient = resty.New()
9898
if c.HostUrl != nil {
99-
c.restClient.SetHostURL(*c.HostUrl)
99+
c.restClient.SetHostURL(*c.HostUrl + "/" + *c.organization + "/")
100100
} else {
101101
c.restClient.SetHostURL(fmt.Sprintf("https://dev.azure.com/%v/", *c.organization))
102102
}
@@ -115,7 +115,7 @@ func (c *AzureDevopsClient) restVsrm() *resty.Client {
115115
if c.restClientVsrm == nil {
116116
c.restClientVsrm = resty.New()
117117
if c.HostUrl != nil {
118-
c.restClientVsrm.SetHostURL(*c.HostUrl)
118+
c.restClientVsrm.SetHostURL(*c.HostUrl + "/" + *c.organization + "/")
119119
} else {
120120
c.restClientVsrm.SetHostURL(fmt.Sprintf("https://vsrm.dev.azure.com/%v/", *c.organization))
121121
}

0 commit comments

Comments
 (0)