fix(webhook): normalize endpoint URL before validation#800
fix(webhook): normalize endpoint URL before validation#800PrasunaEnumarthy wants to merge 5 commits intogoharbor:mainfrom
Conversation
Signed-off-by: PrasunaEnumarthy <eswari.prasuna@gmail.com>
NucleoFusion
left a comment
There was a problem hiding this comment.
lgtm
Thanks for the contribution
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #800 +/- ##
=========================================
- Coverage 10.99% 8.89% -2.10%
=========================================
Files 173 270 +97
Lines 8671 13169 +4498
=========================================
+ Hits 953 1171 +218
- Misses 7612 11880 +4268
- Partials 106 118 +12 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
bupd
left a comment
There was a problem hiding this comment.
https://github.com/goharbor/harbor-cli/actions/runs/24009325611?pr=800
Ah, looks like there is linting issues @PrasunaEnumarthy - please fix the lint issues
Thanks for the contribution
Signed-off-by: PrasunaEnumarthy <eswari.prasuna@gmail.com>
Signed-off-by: PrasunaEnumarthy <eswari.prasuna@gmail.com>
Signed-off-by: PrasunaEnumarthy <eswari.prasuna@gmail.com>
…x/webhook-endpoint-normalization
|
@bupd @NucleoFusion The only remaining failing check is |
Description
Normalize webhook
--endpoint-urlvalues before validating them in the non-interactive create and edit commands.Other Harbor CLI commands normalize user-provided URLs using
FormatUrl(...)before validation. Previously, webhook create/edit commands validated raw input directly, which could reject valid inputs likeexample.com/webhookthat should be normalized tohttps://example.com/webhook.Type of Change
Changes
--endpoint-urlusingFormatUrl(...)before validation inwebhook create--endpoint-urlusingFormatUrl(...)before validation inwebhook edit