Skip to content

bug: token injected with github.Client's WithAuthToken() are overridden by the transport #159

@0x416e746f6e

Description

@0x416e746f6e

if we explicitly add inject auth token to the calls issued by github.Client via its WithAuthToken() then they overwritten by the transport.

the problem is here:

// transport.go

creq := cloneRequest(req) // per RoundTripper contract
creq.Header.Set("Authorization", "token "+token)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions