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

Commit e26b178

Browse files
authored
provide short summary when reviewing each file and commenting (#268)
1 parent 716fca3 commit e26b178

File tree

6 files changed

+191
-211
lines changed

6 files changed

+191
-211
lines changed

dist/index.js

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

src/commenter.ts

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,13 @@ export const RAW_SUMMARY_START_TAG = `<!-- This is an auto-generated comment: ra
2929
export const RAW_SUMMARY_END_TAG = `-->
3030
<!-- end of auto-generated comment: raw summary by openai -->`
3131

32+
export const SHORT_SUMMARY_START_TAG = `<!-- This is an auto-generated comment: short summary by openai -->
33+
<!--
34+
`
35+
36+
export const SHORT_SUMMARY_END_TAG = `-->
37+
<!-- end of auto-generated comment: short summary by openai -->`
38+
3239
export const COMMIT_ID_START_TAG = '<!-- commit_ids_reviewed_start -->'
3340
export const COMMIT_ID_END_TAG = '<!-- commit_ids_reviewed_end -->'
3441

@@ -95,6 +102,14 @@ ${tag}`
95102
)
96103
}
97104

105+
getShortSummary(summary: string) {
106+
return this.getContentWithinTags(
107+
summary,
108+
SHORT_SUMMARY_START_TAG,
109+
SHORT_SUMMARY_END_TAG
110+
)
111+
}
112+
98113
getDescription(description: string) {
99114
return this.removeContentWithinTags(
100115
description,

0 commit comments

Comments
 (0)