Skip to content

Commit 8dcded3

Browse files
committed
refactor: rename bitbucket to bitbucket_cloud
Signed-off-by: Ushira Dineth <[email protected]>
1 parent 43345d1 commit 8dcded3

15 files changed

+50
-50
lines changed

api/v1alpha1/commitstatus_types.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ type CommitStatusSpec struct {
4848
Phase CommitStatusPhase `json:"phase"` // pending, success, failure
4949
// (Github: error, failure, pending, success)
5050
// (Gitlab: pending, running, success, failed, canceled)
51-
// (Bitbucket: INPROGRESS, STOPPED, SUCCESSFUL, FAILED)
51+
// (Bitbucket Cloud: INPROGRESS, STOPPED, SUCCESSFUL, FAILED)
5252

5353
// Url is a URL that the user can follow to see more details about the status
5454
// +kubebuilder:validation:Optional

api/v1alpha1/common_types.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ type GitLab struct {
2828
Domain string `json:"domain,omitempty"`
2929
}
3030

31-
// Bitbucket is a Bitbucket SCM provider configuration. It is used to configure the Bitbucket settings.
31+
// Bitbucket is a Bitbucket Cloud SCM provider configuration. It is used to configure the Bitbucket Cloud settings.
3232
type Bitbucket struct{}
3333

3434
// Forgejo is a Forgejo SCM provider configuration. It is used to configure the Forgejo settings.
@@ -94,7 +94,7 @@ type ForgejoRepo struct {
9494
Name string `json:"name"`
9595
}
9696

97-
// BitbucketRepo is a repository in Bitbucket, identified by its workspace and repository.
97+
// BitbucketRepo is a repository in Bitbucket Cloud, identified by its workspace and repository.
9898
type BitbucketRepo struct {
9999
// Workspace is the workspace of the repository.
100100
// +kubebuilder:validation:Required

api/v1alpha1/scmprovider_types.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ type ScmProviderSpec struct {
4848
// Forgejo required configuration for Forgejo as the SCM provider
4949
Forgejo *Forgejo `json:"forgejo,omitempty"`
5050

51-
// Bitbucket required configuration for Bitbucket as the SCM provider
51+
// Bitbucket required configuration for Bitbucket Cloud as the SCM provider
5252
Bitbucket *Bitbucket `json:"bitbucket,omitempty"`
5353

5454
// Fake required configuration for Fake as the SCM provider

config/crd/bases/promoter.argoproj.io_clusterscmproviders.yaml

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

config/crd/bases/promoter.argoproj.io_gitrepositories.yaml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

config/crd/bases/promoter.argoproj.io_scmproviders.yaml

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/install.yaml

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

internal/controller/argocdcommitstatus_controller.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ import (
4545
promoterv1alpha1 "github.com/argoproj-labs/gitops-promoter/api/v1alpha1"
4646
"github.com/argoproj-labs/gitops-promoter/internal/git"
4747
"github.com/argoproj-labs/gitops-promoter/internal/scms"
48-
"github.com/argoproj-labs/gitops-promoter/internal/scms/bitbucket"
48+
bitbucket_cloud "github.com/argoproj-labs/gitops-promoter/internal/scms/bitbucket_cloud"
4949
"github.com/argoproj-labs/gitops-promoter/internal/scms/fake"
5050
"github.com/argoproj-labs/gitops-promoter/internal/scms/forgejo"
5151
"github.com/argoproj-labs/gitops-promoter/internal/scms/github"
@@ -739,10 +739,10 @@ func (r *ArgoCDCommitStatusReconciler) getGitAuthProvider(ctx context.Context, a
739739
}
740740
return gitlabClient, ps.Spec.RepositoryReference, nil
741741
case scmProvider.GetSpec().Bitbucket != nil:
742-
logger.V(4).Info("Creating Bitbucket git authentication provider")
743-
bitbucketClient, err := bitbucket.NewBitbucketGitAuthenticationProvider(scmProvider, secret)
742+
logger.V(4).Info("Creating Bitbucket Cloud git authentication provider")
743+
bitbucketClient, err := bitbucket_cloud.NewBitbucketCloudGitAuthenticationProvider(scmProvider, secret)
744744
if err != nil {
745-
return nil, ps.Spec.RepositoryReference, fmt.Errorf("failed to create Bitbucket client: %w", err)
745+
return nil, ps.Spec.RepositoryReference, fmt.Errorf("failed to create Bitbucket Cloud client: %w", err)
746746
}
747747
return bitbucketClient, ps.Spec.RepositoryReference, nil
748748
case scmProvider.GetSpec().Forgejo != nil:

internal/controller/changetransferpolicy_controller.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ import (
3030

3131
"github.com/argoproj-labs/gitops-promoter/internal/git"
3232
"github.com/argoproj-labs/gitops-promoter/internal/scms"
33-
"github.com/argoproj-labs/gitops-promoter/internal/scms/bitbucket"
33+
bitbucket_cloud "github.com/argoproj-labs/gitops-promoter/internal/scms/bitbucket_cloud"
3434
"github.com/argoproj-labs/gitops-promoter/internal/scms/fake"
3535
"github.com/argoproj-labs/gitops-promoter/internal/scms/forgejo"
3636
"github.com/argoproj-labs/gitops-promoter/internal/scms/github"
@@ -493,10 +493,10 @@ func (r *ChangeTransferPolicyReconciler) getGitAuthProvider(ctx context.Context,
493493
logger.V(4).Info("Creating Forgejo git authentication provider")
494494
return forgejo.NewForgejoGitAuthenticationProvider(scmProvider, secret), nil
495495
case scmProvider.GetSpec().Bitbucket != nil:
496-
logger.V(4).Info("Creating Bitbucket git authentication provider")
497-
provider, err := bitbucket.NewBitbucketGitAuthenticationProvider(scmProvider, secret)
496+
logger.V(4).Info("Creating Bitbucket Cloud git authentication provider")
497+
provider, err := bitbucket_cloud.NewBitbucketCloudGitAuthenticationProvider(scmProvider, secret)
498498
if err != nil {
499-
return nil, fmt.Errorf("failed to create Bitbucket Auth Provider: %w", err)
499+
return nil, fmt.Errorf("failed to create Bitbucket Cloud Auth Provider: %w", err)
500500
}
501501
return provider, nil
502502
default:

internal/controller/commitstatus_controller.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ import (
2929
"sigs.k8s.io/controller-runtime/pkg/builder"
3030
"sigs.k8s.io/controller-runtime/pkg/predicate"
3131

32-
"github.com/argoproj-labs/gitops-promoter/internal/scms/bitbucket"
32+
bitbucket_cloud "github.com/argoproj-labs/gitops-promoter/internal/scms/bitbucket_cloud"
3333
"github.com/argoproj-labs/gitops-promoter/internal/scms/fake"
3434
"github.com/argoproj-labs/gitops-promoter/internal/scms/forgejo"
3535
"github.com/argoproj-labs/gitops-promoter/internal/settings"
@@ -165,10 +165,10 @@ func (r *CommitStatusReconciler) getCommitStatusProvider(ctx context.Context, co
165165
}
166166
return p, nil
167167
case scmProvider.GetSpec().Bitbucket != nil:
168-
var p *bitbucket.CommitStatus
169-
p, err = bitbucket.NewBitbucketCommitStatusProvider(r.Client, *secret, "")
168+
var p *bitbucket_cloud.CommitStatus
169+
p, err = bitbucket_cloud.NewBitbucketCloudCommitStatusProvider(r.Client, *secret, "")
170170
if err != nil {
171-
return nil, fmt.Errorf("failed to get Bitbucket provider with secret %q: %w", secret.Name, err)
171+
return nil, fmt.Errorf("failed to get Bitbucket Cloud provider with secret %q: %w", secret.Name, err)
172172
}
173173
return p, nil
174174
case scmProvider.GetSpec().Forgejo != nil:

0 commit comments

Comments
 (0)