mirror of
https://github.com/kubevela/kubevela.git
synced 2026-07-29 10:21:29 +00:00
ExtractRevision parsed the last hyphen segment as the revision number without validating the name shape, so a bareword like "5" returned 5,nil and any name lacking a trailing v-prefixed segment silently mis-parsed instead of erroring. Mirror the existing ExtractRevisionNum guards: error with ErrBadRevision when there is no delimiter or the last segment is not v-prefixed. Extend the colocated bad-name test cases accordingly. Signed-off-by: Anas Khan <83116240+anxkhn@users.noreply.github.com>