github

package
v0.0.0-...-2fa4727 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 11, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL