project

package
v0.0.0-...-6a2011c Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2019 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 Config

type Config struct {
	Enabled                  bool   `ini:"enabled"`
	WebhookURL               string `ini:"webhookurl"`
	Channel                  string `ini:"channel"`
	Username                 string `ini:"username"`
	IgnoreCommitMessage      string `ini:"ignore"`
	IgnoreAuthors            string `ini:"ignore-authors"`
	IgnoreUnchangedPatchSet  bool   `ini:"ignore-unchanged-patch-set"`
	IgnoreWipPatchSet        bool   `ini:"ignore-wip-patch-set"`
	IgnorePrivatePatchSet    bool   `ini:"ignore-private-patch-set"`
	IgnoreOnlyLabels         string `ini:"ignore-only-labels"`
	PublishOnChangeMerged    bool   `ini:"publish-on-change-merged"`
	PublishOnCommentAdded    bool   `ini:"publish-on-comment-added"`
	PublishOnPatchSetCreated bool   `ini:"publish-on-patch-set-created"`
	PublishOnReviewerAdded   bool   `ini:"publish-on-reviewer-added"`
	// PublishPatchSetReviewersAdded controls whether we publish when a reviewer
	// is added as part of uploading a new patch-set. This is only necessary
	// because https://bugs.chromium.org/p/gerrit/issues/detail?id=10042
	PublishPatchSetReviewersAdded bool `ini:"publish-patch-set-reviewers-added"`

	// PublishPatchSetCreatedImmediately changes the patch-set-created event to fire
	// immediately against slack instead of waiting 5 seconds before publishing to
	// collect any automatically added reviewers. This is necessary because of the same
	// bug as above.
	PublishPatchSetCreatedImmediately bool `ini:"publish-patch-set-created-immediately"`

	// PublishOnWipReady and PublishOnPrivateToPublic default to the value of
	// PublishOnPatchSetCreated but since we can't determine if they were false
	// or not set, we use a pointer and then fill in the regular values later
	OrigPublishOnWipReady      *bool `ini:"publish-on-wip-ready"`
	OrigPublishOnPrivatePublic *bool `ini:"publish-on-private-to-public"`
	PublishOnWipReady          bool
	PublishOnPrivateToPublic   bool
}

Config represents a slack-integration plugin configuration

func DefaultConfig

func DefaultConfig() Config

DefaultConfig returns a config struct with defaults set

func LoadConfig

func LoadConfig(client *gerrit.Client, project string) (Config, error)

LoadConfig loads the config for the sent project

Jump to

Keyboard shortcuts

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