Commit abccb0493248

Vincent Demeester <vincent@sbr.pm>
2026-02-19 16:49:50
fix(review-tool): fix discussion comments GraphQL query
Removed unsupported orderBy argument from the repositoryDiscussionComments GraphQL query. The GitHub API was returning an error that was silently swallowed, resulting in no discussion or discussion_comment items.
1 parent 478ebaa
Changed files (4)
tools
review-tool
internal
tools/review-tool/internal/activity/activity.go
@@ -10,7 +10,7 @@ const (
 	CategoryGitHub Category = "github"
 	CategoryOrg    Category = "org"
 	CategoryJira   Category = "jira"
-	CategoryAI Category = "ai"
+	CategoryAI     Category = "ai"
 )
 
 // ActivityItem represents a single unit of work or event.
tools/review-tool/internal/config/config.go
@@ -15,7 +15,7 @@ type Config struct {
 	GitHub GitHubConfig `yaml:"github"`
 	Org    OrgConfig    `yaml:"org"`
 	Jira   JiraConfig   `yaml:"jira"`
-	AI AIConfig `yaml:"ai"`
+	AI     AIConfig     `yaml:"ai"`
 	Output OutputConfig `yaml:"output"`
 }
 
tools/review-tool/internal/output/markdown.go
@@ -124,7 +124,7 @@ func formatSourceName(source string) string {
 		"github": "GitHub",
 		"org":    "Org-mode",
 		"jira":   "Jira",
-		"ai": "AI Sessions",
+		"ai":     "AI Sessions",
 	}
 	if name, ok := names[source]; ok {
 		return name
tools/review-tool/internal/sources/github.go
@@ -249,7 +249,7 @@ func (g *GitHubSource) fetchDiscussions(ctx context.Context, since time.Time) ([
         }
       }
     }
-    repositoryDiscussionComments(first: 50, orderBy: {field: UPDATED_AT, direction: DESC}) {
+    repositoryDiscussionComments(first: 50) {
       nodes {
         discussion {
           title