grafana - logging if image send
This commit is contained in:
parent
2d49586312
commit
cfd2694693
|
@ -51,7 +51,7 @@ var eventMsg = map[string]string{
|
|||
|
||||
type requestBody struct {
|
||||
Repository struct {
|
||||
URL string `mapstructure:"url"`
|
||||
URL string `mapstructure:"url"`
|
||||
HTMLURL string `mapstructure:"html_url"`
|
||||
FullName string `mapstructure:"full_name"`
|
||||
} `mapstructure:"repository"`
|
||||
|
|
|
@ -72,11 +72,12 @@ func init() {
|
|||
if ruleURL.Hostname() != hook.URL {
|
||||
continue
|
||||
}
|
||||
logger.Infof("run hook")
|
||||
runtime.Notify(client, hook, request.String())
|
||||
if request.ImageURL != "" {
|
||||
runtime.NotifyImage(client, hook, request.ImageURL)
|
||||
logger = logger.WithField("image", request.ImageURL)
|
||||
runtime.NotifyImage(client, hook, request.ImageURL)
|
||||
}
|
||||
logger.Infof("run hook")
|
||||
ok = true
|
||||
}
|
||||
if !ok {
|
||||
|
|
Loading…
Reference in New Issue