Skip to content

Commit

Permalink
provide short summary when reviewing each file and commenting (codera…
Browse files Browse the repository at this point in the history
  • Loading branch information
harjotgill authored May 1, 2023
1 parent 51d7a8f commit 893efad
Show file tree
Hide file tree
Showing 6 changed files with 191 additions and 211 deletions.
184 changes: 86 additions & 98 deletions dist/index.js

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

15 changes: 15 additions & 0 deletions src/commenter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,13 @@ export const RAW_SUMMARY_START_TAG = `<!-- This is an auto-generated comment: ra
export const RAW_SUMMARY_END_TAG = `-->
<!-- end of auto-generated comment: raw summary by openai -->`

export const SHORT_SUMMARY_START_TAG = `<!-- This is an auto-generated comment: short summary by openai -->
<!--
`

export const SHORT_SUMMARY_END_TAG = `-->
<!-- end of auto-generated comment: short summary by openai -->`

export const COMMIT_ID_START_TAG = '<!-- commit_ids_reviewed_start -->'
export const COMMIT_ID_END_TAG = '<!-- commit_ids_reviewed_end -->'

Expand Down Expand Up @@ -95,6 +102,14 @@ ${tag}`
)
}

getShortSummary(summary: string) {
return this.getContentWithinTags(
summary,
SHORT_SUMMARY_START_TAG,
SHORT_SUMMARY_END_TAG
)
}

getDescription(description: string) {
return this.removeContentWithinTags(
description,
Expand Down
Loading

0 comments on commit 893efad

Please sign in to comment.