Skip to content

Commit e137de1

Browse files
Merge pull request #23 from rcchopra/hyp-17516-v3
Hyp 17516 Functions renamed
2 parents 05f9d07 + 2ef1462 commit e137de1

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

scm/driver/github/github.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,13 @@ import (
2121
// New returns a new GitHub API client.
2222
// This function maintains backward compatibility and creates a client without proxy.
2323
func New(uri string) (*scm.Client, error) {
24-
return NewWithProxy(uri, "")
24+
return NewWithOptionalProxy(uri, "")
2525
}
2626

2727
// NewWithProxy returns a new GitHub API client with optional proxy support.
2828
// If proxyURL is empty or nil, no proxy will be used.
2929
// If proxyURL is provided, all HTTP requests will be routed through the specified proxy.
30-
func NewWithProxy(uri, proxyURL string) (*scm.Client, error) {
30+
func NewWithOptionalProxy(uri, proxyURL string) (*scm.Client, error) {
3131
base, err := url.Parse(uri)
3232
if err != nil {
3333
return nil, err
@@ -57,7 +57,7 @@ func NewWithProxy(uri, proxyURL string) (*scm.Client, error) {
5757
client.Reviews = &reviewService{client}
5858
client.Users = &userService{client}
5959
client.Webhooks = &webhookService{client}
60-
60+
6161
client.Client.Client = &http.Client{Transport: http.DefaultTransport}
6262

6363
if proxyURL != "" {
@@ -82,8 +82,8 @@ func NewDefault() *scm.Client {
8282
// default api.github.com address with optional proxy support.
8383
// If proxyURL is empty or nil, no proxy will be used.
8484
// If proxyURL is provided, all HTTP requests will be routed through the specified proxy.
85-
func NewDefaultWithProxy(proxyURL string) *scm.Client {
86-
client, _ := NewWithProxy("https://api.github.com", proxyURL)
85+
func NewDefaultWithOptionalProxy(proxyURL string) *scm.Client {
86+
client, _ := NewWithOptionalProxy("https://api.github.com", proxyURL)
8787
return client
8888
}
8989

0 commit comments

Comments
 (0)