Skip to content

TODO (listx): Combine HTTPS, HTTP, and SSH schemes into a single enum. #589

@tsj-30

Description

@tsj-30

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

Metadata

Metadata

Assignees

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