MCPcopy Index your code
hub / github.com/rilldata/rill / registerGithubEndpoints

Method registerGithubEndpoints

admin/server/github.go:506–516  ·  view source on GitHub ↗

registerGithubEndpoints registers the non-gRPC endpoints for the Github integration.

(mux *http.ServeMux)

Source from the content-addressed store, hash-verified

504
505// registerGithubEndpoints registers the non-gRPC endpoints for the Github integration.
506func (s *Server) registerGithubEndpoints(mux *http.ServeMux) {
507 // TODO: Add helper utils to clean this up
508 inner := http.NewServeMux()
509 observability.MuxHandle(inner, "/github/webhook", http.HandlerFunc(s.githubWebhook))
510 observability.MuxHandle(inner, "/github/connect", s.authenticator.HTTPMiddleware(middleware.Check(s.checkGithubRateLimit("/github/connect"), http.HandlerFunc(s.githubConnect))))
511 observability.MuxHandle(inner, "/github/connect/callback", s.authenticator.HTTPMiddleware(middleware.Check(s.checkGithubRateLimit("/github/connect/callback"), http.HandlerFunc(s.githubConnectCallback))))
512 observability.MuxHandle(inner, "/github/auth/login", s.authenticator.HTTPMiddleware(middleware.Check(s.checkGithubRateLimit("github/auth/login"), http.HandlerFunc(s.githubAuth))))
513 observability.MuxHandle(inner, "/github/auth/callback", s.authenticator.HTTPMiddleware(middleware.Check(s.checkGithubRateLimit("github/auth/callback"), http.HandlerFunc(s.githubAuthCallback))))
514 observability.MuxHandle(inner, "/github/post-auth-redirect", s.authenticator.HTTPMiddleware(middleware.Check(s.checkGithubRateLimit("github/post-auth-redirect"), http.HandlerFunc(s.githubStatus))))
515 mux.Handle("/github/", observability.Middleware("admin", s.logger, inner))
516}
517
518type githubConnectState struct {
519 Remote string `json:"remote"`

Callers 1

HTTPHandlerMethod · 0.95

Calls 5

checkGithubRateLimitMethod · 0.95
MuxHandleFunction · 0.92
CheckFunction · 0.92
MiddlewareFunction · 0.92
HTTPMiddlewareMethod · 0.80

Tested by

no test coverage detected