Skip to content
This repository was archived by the owner on May 9, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ spec:
secretRef:
name: git-sync-secret
interval: 10m
owner: Skarlso
owner: open-component-model
provider: github
existingRepositoryPolicy: adopt
```
Expand Down
17 changes: 0 additions & 17 deletions config/samples/delivery_v1alpha1_sync.yaml

This file was deleted.

11 changes: 0 additions & 11 deletions config/samples/mpas_v1alpha1_repository.yaml

This file was deleted.

2 changes: 1 addition & 1 deletion controllers/delivery/sync_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ func (r *SyncReconciler) reconcile(ctx context.Context, obj *v1alpha1.Sync) erro
if targetBranch == "" && obj.Spec.AutomaticPullRequestCreation {
targetBranch = fmt.Sprintf("branch-%d", time.Now().Unix())
} else if targetBranch == "" && !obj.Spec.AutomaticPullRequestCreation {
err := fmt.Errorf("branch cannot be empty if automatic pull request creation is not enabled")
err := errors.New("branch cannot be empty if automatic pull request creation is not enabled")
status.MarkNotReady(r.EventRecorder, obj, v1alpha1.GitRepositoryPushFailedReason, err.Error())

return err
Expand Down
10 changes: 5 additions & 5 deletions controllers/delivery/sync_controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ func TestSyncReconciler(t *testing.T) {
},
Spec: mpasv1alpha1.RepositorySpec{
Provider: "github",
Owner: "Skarlso",
Owner: "open-component-model",
Credentials: mpasv1alpha1.Credentials{
SecretRef: v1.LocalObjectReference{
Name: secret.Name,
Expand All @@ -72,7 +72,7 @@ func TestSyncReconciler(t *testing.T) {
},
CommitTemplate: v1alpha1.CommitTemplate{
TargetBranch: "main",
Name: "Skarlso",
Name: "open-component-model",
Email: "[email protected]",
Message: "This is my message",
},
Expand Down Expand Up @@ -130,7 +130,7 @@ func TestSyncReconcilerIsSkippedIfDigestIsAlreadyPresent(t *testing.T) {
},
CommitTemplate: v1alpha1.CommitTemplate{
TargetBranch: "main",
Name: "Skarlso",
Name: "open-component-model",
Email: "[email protected]",
Message: "This is my message",
},
Expand Down Expand Up @@ -192,7 +192,7 @@ func TestSyncReconcilerWithAutomaticPullRequest(t *testing.T) {
},
Spec: mpasv1alpha1.RepositorySpec{
Provider: "github",
Owner: "Skarlso",
Owner: "open-component-model",
Credentials: mpasv1alpha1.Credentials{
SecretRef: v1.LocalObjectReference{
Name: secret.Name,
Expand Down Expand Up @@ -222,7 +222,7 @@ func TestSyncReconcilerWithAutomaticPullRequest(t *testing.T) {
},
CommitTemplate: v1alpha1.CommitTemplate{
TargetBranch: "main",
Name: "Skarlso",
Name: "open-component-model",
Email: "[email protected]",
Message: "This is my message",
},
Expand Down