Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add PR Summary Generation with File Diffs and Messages #3

Merged
merged 9 commits into from
Nov 9, 2024
Merged

Conversation

bstanga
Copy link
Contributor

@bstanga bstanga commented Nov 9, 2024

Implements functionality to generate comprehensive PR summaries by analyzing file changes, commit messages, and PR metadata. The system processes file diffs, formats them for display, and generates both initial and walkthrough messages for pull requests.

@bstanga
Copy link
Contributor Author

bstanga commented Nov 9, 2024

📖 Walkthrough

Implements functionality to generate comprehensive PR summaries by analyzing file changes, commit messages, and PR metadata. The system processes file diffs, formats them for display, and generates both initial and walkthrough messages for pull requests.

Changes

File Summary
src/diff.ts New module implementing file diff parsing and formatting. Includes functions to handle hunks, line numbers, and diff visualization with parseFileDiff, formatFileDiff, and generateFileCodeDiff utilities.
src/messages.ts New module with buildInitialMessage and buildWalkthroughMessage functions to generate formatted PR analysis messages with file changes, commit info, and summary tables.
src/prompts.ts Modified file structure to use new diff types and integrated formatFileDiff for better file change representation in prompts.
src/pull_request.ts Enhanced PR handling to generate and post summaries, including initial analysis message, walkthrough generation, and automatic PR title/description updates.

@bstanga bstanga changed the title generate pr summary Add PR Summary Generation with File Diffs and Messages Nov 9, 2024
@bstanga bstanga merged commit 83757c6 into main Nov 9, 2024
1 check passed
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