Skip to content

Commit 152705e

Browse files
committed
fix
Signed-off-by: Robert Cerven <rcerven@redhat.com>
1 parent d9ec12d commit 152705e

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

webhooks/component_webhook.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -214,6 +214,9 @@ func (r *ComponentWebhook) ValidateUpdate(ctx context.Context, oldObj, newObj ru
214214
if newComp.Spec.Source.GitSource != nil && oldComp.Spec.Source.GitSource != nil && (newComp.Spec.Source.GitSource.URL != oldComp.Spec.Source.GitSource.URL) {
215215
return fmt.Errorf(appstudiov1alpha1.GitSourceUpdateError, *(newComp.Spec.Source.GitSource))
216216
}
217+
if newComp.Spec.Source.GitURL != oldComp.Spec.Source.GitURL {
218+
return fmt.Errorf(appstudiov1alpha1.GitSourceUpdateError, *(&newComp.Spec.Source.GitURL))
219+
}
217220
if len(newComp.Spec.BuildNudgesRef) != 0 {
218221
err := r.validateBuildNudgesRefGraph(ctx, newComp.Spec.BuildNudgesRef, newComp.Namespace, newComp.Name)
219222
if err != nil {

0 commit comments

Comments
 (0)