Display if diff truncated - #213
Merged
Merged
Conversation
|
Note Gemini is unable to generate a review for this pull request due to the file types involved not being currently supported. |
📁 .github/workflows/pr-review.yml (deepseek-v4-flash:cloud)💻 Code: ````
|
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the AI PR review GitHub Actions workflow to surface whether the pull request diff was truncated (and its size) in the bot’s summary comment, improving transparency when large diffs are reviewed.
Changes:
- Persist a
was_truncated.txtflag during diff truncation logic. - Read and display truncation metadata (
diff_size.txt,was_truncated.txt) in the final PR summary comment. - Consolidate cleanup into a small file-deletion loop.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+60
to
+64
| echo "true" > was_truncated.txt | ||
| mv pr.diff.truncated pr.diff | ||
| else | ||
| echo "✅ Diff size OK" | ||
| echo "false" > was_truncated.txt |
Comment on lines
371
to
375
| issue_number: context.issue.number, | ||
| owner: context.repo.owner, | ||
| repo: context.repo.repo, | ||
| body: `## 🤖 AI Code Review (${model})\n\nFound **${reviewComments.length}** issues. See inline comments for details.` | ||
| body: `## 🤖 AI Code Review (${model})\n\nFound **${reviewComments.length}** issues.\n\n**Diff size:** ${diffSize} bytes\n**Truncated:** ${truncated}\n\nSee inline comments for details.` | ||
| }); |
Comment on lines
+380
to
+384
| const filesToClean = ['review.txt', 'model.txt', 'diff_size.txt', 'was_truncated.txt']; | ||
| for (const file of filesToClean) { | ||
| if (fs.existsSync(file)) { | ||
| fs.unlinkSync(file); | ||
| } |
🤖 AI Code Review (deepseek-v4-flash:cloud)✅ No issues found. The code looks good. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.