Skip to content

Add client.WithClient method #3004

Open
@ashi009

Description

@ashi009

When authenticating with github app creds, we need to attach a tokensource to the http.Client, and provide it to the github.NewClient. However, a github app needs to switch between app cred, app install cred and perhaps user cred. Which means we need to call github.NewClient repeatedly with different http.Client when switching between creds.

This is very painful when using github enterprise, as we need a follow up call c.WithEnterpriseURLs at each callsite. It would be nice if we can add a method to do the necessary config copying when just changing the underlying http.Client.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions