config

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

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

Go to latest
Published: May 4, 2022 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BranchProtection

type BranchProtection struct {
	Pattern                       string   `yaml:"pattern"`
	EnforceAdmins                 bool     `yaml:"enforceAdmins"`
	AllowsDeletions               bool     `yaml:"allowsDeletions"`
	AllowsForcePushes             bool     `yaml:"allowsForcePushes"`
	DismissStaleReviews           bool     `yaml:"dismissStaleReviews"`
	RestrictDismissals            bool     `yaml:"restrictDismissals"`
	RequiredLinearHistory         bool     `yaml:"requiredLinearHistory"`
	RequireSignedCommits          bool     `yaml:"requireSignedCommits"`
	RequireConversationResolution bool     `yaml:"requireConversationResolution"`
	RequireCodeOwnerReviews       bool     `yaml:"requireCodeOwnerReviews"`
	RequiredApprovingReviewCount  int      `yaml:"requiredApprovingReviewCount"`
	StatusChecks                  []string `yaml:"statusChecks"`
}

type Collaborator

type Collaborator struct {
	Username   string `yaml:"username"`
	Permission string `yaml:"permission"`
}

type Config

type Config struct {
	Users        []User       `yaml:"users"`
	Teams        []Team       `yaml:"teams"`
	Repositories []Repository `yaml:"repositories"`
}

func ParseDir

func ParseDir(path string) (Config, error)

func ParseFile

func ParseFile(path string) (Config, error)

type Pages

type Pages struct {
	CNAME  string `yaml:"cname"`
	Branch string `yaml:"branch"`
	Path   string `yaml:"path"`
}

type Parser

type Parser struct {
	Config Config
	// contains filtered or unexported fields
}

func NewParser

func NewParser() *Parser

func (*Parser) Parse

func (p *Parser) Parse(reader io.Reader, path string) error

func (*Parser) ParseDir

func (p *Parser) ParseDir(path string) error

func (*Parser) ParseFile

func (p *Parser) ParseFile(path, basedir string) error

type RepoTeam

type RepoTeam struct {
	Name       string `yaml:"name"`
	ID         string `yaml:"id"`
	Permission string `yaml:"permission"`
}

type Repository

type Repository struct {
	AllowAutoMerge      bool               `yaml:"allowAutoMerge"`
	AllowMergeCommit    bool               `yaml:"allowMergeCommit"`
	AllowRebaseMerge    bool               `yaml:"allowRebaseMerge"`
	AllowSquashMerge    bool               `yaml:"allowSquashMerge"`
	Archived            bool               `yaml:"archived"`
	AutoInit            bool               `yaml:"autoInit"`
	DeleteBranchOnMerge bool               `yaml:"deleteBranchOnMerge"`
	HasDownloads        bool               `yaml:"hasDownloads"`
	HasIssues           bool               `yaml:"hasIssues"`
	HasProjects         bool               `yaml:"hasProjects"`
	HasWiki             bool               `yaml:"hasWiki"`
	VulnerabilityAlerts bool               `yaml:"vulnerabilityAlerts"`
	Visibility          string             `yaml:"visibility"`
	Name                string             `yaml:"name"`
	Owner               string             `yaml:"owner"`
	Description         string             `yaml:"description"`
	HomepageUrl         string             `yaml:"homepageUrl"`
	LicenseTemplate     string             `yaml:"licenseTemplate"`
	Topics              []string           `yaml:"topics"`
	Pages               Pages              `yaml:"pages"`
	IsTemplate          bool               `yaml:"isTemplate"`
	Template            Template           `yaml:"template"`
	Collaborators       []Collaborator     `yaml:"collaborators"`
	Teams               []RepoTeam         `yaml:"teams"`
	BranchesProtection  []BranchProtection `yaml:"branchProtection"`
}

type Team

type Team struct {
	Name         string `yaml:"name"`
	Description  string `yaml:"description"`
	Privacy      string `yaml:"privacy"`
	ParentTeamID int    `yaml:"parentTeamId"`
}

type Template

type Template struct {
	Owner      string `yaml:"owner"`
	Repository string `yaml:"repository"`
}

type User

type User struct {
	Username string     `yaml:"username"`
	Role     string     `yaml:"role"`
	Teams    []UserTeam `yaml:"teams"`
}

type UserTeam

type UserTeam struct {
	Name string `yaml:"name"`
	Role string `yaml:"role"`
}

Jump to

Keyboard shortcuts

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