Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BotConfig ¶
type BotConfig struct {
config.RepoFilter
// EnableSyncIssue control whether synchronization issues, default false.
EnableSyncIssue bool `json:"enable_sync_issue,omitempty"`
// EnableSyncComment control whether synchronization comments, default false.
EnableSyncComment bool `json:"enable_sync_comment,omitempty"`
// DoNotSyncAuthors the person configured by this Configuration item as the author of
// the issue or comment will not need to synchronize.
// in addition, if it is empty the current robot account is default.
DoNotSyncAuthors []NotSyncConfig `json:"do_not_sync_authors,omitempty"`
// SyncOrgMapping mappings of organizations that need to perform synchronization.
SyncOrgMapping map[string]string `json:"sync_org_mapping,omitempty"`
}
func (*BotConfig) OrgMapping ¶
type Configuration ¶
type Configuration struct {
ConfigItems []BotConfig `json:"config_items,omitempty"`
}
func (*Configuration) ConfigFor ¶
func (c *Configuration) ConfigFor(org, repo string) *BotConfig
func (*Configuration) SetDefault ¶
func (c *Configuration) SetDefault()
func (*Configuration) Validate ¶
func (c *Configuration) Validate() error
type NotSyncConfig ¶
type NotSyncConfig struct {
// Account the login account name of the platform where the user is located.
Account string `json:"account" required:"true"`
// IssueCommentContentWhitelist the account Configuration item specifies a regular whitelist of user comment content,
// and comments that match the regular pattern will be synchronized.
IssueCommentContentWhitelist []string `json:"issue_comment_content_whitelist,omitempty"`
// NeedSyncIssue whether the issue created by the person specified by the account Configuration item needs to be synchronized.
NeedSyncIssue bool `json:"need_sync_issue,omitempty"`
}
func (NotSyncConfig) CommentContentInWhitelist ¶
func (nc NotSyncConfig) CommentContentInWhitelist(content string) bool
Click to show internal directories.
Click to hide internal directories.