Skip to content
This repository has been archived by the owner on Mar 6, 2024. It is now read-only.

Commit

Permalink
move comment (#85)
Browse files Browse the repository at this point in the history
<!-- This is an auto-generated comment: release notes by openai -->
### Summary by OpenAI

Chore: This pull request updates variable names and adds a new section
to the code review summary that lists files ignored due to filters or
max file limits. It also updates the text of some comments. These
changes aim to improve the readability and maintainability of the
codebase.
<!-- end of auto-generated comment: release notes by openai -->
  • Loading branch information
harjotgill authored Mar 24, 2023
1 parent 1ad7668 commit d02f2e0
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 30 deletions.
28 changes: 14 additions & 14 deletions dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

36 changes: 20 additions & 16 deletions src/review.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,11 @@ export const codeReview = async (

// skip files if they are filtered out
const filter_selected_files = []
const filter_skipped_files = []
const filter_ignored_files = []
for (const file of files) {
if (!options.check_path(file.filename)) {
core.info(`skip for excluded path: ${file.filename}`)
filter_skipped_files.push(file)
filter_ignored_files.push(file)
} else {
filter_selected_files.push(file)
}
Expand Down Expand Up @@ -226,21 +226,30 @@ ${filename}: ${summary}
const summarize_comment = `${summarize_final_response}
${
filter_skipped_files.length > 0
filter_ignored_files.length > 0
? `
---
### Skipped files due to filter (${filter_skipped_files.length})
- ${filter_skipped_files.map(file => file.filename).join('\n- ')}
### Files ignored due to filter (${filter_ignored_files.length})
- ${filter_ignored_files.map(file => file.filename).join('\n- ')}
`
: ''
}
${
skipped_files_to_summarize.length > 0
? `
### Files not summarized due to max files limit (${
skipped_files_to_summarize.length
})
- ${skipped_files_to_summarize.join('\n - ')}`
: ''
}
---
### Chatting with 🤖 OpenAI Bot (\`@openai\`)
- Reply on review comments left by this bot to ask follow-up questions.
A review comment is a comment on a diff or a file.
### Chat with 🤖 OpenAI Bot (\`@openai\`)
- Reply on review comments left by this bot to ask follow-up questions. A review comment is a comment on a diff or a file.
- Invite the bot into a review comment chain by tagging \`@openai\` in a reply.
`

Expand Down Expand Up @@ -444,17 +453,12 @@ ${
const comment = `
${tag}
${
skipped_files_to_summarize.length > 0
? `
### Files not summarized (${skipped_files_to_summarize.length})
- ${skipped_files_to_summarize.join('\n - ')}`
: ''
}
${
skipped_files_to_review.length > 0
? `
### Files not reviewed (${skipped_files_to_review.length})
### Files not reviewed due to max files limit (${
skipped_files_to_review.length
})
- ${skipped_files_to_review.join('\n - ')}`
: ''
}
Expand Down

0 comments on commit d02f2e0

Please sign in to comment.