Documentation ¶
Overview ¶
package github defines the mechanism to update GitHub teams' memberships given a list of records of the expected team memberships.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Option ¶
type Option func(*Synchronizer) error
Option to set up a synchronizer.
func WithDryRun ¶
func WithDryRun() Option
Enable dryrun mode for synchronizer, in dryrun mode, the synchronizer will only log the membership updates instead of doing a real sync.
type Synchronizer ¶
type Synchronizer struct {
// contains filtered or unexported fields
}
Synchronizer that syncs github team memberships. TODO(#7): add retry strategy.
func NewSynchronizer ¶
func NewSynchronizer(ghClient *github.Client, ghApp *githubauth.App, opts ...Option) (*Synchronizer, error)
NewSynchronizer creates a new Synchronizer with provided clients and options.
func (*Synchronizer) Sync ¶
func (s *Synchronizer) Sync(ctx context.Context, teams []*v1alpha1.GitHubTeam) error
Sync overides several GitHub teams' memberships with the provided team membership snapshots. TODO(#3): populate the users' GitHub logins in the GitHubTeam object before this since they are required when updating GitHub team memberships.