From 7ec1bf80aa29edd1bb3d0803feee7628d82f9af3 Mon Sep 17 00:00:00 2001 From: Oleksandr Redko Date: Mon, 2 Mar 2026 12:03:57 +0200 Subject: [PATCH] feat: `ActivityService.MarkThreadDone` accepts `string` id --- github/activity_notifications.go | 2 +- github/activity_notifications_test.go | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/github/activity_notifications.go b/github/activity_notifications.go index feb38ea3391..e126199052a 100644 --- a/github/activity_notifications.go +++ b/github/activity_notifications.go @@ -186,7 +186,7 @@ func (s *ActivityService) MarkThreadRead(ctx context.Context, id string) (*Respo // GitHub API docs: https://docs.github.com/rest/activity/notifications#mark-a-thread-as-done // //meta:operation DELETE /notifications/threads/{thread_id} -func (s *ActivityService) MarkThreadDone(ctx context.Context, id int64) (*Response, error) { +func (s *ActivityService) MarkThreadDone(ctx context.Context, id string) (*Response, error) { u := fmt.Sprintf("notifications/threads/%v", id) req, err := s.client.NewRequest("DELETE", u, nil) diff --git a/github/activity_notifications_test.go b/github/activity_notifications_test.go index 752eb62baa6..3483a927cf4 100644 --- a/github/activity_notifications_test.go +++ b/github/activity_notifications_test.go @@ -255,19 +255,19 @@ func TestActivityService_MarkThreadDone(t *testing.T) { }) ctx := t.Context() - _, err := client.Activity.MarkThreadDone(ctx, 1) + _, err := client.Activity.MarkThreadDone(ctx, "1") if err != nil { t.Errorf("Activity.MarkThreadDone returned error: %v", err) } const methodName = "MarkThreadDone" testBadOptions(t, methodName, func() (err error) { - _, err = client.Activity.MarkThreadDone(ctx, 0) + _, err = client.Activity.MarkThreadDone(ctx, "\n") return err }) testNewRequestAndDoFailure(t, methodName, client, func() (*Response, error) { - return client.Activity.MarkThreadDone(ctx, 1) + return client.Activity.MarkThreadDone(ctx, "1") }) }