config

package
v6.4.1 Latest Latest
Warning

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

Go to latest
Published: Dec 7, 2025 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Base

type Base struct {
	Org  string `json:"org,omitempty" jsonschema:"description=GitHub organization name"`
	Repo string `json:"repo,omitempty" jsonschema:"description=GitHub repository name"`
}

type Config

type Config struct {
	Base               *Base                    `json:"base,omitempty" jsonschema:"description=Repository where to post comments"`
	GHEBaseURL         string                   `json:"ghe_base_url,omitempty" yaml:"ghe_base_url" jsonschema:"description=GitHub Enterprise Base URL"`
	GHEGraphQLEndpoint string                   `json:"ghe_graphql_endpoint,omitempty" yaml:"ghe_graphql_endpoint" jsonschema:"description=GitHub Enterprise GraphQL Endpoint"`
	Vars               map[string]any           `json:"vars,omitempty" jsonschema:"description=variables to pass to templates"`
	Templates          map[string]string        `json:"templates,omitempty" jsonschema:"description=templates"`
	Post               map[string]*PostConfig   `json:"post,omitempty" jsonschema:"description=configuration for github-comment post command"`
	Exec               map[string][]*ExecConfig `json:"exec,omitempty" jsonschema:"description=configuration for github-comment exec command"`
	Hide               map[string]string        `json:"hide,omitempty" jsonschema:"description=configuration for github-comment hide command"`
	SkipNoToken        bool                     `` /* 134-byte string literal not displayed */
	Silent             bool                     `json:"silent,omitempty"`
}

type ExecConfig

type ExecConfig struct {
	When               string   `json:"when" jsonschema:"description=Condition that this setting is chosen"`
	Template           string   `json:"template,omitempty" jsonschema:"description=Comment template"`
	TemplateForTooLong string   `json:"template_for_too_long,omitempty" yaml:"template_for_too_long"`
	DontComment        bool     `json:"dont_comment,omitempty" yaml:"dont_comment" jsonschema:"description=Don't post a comment"`
	EmbeddedVarNames   []string `json:"embedded_var_names,omitempty" yaml:"embedded_var_names" jsonschema:"description=Embedded variable names"`
}

func (ExecConfig) JSONSchemaExtend added in v6.3.1

func (ec ExecConfig) JSONSchemaExtend(schema *jsonschema.Schema)

type ExistFile

type ExistFile func(string) bool

type PostConfig

type PostConfig struct {
	Template           string   `json:"template" jsonschema:"description=Comment template"`
	TemplateForTooLong string   `json:"template_for_too_long,omitempty"`
	EmbeddedVarNames   []string `json:"embedded_var_names,omitempty" jsonschema:"description=Embedded variable names"`
	// UpdateCondition Update the comment that matches with the condition.
	// If multiple comments match, the latest comment is updated.
	// If no comment matches, a new comment is created.
	UpdateCondition string `json:"update,omitempty" jsonschema:"description=Update comments that matches with the condition"`
}

func (PostConfig) JSONSchema added in v6.3.1

func (PostConfig) JSONSchema() *jsonschema.Schema

func (*PostConfig) UnmarshalYAML

func (pc *PostConfig) UnmarshalYAML(unmarshal func(any) error) error

type Reader

type Reader struct {
	ExistFile ExistFile
}

func (*Reader) FindAndRead

func (r *Reader) FindAndRead(cfgPath, wd string) (*Config, error)

Jump to

Keyboard shortcuts

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