Skip to content

Feature/GitHub pr data and agent summary#6

Merged
xueyulinn merged 5 commits into
reviewfrom
feature/github-pr-data-and-agent-summary
May 6, 2026
Merged

Feature/GitHub pr data and agent summary#6
xueyulinn merged 5 commits into
reviewfrom
feature/github-pr-data-and-agent-summary

Conversation

@xueyulinn
Copy link
Copy Markdown
Owner

@xueyulinn xueyulinn commented May 5, 2026

Summary

Adds CodeHawky-powered PR summaries for GitHub pull request events, including full summaries for opened PRs and incremental summaries for synchronize events.

Related Issue

N/A

Type of Change

  • Bug fix
  • New feature
  • Refactor
  • Documentation
  • Test
  • CI/CD
  • Chore

Changes Made

  • Added a PR summary agent using the OpenAI Agents SDK with dedicated full and incremental prompt builders.
  • Added a reviewer-focused system prompt that outputs Summary by CodeHawky with status, summary, risk, review path, and optional open questions.
  • Added GitHub PR DTOs for pull request metadata, commits, changed files, opened webhook payloads, synchronize webhook payloads, and compare results.
  • Added GitHub client support for fetching PR details, commits, changed files, compare results, and posting issue comments.
  • Wired pull request opened events to generate full PR summaries.
  • Wired pull request synchronize events to generate incremental summaries when the branch is ahead, and full regenerated summaries when the compare status is behind or diverged.
  • Refactored GitHub installation token creation to accept explicit installation and repository identifiers.
  • Removed the old generic GitHub DTO/webhook parsing modules in favor of DTO-based parsing.

How to Test

  1. Run the test suite:

pytest

  1. Trigger a GitHub pull_request.opened webhook and verify CodeHawky posts a full PR summary comment.
  2. Trigger a GitHub pull_request.synchronize webhook where the branch is ahead and verify CodeHawky posts an incremental summary.
  3. Trigger a synchronize event where the compare status is behind or diverged and verify CodeHawky posts a regenerated full PR summary with a reason.

Checklist

  • Code builds successfully
  • Tests added or updated
  • Existing tests pass
  • Documentation updated if needed
  • No secrets or sensitive data included
  • Breaking changes documented

Breaking Changes

None.

@xueyulinn xueyulinn merged commit 70fa8d7 into review May 6, 2026
4 checks passed
@xueyulinn xueyulinn linked an issue May 7, 2026 that may be closed by this pull request
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.

[Feature]: Fetch GitHub PR Data and Introduce Agent-Based PR Summaries

1 participant