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

Commit d02f2e0

Browse files
authored
move comment (#85)
<!-- 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 -->
1 parent 1ad7668 commit d02f2e0

File tree

2 files changed

+34
-30
lines changed

2 files changed

+34
-30
lines changed

dist/index.js

Lines changed: 14 additions & 14 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/review.ts

Lines changed: 20 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -67,11 +67,11 @@ export const codeReview = async (
6767

6868
// skip files if they are filtered out
6969
const filter_selected_files = []
70-
const filter_skipped_files = []
70+
const filter_ignored_files = []
7171
for (const file of files) {
7272
if (!options.check_path(file.filename)) {
7373
core.info(`skip for excluded path: ${file.filename}`)
74-
filter_skipped_files.push(file)
74+
filter_ignored_files.push(file)
7575
} else {
7676
filter_selected_files.push(file)
7777
}
@@ -226,21 +226,30 @@ ${filename}: ${summary}
226226
const summarize_comment = `${summarize_final_response}
227227
228228
${
229-
filter_skipped_files.length > 0
229+
filter_ignored_files.length > 0
230230
? `
231231
---
232232
233-
### Skipped files due to filter (${filter_skipped_files.length})
234-
- ${filter_skipped_files.map(file => file.filename).join('\n- ')}
233+
### Files ignored due to filter (${filter_ignored_files.length})
234+
- ${filter_ignored_files.map(file => file.filename).join('\n- ')}
235235
`
236236
: ''
237237
}
238238
239+
${
240+
skipped_files_to_summarize.length > 0
241+
? `
242+
### Files not summarized due to max files limit (${
243+
skipped_files_to_summarize.length
244+
})
245+
- ${skipped_files_to_summarize.join('\n - ')}`
246+
: ''
247+
}
248+
239249
---
240250
241-
### Chatting with 🤖 OpenAI Bot (\`@openai\`)
242-
- Reply on review comments left by this bot to ask follow-up questions.
243-
A review comment is a comment on a diff or a file.
251+
### Chat with 🤖 OpenAI Bot (\`@openai\`)
252+
- 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.
244253
- Invite the bot into a review comment chain by tagging \`@openai\` in a reply.
245254
`
246255

@@ -444,17 +453,12 @@ ${
444453
const comment = `
445454
${tag}
446455
447-
${
448-
skipped_files_to_summarize.length > 0
449-
? `
450-
### Files not summarized (${skipped_files_to_summarize.length})
451-
- ${skipped_files_to_summarize.join('\n - ')}`
452-
: ''
453-
}
454456
${
455457
skipped_files_to_review.length > 0
456458
? `
457-
### Files not reviewed (${skipped_files_to_review.length})
459+
### Files not reviewed due to max files limit (${
460+
skipped_files_to_review.length
461+
})
458462
- ${skipped_files_to_review.join('\n - ')}`
459463
: ''
460464
}

0 commit comments

Comments
 (0)