Skip to content

Commit

Permalink
fix: get rid of deprecated function calls
Browse files Browse the repository at this point in the history
  • Loading branch information
tboerger authored and renovate[bot] committed Sep 14, 2023
1 parent e66b242 commit b69be7a
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions pkg/action/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -353,12 +353,13 @@ func getEnterprise(cfg *config.Config, logger log.Logger) (*github.Client, error
transport.BaseURL = cfg.Target.BaseURL
}

client, err := github.NewEnterpriseClient(
cfg.Target.BaseURL,
cfg.Target.BaseURL,
client, err := github.NewClient(
&http.Client{
Transport: transport,
},
).WithEnterpriseURLs(
cfg.Target.BaseURL,
cfg.Target.BaseURL,
)

if err != nil {
Expand All @@ -373,9 +374,7 @@ func getEnterprise(cfg *config.Config, logger log.Logger) (*github.Client, error
return client, err
}

client, err := github.NewEnterpriseClient(
cfg.Target.BaseURL,
cfg.Target.BaseURL,
client, err := github.NewClient(
oauth2.NewClient(
context.WithValue(
context.Background(),
Expand All @@ -394,6 +393,9 @@ func getEnterprise(cfg *config.Config, logger log.Logger) (*github.Client, error
},
),
),
).WithEnterpriseURLs(
cfg.Target.BaseURL,
cfg.Target.BaseURL,
)

if err != nil {
Expand Down

0 comments on commit b69be7a

Please sign in to comment.