func()

in internal/client/bitbucketserver.go [14:32]


func (c *Client) GetBitbucketServerConnection(id string) (*BitbucketServerConnection, error) {
	req, err := http.NewRequest("GET", fmt.Sprintf("%s/plugins/bitbucket_server/connections/%s", c.HostURL, id), nil)
	if err != nil {
		return nil, err
	}

	body, err := c.doRequest(req)
	if err != nil {
		return nil, err
	}

	connection := BitbucketServerConnection{}
	err = json.Unmarshal(body, &connection)
	if err != nil {
		return nil, err
	}

	return &connection, nil
}