config

package
v0.0.0-...-eae4eb0 Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2022 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Account

type Account struct {
	Name  string `json:"name" yaml:"name"`
	Email string `json:"email" yaml:"email"`
	Login string `json:"github" yaml:"github"`
}

Account represents a single user record, whether human or a bot, with a name, email, and GitHub login.

type ClaSigners

type ClaSigners struct {
	People    []Account           `json:"people,omitempty" yaml:"people,omitempty"`
	Bots      []Account           `json:"bots,omitempty" yaml:"bots,omitempty"`
	Companies []Company           `json:"companies,omitempty" yaml:"companies,omitempty"`
	External  *ExternalClaSigners `json:"external,omitempty" yaml:"external,omitempty"`
}

ClaSigners provides the overall structure of the CLA config: individual CLA signers, bots, and corporate CLA signers.

func ParseClaSigners

func ParseClaSigners(filename string) ClaSigners

ParseClaSigners parses the CLA signers config from a YAML or JSON file.

type Company

type Company struct {
	Name    string    `json:"name" yaml:"name"`
	Domains []string  `json:"domains,omitempty" yaml:"domains,omitempty"`
	People  []Account `json:"people" yaml:"people"`
}

Company represents a company record with a name, (optional) domain name(s), and user accounts.

type Config

type Config struct {
	Org               string `json:"org,omitempty" yaml:"org,omitempty"`
	Repo              string `json:"repo,omitempty" yaml:"repo,omitempty"`
	UnknownAsExternal bool   `json:"unknown_as_external,omitempty" yaml:"unknown_as_external,omitempty"`
}

Config is the configuration for the `crbot` tool to specify the scope at which it should run, whether for all repos in a single organization, or a single specific repo.

func ParseConfig

func ParseConfig(filename string) Config

ParseConfig parses the config from a YAML or JSON file.

type ExternalClaSigners

type ExternalClaSigners struct {
	People    []Account `json:"people,omitempty" yaml:"people,omitempty"`
	Bots      []Account `json:"bots,omitempty" yaml:"bots,omitempty"`
	Companies []Company `json:"companies,omitempty" yaml:"companies,omitempty"`
}

ExternalClaSigners represents CLA signers managed by an external process, i.e., not covered by this tool. This is useful for handling migrations into or out of the system provided by Code Review Bot.

type Secrets

type Secrets struct {
	Auth string `json:"auth" yaml:"auth"`
}

Secrets contains the authentication credentials for interacting with GitHub.

func ParseSecrets

func ParseSecrets(filename string) Secrets

ParseSecrets parses the secrets (including auth tokens) from a YAML or JSON file.

Jump to

Keyboard shortcuts

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