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

Commit 516a072

Browse files
authored
fix issue with multiple release notes (#452)
<!-- This is an auto-generated comment: release notes by OSS CodeRabbit --> ### Summary by CodeRabbit ``` - Refactor: Updated `DESCRIPTION_START_TAG` constant to be a string and optimized the `removeContentWithinTags` function in `src/commenter.ts`. - Documentation: Updated product name from "Professional Version of CodeRabbit" to "CodeRabbit Pro" in README.md and src/review.ts. - New Feature: Announced that CodeRabbit Pro is now free for open source projects, as reflected in src/review.ts. ``` <!-- end of auto-generated comment: release notes by OSS CodeRabbit -->
1 parent 8f7ccd6 commit 516a072

File tree

4 files changed

+29
-67
lines changed

4 files changed

+29
-67
lines changed

README.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -56,13 +56,13 @@ FAQs, you can refer to the sections below.
5656
- [Contribute](#contribute)
5757
- [FAQs](#faqs)
5858

59-
## Professional Version of CodeRabbit
59+
## CodeRabbit Pro
6060

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

6767
## Install instructions
6868

dist/index.js

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

src/commenter.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ export const IN_PROGRESS_START_TAG =
2424
export const IN_PROGRESS_END_TAG =
2525
'<!-- end of auto-generated comment: summarize review in progress by OSS CodeRabbit -->'
2626

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

@@ -93,7 +93,7 @@ ${tag}`
9393

9494
removeContentWithinTags(content: string, startTag: string, endTag: string) {
9595
const start = content.indexOf(startTag)
96-
const end = content.indexOf(endTag)
96+
const end = content.lastIndexOf(endTag)
9797
if (start >= 0 && end >= 0) {
9898
return content.slice(0, start) + content.slice(end + endTag.length)
9999
}
@@ -155,7 +155,7 @@ ${tag}`
155155
DESCRIPTION_START_TAG,
156156
DESCRIPTION_END_TAG
157157
)
158-
const newDescription = `${description}${DESCRIPTION_START_TAG}\n${messageClean}\n${DESCRIPTION_END_TAG}`
158+
const newDescription = `${description}\n${DESCRIPTION_START_TAG}\n${messageClean}\n${DESCRIPTION_END_TAG}`
159159
await octokit.pulls.update({
160160
owner: repo.owner,
161161
repo: repo.repo,

src/review.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -465,7 +465,7 @@ ${SHORT_SUMMARY_END_TAG}
465465
466466
### CodeRabbit Pro
467467
468-
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.
468+
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.
469469
470470
</details>
471471
`

0 commit comments

Comments
 (0)