Skip to content

Commit

Permalink
Update weekly summary to show that in title
Browse files Browse the repository at this point in the history
Otherwise it looks like a single b-day is on that Sunday

Signed-off-by: Charlie Egan <charlieegan3@users.noreply.github.com>
  • Loading branch information
charlieegan3 committed Aug 2, 2021
1 parent c4be7c7 commit d8d598b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
5 changes: 0 additions & 5 deletions cmd/notify.go
Original file line number Diff line number Diff line change
@@ -1,17 +1,12 @@
package cmd

import (
"fmt"

"github.com/spf13/cobra"
)

var notifyCmd = &cobra.Command{
Use: "notify",
Short: "send alerts for events related to contacts",
Run: func(cmd *cobra.Command, args []string) {
fmt.Println("notify called")
},
}

func init() {
Expand Down
3 changes: 2 additions & 1 deletion cmd/week.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package cmd

import (
"fmt"
"log"
"time"

Expand Down Expand Up @@ -40,7 +41,7 @@ var weekCmd = &cobra.Command{
pushoverRecipient := psh.NewRecipient(viper.GetString("pushover.user_key"))
pushoverApp := psh.New(viper.GetString("pushover.app_token"))
if alert {
pushover.Notify(pushoverApp, pushoverRecipient, title, message)
pushover.Notify(pushoverApp, pushoverRecipient, fmt.Sprintf("Weekly Summary (%s)", title), message)
} else {
pushover.Notify(pushoverApp, pushoverRecipient, "No Events", "There are no events in the next two weeks")
}
Expand Down

0 comments on commit d8d598b

Please sign in to comment.