.
This commit is contained in:
@@ -85,7 +85,7 @@ func (h *RequestHandler) GetPullRequestAndReviews(org, project string, num int64
|
||||
return pr.Payload, reviews.Payload, nil
|
||||
}
|
||||
|
||||
func (h *RequestHandler) GetNotifications(since *time.Time) ([]*models.NotificationThread, error) {
|
||||
func (h *RequestHandler) GetPullNotifications(since *time.Time) ([]*models.NotificationThread, error) {
|
||||
if h.HasError() {
|
||||
return nil, h.Error
|
||||
}
|
||||
@@ -95,6 +95,8 @@ func (h *RequestHandler) GetNotifications(since *time.Time) ([]*models.Notificat
|
||||
|
||||
params := notification.NewNotifyGetListParams().
|
||||
WithDefaults().
|
||||
WithSubjectType([]string{"Pull"}).
|
||||
WithStatusTypes([]string{"unread"}).
|
||||
WithLimit(&bigLimit)
|
||||
|
||||
if since != nil {
|
||||
@@ -125,11 +127,12 @@ func (h *RequestHandler) SetNotificationRead(notificationId int64) error {
|
||||
list, err := client.Notification.NotifyReadThread(
|
||||
notification.NewNotifyReadThreadParams().
|
||||
WithDefaults().
|
||||
WithID(fmt.Sprint(id)),
|
||||
WithID(fmt.Sprint(notificationId)),
|
||||
transport.DefaultAuthentication,
|
||||
)
|
||||
|
||||
if err != nil {
|
||||
h.LogError("Error setting notification: %d: %v", notificationId, err)
|
||||
h.Error = err
|
||||
return err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user