Skip to content

Conversation

@ferhatelmas
Copy link
Contributor

Assuming go-git is a library and so it's better to use minimal dependencies. github.com/elazarl/goproxy is only used by tests, adding a tiny implementation enables us to drop it.

Copilot AI review requested due to automatic review settings December 12, 2025 10:52
@ferhatelmas ferhatelmas changed the title refactor(plumbing): implement http proxy via std to drop dependency refactor(plumbing): drop goproxy dependency Dec 12, 2025
@ferhatelmas ferhatelmas force-pushed the proxy branch 2 times, most recently from 239a04c to c71304b Compare December 12, 2025 10:54
@ferhatelmas ferhatelmas changed the title refactor(plumbing): drop goproxy dependency *: drop goproxy dependency Dec 12, 2025
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR refactors the test infrastructure by replacing the external github.com/elazarl/goproxy dependency with a custom minimal HTTP/HTTPS proxy implementation using only Go's standard library. This aligns with the library's goal of minimizing dependencies, as the proxy was only used in tests.

Key Changes:

  • Implemented a custom testProxy type with HTTP and HTTPS (CONNECT) proxying capabilities
  • Removed the github.com/elazarl/goproxy dependency from go.mod and go.sum
  • Unified the setupHTTPProxy and setupHTTPSProxy functions into a single newTestProxy constructor

Reviewed changes

Copilot reviewed 2 out of 3 changed files in this pull request and generated 4 comments.

File Description
plumbing/transport/http/proxy_test.go Replaced goproxy dependency with custom testProxy implementation that handles both HTTP and HTTPS (CONNECT) proxy requests
go.mod Removed github.com/elazarl/goproxy dependency
go.sum Removed goproxy dependency checksums

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@ferhatelmas ferhatelmas force-pushed the proxy branch 5 times, most recently from 8d0073a to 77b773f Compare December 12, 2025 11:11
@pjbgf
Copy link
Member

pjbgf commented Dec 19, 2025

@ferhatelmas overall LGTM. Please rebase.

Relates to #1413.

Assuming go-git is a library and
so it's better to use minimal dependencies.
github.com/elazarl/goproxy is only used
by tests, adding a tiny implementation
enables us to drop it.

Signed-off-by: ferhat elmas <elmas.ferhat@gmail.com>
@ferhatelmas
Copy link
Contributor Author

@pjbgf rebased

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants