label

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

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

Go to latest
Published: Mar 1, 2019 License: Apache-2.0 Imports: 7 Imported by: 0

README

label

给 issue 或 PR 加上 自定义的标签,前缀和状态都是自己指定。

新增 label 和删除 label 都可以配置需要满足的条件。

cmd

/{cmd} {status}

extra

参考配置:

"label":{
    "enable": true,
    "extra":{
        "kind":{
            "add_preconditions":[
            ],
            "remove_preconditions":[
                {
                    "required_roles": ["owner"]
                }
            ],
            "labels": ["feature", "bug"]
         }
    }
}

上面的配置表示:

可以用 /kind feature 来打上 kind/feature 的标签,在该配置中,新增标签没有前置条件。

可以用 /remove-kind feature 来移除 kind/feature 标签, 在该配置中,前置条件为 owner。

更多信息参考 example 文件夹下的 config。

Documentation

Index

Constants

View Source
const (
	PluginRemoveCmdPrefix = "remove-"
)

Variables

View Source
var (
	PluginName = "label"
)

Functions

func NewLabelPlugin

func NewLabelPlugin(cli client.ClientInterface, notifier notify.NotifyInterface, options plugin.PluginOptions) (plugin.Plugin, error)

Types

type Extra

type Extra map[string]LabelStatus

type LabelStatus

type LabelStatus struct {
	AddPreconditions    []config.Precondition `json:"add_preconditions"`
	RemovePreconditions []config.Precondition `json:"remove_preconditions"`
	Labels              []string              `json:"labels"`
}

type LablePlugin

type LablePlugin struct {
	*plugin.BasePlugin
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

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