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

Commit 009542a

Browse files
authored
separate config for max files to summarize and review (#83)
<!-- This is an auto-generated comment: release notes by openai --> ### Summary by OpenAI Chore: Add separate configuration options for maximum files to summarize and review. This pull request updates the `Options` object and class with two new properties, `max_files_to_summarize` and `max_files_to_review`, and renames the existing `max_files` property to `max_files_to_summarize`. It also updates `tsconfig.json` by removing some options and adding others, including setting the target and module to "ESNext" and enabling strict mode. <!-- end of auto-generated comment: release notes by openai -->
1 parent 9b41bcf commit 009542a

File tree

6 files changed

+297
-205
lines changed

6 files changed

+297
-205
lines changed

action.yml

+7-2
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,15 @@ inputs:
99
required: false
1010
description: 'Enable debug mode'
1111
default: 'false'
12-
max_files:
12+
max_files_to_summarize:
13+
required: false
14+
description:
15+
'Max files to summarize. Less than or equal to 0 means no limit.'
16+
default: '60'
17+
max_files_to_review:
1318
required: false
1419
description: 'Max files to review. Less than or equal to 0 means no limit.'
15-
default: '50'
20+
default: '180'
1621
review_comment_lgtm:
1722
required: false
1823
description: 'Leave comments even if the patch is LGTM'

dist/index.js

+71-32
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/main.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ import {codeReview} from './review.js'
77
async function run(): Promise<void> {
88
const options: Options = new Options(
99
core.getBooleanInput('debug'),
10-
core.getInput('max_files'),
10+
core.getInput('max_files_to_summarize'),
11+
core.getInput('max_files_to_review'),
1112
core.getBooleanInput('review_comment_lgtm'),
1213
core.getMultilineInput('path_filters'),
1314
core.getInput('system_message'),

src/options.ts

+6-3
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,8 @@ export class Inputs {
193193

194194
export class Options {
195195
debug: boolean
196-
max_files: number
196+
max_files_to_summarize: number
197+
max_files_to_review: number
197198
review_comment_lgtm: boolean
198199
path_filters: PathFilter
199200
system_message: string
@@ -206,7 +207,8 @@ export class Options {
206207

207208
constructor(
208209
debug: boolean,
209-
max_files = '60',
210+
max_files_to_summarize = '60',
211+
max_files_to_review = '180',
210212
review_comment_lgtm = false,
211213
path_filters: string[] | null = null,
212214
system_message = '',
@@ -217,7 +219,8 @@ export class Options {
217219
openai_concurrency_limit = '4'
218220
) {
219221
this.debug = debug
220-
this.max_files = parseInt(max_files)
222+
this.max_files_to_summarize = parseInt(max_files_to_summarize)
223+
this.max_files_to_review = parseInt(max_files_to_review)
221224
this.review_comment_lgtm = review_comment_lgtm
222225
this.path_filters = new PathFilter(path_filters)
223226
this.system_message = system_message

0 commit comments

Comments
 (0)