Skip to content

feat: Add general PR comments support and refactor review creation#179

Merged
finxo merged 9 commits intomasterfrom
feat/manual_changes
Mar 6, 2026
Merged

feat: Add general PR comments support and refactor review creation#179
finxo merged 9 commits intomasterfrom
feat/manual_changes

Conversation

@finxo
Copy link
Copy Markdown
Collaborator

@finxo finxo commented Mar 6, 2026

Pull Request

📝 Summary

This PR enhances the GitHub plugin's review capabilities by adding support for general PR comments (issue comments not tied to code lines) and refactoring the draft review creation to use GHNetwork instead of raw subprocess calls. It also improves the AI review workflow to handle both code changes and text-based replies, with shortened UI button labels for better UX.

🔧 Changes Made

  • Added get_pr_general_comments() method using GraphQL to fetch PR-level comments (not attached to code)
  • Refactored create_draft_review() to use GHNetwork abstraction instead of direct subprocess execution
  • Enhanced AI review prompt building with build_ai_review_prompt() to support both code changes and text replies
  • Added new GraphQL query GET_PR_ISSUE_COMMENTS for fetching general PR comments
  • Introduced GraphQLIssueComment model and mapper for issue comment data transformation
  • Shortened PR review action button labels in UI for improved readability
  • Updated comment operations to handle general comments alongside review threads

🧪 Testing

  • Unit tests added/updated (poetry run pytest)
  • All tests passing (make test)
  • Manual testing with titan-dev

Added comprehensive unit tests for:

  • Draft review creation via GHNetwork (success, parse error, API error scenarios)
  • AI review prompt building with response file path handling
  • General PR comments fetching and parsing
  • Error handling for invalid JSON responses and API failures

📊 Logs

  • No new log events

✅ Checklist

  • Self-review done
  • Follows the project's logging rules (no secrets, no content in logs)
  • New and existing tests pass
  • Documentation updated if needed

@finxo finxo self-assigned this Mar 6, 2026
@finxo finxo merged commit 4d88c01 into master Mar 6, 2026
6 checks passed
@finxo finxo deleted the feat/manual_changes branch March 6, 2026 08:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant