<commit_before>package create

import (
	"fmt"

	"github.com/giantswarm/awstpr"
)

func (s *Service) bucketName(cluster awstpr.CustomObject) string {
	accountID := s.awsConfig.AccountID()
	region := cluster.Spec.AWS.Region
	customerID := cluster.Spec.Cluster.Customer.ID

	name := fmt.Sprintf("%s-g8s-%s-%s", accountID, region, customerID)

	return name
}

func (s *Service) bucketObjectDirPath(cluster awstpr.CustomObject) string {
	clusterID := cluster.Spec.Cluster.Cluster.ID
	return fmt.Sprintf("%s/cloudconfig", clusterID)
}

func (s *Service) bucketObjectFullDirPath(cluster awstpr.CustomObject) string {
	bucketName := s.bucketName(cluster)

	dirPath := s.bucketObjectDirPath(cluster)
	return fmt.Sprintf("%s/%s", bucketName, dirPath)
}

func (s *Service) bucketObjectName(cluster awstpr.CustomObject, prefix string) string {
	dirPath := s.bucketObjectDirPath(cluster)
	return fmt.Sprintf("%s/%s", dirPath, prefix)
}
<commit_msg>Moves region to last segment of bucket name<commit_after>package create

import (
	"fmt"

	"github.com/giantswarm/awstpr"
)

func (s *Service) bucketName(cluster awstpr.CustomObject) string {
	accountID := s.awsConfig.AccountID()
	customerID := cluster.Spec.Cluster.Customer.ID
	region := cluster.Spec.AWS.Region

	name := fmt.Sprintf("%s-g8s-%s-%s", accountID, customerID, region)

	return name
}

func (s *Service) bucketObjectDirPath(cluster awstpr.CustomObject) string {
	clusterID := cluster.Spec.Cluster.Cluster.ID
	return fmt.Sprintf("%s/cloudconfig", clusterID)
}

func (s *Service) bucketObjectFullDirPath(cluster awstpr.CustomObject) string {
	bucketName := s.bucketName(cluster)

	dirPath := s.bucketObjectDirPath(cluster)
	return fmt.Sprintf("%s/%s", bucketName, dirPath)
}

func (s *Service) bucketObjectName(cluster awstpr.CustomObject, prefix string) string {
	dirPath := s.bucketObjectDirPath(cluster)
	return fmt.Sprintf("%s/%s", dirPath, prefix)
}

{'fraction_non_alphanumeric': 0.13354363827549948, 'fraction_numerical': 0.0010515247108307045, 'mean_word_length': 5.74822695035461, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2859850', 'n_tokens_mistral': 637, 'n_tokens_neox': 626, 'n_words': 133}