team

package
v0.0.8 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2023 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Manager

type Manager struct {
	// contains filtered or unexported fields
}

func NewManager

func NewManager(ghClient *gh.Client, gqlGHClient *githubv4.Client, owner string) *Manager

func (*Manager) GetCurrentConfig

func (tm *Manager) GetCurrentConfig(ctx context.Context) (*config.Config, error)

GetCurrentConfig returns a *config.Config by querying the organization teams. It will not populate the excludedMembers from CodeReviewAssignments as GH does not provide an API of such field.

func (*Manager) SyncTeamMembers

func (tm *Manager) SyncTeamMembers(ctx context.Context, teamName string, add, remove []string) error

SyncTeamMembers adds and removes the given login names into the given team name.

func (*Manager) SyncTeamReviewAssignment

func (tm *Manager) SyncTeamReviewAssignment(ctx context.Context, teamID githubv4.ID, input github.UpdateTeamReviewAssignmentInput) error

SyncTeamReviewAssignment updates the review assignment into GH for the given team name with the given team ID.

func (*Manager) SyncTeams

func (tm *Manager) SyncTeams(ctx context.Context, localCfg *config.Config, force bool, dryRun bool) (*config.Config, error)

type Teams added in v0.0.5

type Teams struct {
	Nodes    []team
	PageInfo struct {
		EndCursor   githubv4.String
		HasNextPage githubv4.Boolean
	}
}

func (Teams) WithID added in v0.0.5

func (t Teams) WithID(id githubv4.ID) (team, error)

Jump to

Keyboard shortcuts

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