Problem
Currently, the Webhook component in Harbor CLI lacks consistent URL normalization. While other components like Registry and Scanner automatically handle missing protocols, Webhooks currently only validate the format but do not automatically prepend https:// or trim trailing slashes.
Proposed Solution
Standardize URL handling for Webhooks by:
- Applying utils.FormatUrl to the webhook create and webhook edit CLI commands.
- Updating the interactive terminal forms (pkg/views/webhook) to normalize input before validation.
- Regenerating documentation to reflect these changes.
Benefits
- Consistent UX: Users don't need to manually type https:// for every webhook.
- Fewer Errors: Common formatting mistakes are handled automatically.
- Cleaner Codebase: Standardizes input handling across all components.
Problem
Currently, the Webhook component in Harbor CLI lacks consistent URL normalization. While other components like Registry and Scanner automatically handle missing protocols, Webhooks currently only validate the format but do not automatically prepend https:// or trim trailing slashes.
Proposed Solution
Standardize URL handling for Webhooks by:
Benefits