Skip to content

Commit d9b714c

Browse files
fix: restore thread id in get_review_comments response
Cherry-picks upstream PR github#2245. Without the thread ID, resolve_thread / unresolve_thread are unusable. Drop this patch when upstream merges.
1 parent c471ae9 commit d9b714c

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

pkg/github/minimal_types.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package github
22

33
import (
4+
"fmt"
45
"time"
56

67
"github.com/google/go-github/v87/github"
@@ -749,6 +750,7 @@ type MinimalReviewComment struct {
749750

750751
// MinimalReviewThread is the trimmed output type for PR review thread objects.
751752
type MinimalReviewThread struct {
753+
ID string `json:"id"`
752754
IsResolved bool `json:"is_resolved"`
753755
IsOutdated bool `json:"is_outdated"`
754756
IsCollapsed bool `json:"is_collapsed"`
@@ -885,6 +887,7 @@ func convertToMinimalReviewThread(thread reviewThreadNode) MinimalReviewThread {
885887
}
886888

887889
return MinimalReviewThread{
890+
ID: fmt.Sprintf("%v", thread.ID),
888891
IsResolved: bool(thread.IsResolved),
889892
IsOutdated: bool(thread.IsOutdated),
890893
IsCollapsed: bool(thread.IsCollapsed),

0 commit comments

Comments
 (0)