repo

package
v0.0.0-...-d2919f7 Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2025 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ProcessTemplate

func ProcessTemplate(templateContent []byte, defaultVars map[string]string, overrides map[string]string) ([]byte, error)

ProcessTemplate renders the given template file

Types

type Config

type Config struct {
	PrTargetBranch *string           `yaml:"pr_target_branch"`
	AssignUsers    []string          `yaml:"assign_users"`
	AssignGroup    *string           `yaml:"assign_group"`
	CommitPrefix   *string           `yaml:"commit_prefix"`
	VarOverrides   map[string]string `yaml:"var_overrides"`
}

Config holds configuration data for a repository, including information about target branches, users to assign, groups, and commit prefixes.

type Content

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

Content the content manager object

func NewContent

func NewContent(templates, githubOrg, committerName, committerEmail, reviewTeam, githubToken string) (*Content, error)

NewContent returns new repo content manager

func (*Content) CheckFiles

func (c *Content) CheckFiles(repoName string, files []string, cfg *config.Config) error

CheckFiles checks all the files for updates in the repo

func (*Content) CheckLicenses

func (c *Content) CheckLicenses(cfg *config.Config, onlyRepo string) error

CheckLicenses checks all repos for licenses that need to be managed/updated

func (*Content) LoadRepoConfig

func (c *Content) LoadRepoConfig(repopath string) (Config, error)

LoadRepoConfig loads the repository configuration from the .repo-content-updater.yml file. It returns a RepoConfig struct filled with the loaded configuration and any error encountered during loading.

func (*Content) ManagedFiles

func (c *Content) ManagedFiles(cfg *config.Config, onlyRepo string) error

ManagedFiles updates all managed files in the org with current versions

func (*Content) UpdateLicense

func (c *Content) UpdateLicense(repoName string, cfg *config.Config) error

UpdateLicense ensures the license is up to date for the given repo

Jump to

Keyboard shortcuts

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