Skip to content

Add NewGitLabClientWithOptions() for constructing GitLab client

Stan Hu requested to merge sh-response-header-timeout-env into main

What does this MR do?

Add NewGitLabClientWithOptions() for constructing GitLab client

Previously we had to add a new constructor every time we wanted to add a new parameter for NewGitLabClient(). This commit introduces a new constructor NewGitLabClientWithOptions() to use the Go functional options pattern, which allows configuration of the network config in preparation for customizing the response header timeout.

Why was this MR needed?

What's the best way to test this MR?

What are the relevant issue numbers?

Merge request reports