INNER CODE UNIT · Go

NewBitbucketSeeder

gabrie30/ghorg · scripts/local-bitbucket/seeder/main.go:72

func NewBitbucketSeeder(username, password, baseURL string) (*BitbucketSeeder, error) {
	// Create Bitbucket client with basic authentication
	log.Printf("Creating Bitbucket client with basic authentication for user: %s", username)

	client := bitbucket.NewBasicAuth(username, password)

	// Set the base URL for on-premise Bitbucket Server
	if baseURL != "" {
		parsedURL, err := url.Parse(baseURL)
		if err != nil {
			return nil, fmt.Errorf("invalid base URL: %w", err)
		}
		client.SetApiBaseURL(*parsedURL)
	}

	// Create HTTP client for Bitbucket Server API calls
	httpClient := &http.Client{
		Timeout: 30 * time.Second,

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…