MCPcopy Index your code
hub / github.com/coder/coder / reqOpts

Function reqOpts

coderd/externalauth/gitprovider/gitlab.go:66–72  ·  view source on GitHub ↗

reqOpts returns per-request options for authentication and context.

(ctx context.Context, token string)

Source from the content-addressed store, hash-verified

64
65// reqOpts returns per-request options for authentication and context.
66func reqOpts(ctx context.Context, token string) []gitlab.RequestOptionFunc {
67 opts := []gitlab.RequestOptionFunc{gitlab.WithContext(ctx)}
68 if token != "" {
69 opts = append(opts, gitlab.WithToken(gitlab.OAuthToken, token))
70 }
71 return opts
72}
73
74// gitLabPID returns the full project path (owner/repo) for use as a pid.
75// The library handles URL encoding internally.

Callers 3

FetchBranchDiffMethod · 0.85

Calls 1

WithContextMethod · 0.80

Tested by

no test coverage detected