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 {
|
type requestBody struct {
|
||||||
Repository struct {
|
Repository struct {
|
||||||
URL string `mapstructure:"url"`
|
URL string `mapstructure:"url"`
|
||||||
HTMLURL string `mapstructure:"html_url"`
|
HTMLURL string `mapstructure:"html_url"`
|
||||||
FullName string `mapstructure:"full_name"`
|
FullName string `mapstructure:"full_name"`
|
||||||
} `mapstructure:"repository"`
|
} `mapstructure:"repository"`
|
||||||
|
|
|
@ -72,11 +72,12 @@ func init() {
|
||||||
if ruleURL.Hostname() != hook.URL {
|
if ruleURL.Hostname() != hook.URL {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
logger.Infof("run hook")
|
|
||||||
runtime.Notify(client, hook, request.String())
|
runtime.Notify(client, hook, request.String())
|
||||||
if request.ImageURL != "" {
|
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
|
ok = true
|
||||||
}
|
}
|
||||||
if !ok {
|
if !ok {
|
||||||
|
|
Loading…
Reference in New Issue