mirror of
https://github.com/containrrr/watchtower.git
synced 2026-01-11 03:28:50 +01:00
use combined flags for notifications
This commit is contained in:
parent
f817098cd5
commit
7579740d38
4 changed files with 4 additions and 4 deletions
|
|
@ -25,7 +25,7 @@ type emailTypeNotifier struct {
|
|||
}
|
||||
|
||||
func newEmailNotifier(c *cobra.Command, acceptedLogLevels []log.Level) t.ConvertibleNotifier {
|
||||
flags := c.PersistentFlags()
|
||||
flags := c.Flags()
|
||||
|
||||
from, _ := flags.GetString("notification-email-from")
|
||||
to, _ := flags.GetString("notification-email-to")
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ type gotifyTypeNotifier struct {
|
|||
}
|
||||
|
||||
func newGotifyNotifier(c *cobra.Command, levels []log.Level) t.ConvertibleNotifier {
|
||||
flags := c.PersistentFlags()
|
||||
flags := c.Flags()
|
||||
|
||||
apiURL := getGotifyURL(flags)
|
||||
token := getGotifyToken(flags)
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ type msTeamsTypeNotifier struct {
|
|||
|
||||
func newMsTeamsNotifier(cmd *cobra.Command, acceptedLogLevels []log.Level) t.ConvertibleNotifier {
|
||||
|
||||
flags := cmd.PersistentFlags()
|
||||
flags := cmd.Flags()
|
||||
|
||||
webHookURL, _ := flags.GetString("notification-msteams-hook")
|
||||
if len(webHookURL) <= 0 {
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ type slackTypeNotifier struct {
|
|||
}
|
||||
|
||||
func newSlackNotifier(c *cobra.Command, acceptedLogLevels []log.Level) t.ConvertibleNotifier {
|
||||
flags := c.PersistentFlags()
|
||||
flags := c.Flags()
|
||||
|
||||
hookURL, _ := flags.GetString("notification-slack-hook-url")
|
||||
userName, _ := flags.GetString("notification-slack-identifier")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue