Skip to content

Commit

Permalink
fix(notification): the title is only part of the subject
Browse files Browse the repository at this point in the history
There never was a title in the notification object.
  • Loading branch information
nobe4 committed May 21, 2024
1 parent 177198d commit 2d78698
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
4 changes: 2 additions & 2 deletions config.sample.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ groups:
filters:
- .author.login == "dependabot[bot]"
- >
(.title | contains("something unimportant")) or
(.title | contains("something already done"))
(.subject.title | contains("something unimportant")) or
(.subject.title | contains("something already done"))
- name: ignore ci failures for the current repo
action: done
Expand Down
3 changes: 1 addition & 2 deletions internal/notifications/notifications.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ type Notifications []Notification

type Notification struct {
// Standard API fields
Title string `json:"title"`
Id string `json:"id"`
Unread bool `json:"unread"`
Reason string `json:"reason"`
Expand Down Expand Up @@ -73,7 +72,7 @@ func (n NotificationMap) Uniq() NotificationMap {
}

func (n Notification) ToString() string {
return fmt.Sprintf("%s %+v", n.Id, n)
return fmt.Sprintf("[%s] %s by %s: '%s' ", n.Id, n.Repository.FullName, n.Author.Login, n.Subject.Title)
}

func (n NotificationMap) ToString() string {
Expand Down

0 comments on commit 2d78698

Please sign in to comment.