handler

package
v1.19.0 Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2024 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultSharedRepository        = ".github"
	DefaultConfigurationPath       = ".bulldozer.yml"
	DefaultSharedConfigurationPath = "bulldozer.yml"
	DefaultAppName                 = "bulldozer"
)

Variables

This section is empty.

Functions

func Health

func Health() http.Handler

func Metrics added in v1.19.0

func Metrics(r metrics.Registry, config prometheus.Config) http.Handler

Types

type Base

type Base struct {
	githubapp.ClientCreator

	ConfigFetcher            *ConfigFetcher
	PushRestrictionUserToken string
	DisableUpdateFeature     bool
}

func (*Base) FetchConfig added in v1.13.0

func (b *Base) FetchConfig(ctx context.Context, client *github.Client, owner, repo, ref string) (*bulldozer.Config, error)

func (*Base) FetchConfigForPR added in v1.15.0

func (b *Base) FetchConfigForPR(ctx context.Context, client *github.Client, pr *github.PullRequest) (*bulldozer.Config, error)

func (*Base) ProcessPullRequest

func (b *Base) ProcessPullRequest(ctx context.Context, pullCtx pull.Context, client *github.Client, config *bulldozer.Config, pr *github.PullRequest) error

func (*Base) UpdatePullRequest

func (b *Base) UpdatePullRequest(ctx context.Context, pullCtx pull.Context, client *github.Client, config *bulldozer.Config, pr *github.PullRequest, baseRef string) (bool, error)

type CheckRun

type CheckRun struct {
	Base
}

func (*CheckRun) Handle

func (h *CheckRun) Handle(ctx context.Context, eventType, deliveryID string, payload []byte) error

func (*CheckRun) Handles

func (h *CheckRun) Handles() []string

type ConfigFetcher added in v1.14.0

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

func NewConfigFetcher added in v1.14.0

func NewConfigFetcher(loader *appconfig.Loader, defaultConfig *bulldozer.Config) *ConfigFetcher

func (*ConfigFetcher) Config added in v1.15.0

func (cf *ConfigFetcher) Config(ctx context.Context, client *github.Client, owner, repo, ref string) FetchedConfig

type FetchedConfig added in v1.14.0

type FetchedConfig struct {
	Config     *bulldozer.Config
	LoadError  error
	ParseError error

	Source string
	Path   string
}

type HealthCheck

type HealthCheck struct {
	Status  string `json:"status"`
	Version string `json:"version"`
}

type IssueComment

type IssueComment struct {
	Base
}

func (*IssueComment) Handle

func (h *IssueComment) Handle(ctx context.Context, eventType, deliveryID string, payload []byte) error

func (*IssueComment) Handles

func (h *IssueComment) Handles() []string

type Options added in v1.17.0

type Options struct {
	AppName                  string `yaml:"app_name"`
	PushRestrictionUserToken string `yaml:"push_restriction_user_token"`

	ConfigurationPath       string            `yaml:"configuration_path"`
	SharedRepository        string            `yaml:"shared_repository"`
	SharedConfigurationPath string            `yaml:"shared_configuration_path"`
	DefaultRepositoryConfig *bulldozer.Config `yaml:"default_repository_config"`

	ConfigurationV0Paths []string `yaml:"configuration_v0_paths"`

	DisableUpdateFeature bool `yaml:"disable_update_feature"`
}

func (*Options) SetValuesFromEnv added in v1.17.0

func (o *Options) SetValuesFromEnv(prefix string)

type PullRequest

type PullRequest struct {
	Base
}

func (*PullRequest) Handle

func (h *PullRequest) Handle(ctx context.Context, eventType, deliveryID string, payload []byte) error

func (*PullRequest) Handles

func (h *PullRequest) Handles() []string

type PullRequestReview

type PullRequestReview struct {
	Base
}

func (*PullRequestReview) Handle

func (h *PullRequestReview) Handle(ctx context.Context, eventType, deliveryID string, payload []byte) error

func (*PullRequestReview) Handles

func (h *PullRequestReview) Handles() []string

type Push

type Push struct {
	Base
}

func (*Push) Handle

func (h *Push) Handle(ctx context.Context, eventType, deliveryID string, payload []byte) error

func (*Push) Handles

func (h *Push) Handles() []string

type Status

type Status struct {
	Base
}

func (*Status) Handle

func (h *Status) Handle(ctx context.Context, eventType, deliveryID string, payload []byte) error

func (*Status) Handles

func (h *Status) Handles() []string

Jump to

Keyboard shortcuts

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