-
Notifications
You must be signed in to change notification settings - Fork 187
Description
Currently, the listx implementation treats HTTP, HTTPS, and SSH schemes as separate cases. This leads to duplicated logic, scattered conditionals, and makes it harder to extend or maintain scheme-related behavior.
There is a TODO in the codebase indicating that these schemes should be combined into a single enum, but this refactor has not yet been implemented.
// TODO (listx): Combine HTTPS, HTTP, and SSH schemes into a single enum. in prow/pkg/git/v2/client_factory.go
Proposed Change
Introduce a single enum (e.g. SchemeType) to represent supported schemes:
-
HTTP
-
HTTPS
-
SSH
-
Replace existing scheme-specific branching logic with enum-based handling
I’m happy to work on this issue and submit a PR if this approach is acceptable. Please let me know if there are any preferred patterns or constraints to follow.
cc: @petr-muller , @matthyx