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

fix issue with multiple release notes #452

Merged
merged 3 commits into from
Sep 1, 2023
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,13 +56,13 @@ FAQs, you can refer to the sections below.
- [Contribute](#contribute)
- [FAQs](#faqs)

## Professional Version of CodeRabbit
## CodeRabbit Pro

The professional version of `openai-pr-reviewer` project is now available at
[coderabbit.ai](http://coderabbit.ai). Building upon our open-source foundation,
CodeRabbit offers premium features including enhanced context and superior noise
reduction, dedicated support, and our ongoing commitment to improve code
reviews.
[coderabbit.ai](http://coderabbit.ai). Building upon our open source foundation,
CodeRabbit Pro offers premium features including enhanced context and superior
noise reduction, dedicated support, and our ongoing commitment to improve code
reviews. Moreover, CodeRabbit Pro is free for open source projects.

## Install instructions

Expand Down
76 changes: 19 additions & 57 deletions dist/index.js

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

8 changes: 4 additions & 4 deletions src/commenter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ export const IN_PROGRESS_START_TAG =
export const IN_PROGRESS_END_TAG =
'<!-- end of auto-generated comment: summarize review in progress by OSS CodeRabbit -->'

export const DESCRIPTION_START_TAG = `
<!-- This is an auto-generated comment: release notes by OSS CodeRabbit -->`
export const DESCRIPTION_START_TAG =
'<!-- This is an auto-generated comment: release notes by OSS CodeRabbit -->'
export const DESCRIPTION_END_TAG =
'<!-- end of auto-generated comment: release notes by OSS CodeRabbit -->'

Expand Down Expand Up @@ -93,7 +93,7 @@ ${tag}`

removeContentWithinTags(content: string, startTag: string, endTag: string) {
const start = content.indexOf(startTag)
const end = content.indexOf(endTag)
const end = content.lastIndexOf(endTag)
if (start >= 0 && end >= 0) {
return content.slice(0, start) + content.slice(end + endTag.length)
}
Expand Down Expand Up @@ -155,7 +155,7 @@ ${tag}`
DESCRIPTION_START_TAG,
DESCRIPTION_END_TAG
)
const newDescription = `${description}${DESCRIPTION_START_TAG}\n${messageClean}\n${DESCRIPTION_END_TAG}`
const newDescription = `${description}\n${DESCRIPTION_START_TAG}\n${messageClean}\n${DESCRIPTION_END_TAG}`
await octokit.pulls.update({
owner: repo.owner,
repo: repo.repo,
Expand Down
2 changes: 1 addition & 1 deletion src/review.ts
Original file line number Diff line number Diff line change
Expand Up @@ -465,7 +465,7 @@ ${SHORT_SUMMARY_END_TAG}

### CodeRabbit Pro

If you like this project, please support us by purchasing the [Pro version](https://coderabbit.ai). The Pro version has advanced context, superior noise reduction and several proprietary improvements compared to the open source version.
If you like this project, please support us by purchasing the [Pro version](https://coderabbit.ai). The Pro version has advanced context, superior noise reduction and several proprietary improvements compared to the open source version. Moreover, CodeRabbit Pro is free for open source projects.

</details>
`
Expand Down