add ONLY_MATCH_EMAIL boolean flag
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
This commit is contained in:
parent
e0760eaf80
commit
eee4278af4
6
main.go
6
main.go
@ -77,6 +77,11 @@ func main() {
|
|||||||
Usage: "enable debug message",
|
Usage: "enable debug message",
|
||||||
EnvVar: "PLUGIN_DEBUG",
|
EnvVar: "PLUGIN_DEBUG",
|
||||||
},
|
},
|
||||||
|
cli.BoolFlag{
|
||||||
|
Name: "match.email",
|
||||||
|
Usage: "send message when only match email",
|
||||||
|
EnvVar: "PLUGIN_ONLY_MATCH_EMAIL",
|
||||||
|
},
|
||||||
cli.StringFlag{
|
cli.StringFlag{
|
||||||
Name: "format",
|
Name: "format",
|
||||||
Value: "markdown",
|
Value: "markdown",
|
||||||
@ -177,6 +182,7 @@ func run(c *cli.Context) error {
|
|||||||
Config: Config{
|
Config: Config{
|
||||||
Token: c.String("token"),
|
Token: c.String("token"),
|
||||||
Debug: c.Bool("debug"),
|
Debug: c.Bool("debug"),
|
||||||
|
MatchEmail: c.Bool("match.email"),
|
||||||
To: c.StringSlice("to"),
|
To: c.StringSlice("to"),
|
||||||
Message: c.StringSlice("message"),
|
Message: c.StringSlice("message"),
|
||||||
Photo: c.StringSlice("photo"),
|
Photo: c.StringSlice("photo"),
|
||||||
|
Loading…
Reference in New Issue
Block a user