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

Method ProcessGithubEvent

admin/github.go:346–360  ·  view source on GitHub ↗

ProcessGithubEvent processes a Github event (usually received over webhooks). After validating that the event is a valid Github event, it moves further processing to the background and returns a nil error.

(ctx context.Context, rawEvent any)

Source from the content-addressed store, hash-verified

344// ProcessGithubEvent processes a Github event (usually received over webhooks).
345// After validating that the event is a valid Github event, it moves further processing to the background and returns a nil error.
346func (s *Service) ProcessGithubEvent(ctx context.Context, rawEvent any) error {
347 switch event := rawEvent.(type) {
348 // Triggered on push to repository
349 case *github.PushEvent:
350 return s.processGithubPush(ctx, event)
351 // Triggered during first installation of app to an account (org or user) or one or more repos
352 case *github.InstallationEvent:
353 return s.processGithubInstallationEvent(ctx, event)
354 // Triggered when new repos are added to the account (org or user), and the installation has full access to account
355 case *github.InstallationRepositoriesEvent:
356 return s.processGithubInstallationRepositoriesEvent(ctx, event)
357 default:
358 return nil
359 }
360}
361
362func (s *Service) processGithubPush(ctx context.Context, event *github.PushEvent) error {
363 // Find Rill project matching the repo that was pushed to

Callers 1

githubWebhookMethod · 0.80

Tested by

no test coverage detected