Skip to content

[feature]: Standardize URL normalization across Webhook commands and views #828

@vishnukothakapu

Description

@vishnukothakapu

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions