From 4682bea47feb6280f15f6f9593557c77be256123 Mon Sep 17 00:00:00 2001 From: alex Date: Wed, 2 Apr 2025 13:45:03 -0400 Subject: [PATCH 1/4] wip --- docs/guides/custom-reports.md | 42 ++++++++++++++++++++++------------- 1 file changed, 27 insertions(+), 15 deletions(-) diff --git a/docs/guides/custom-reports.md b/docs/guides/custom-reports.md index c027fa1d..bbb89713 100644 --- a/docs/guides/custom-reports.md +++ b/docs/guides/custom-reports.md @@ -105,12 +105,12 @@ Contained within the `` tag. #### Comments -- ``: array of comment objects - Contains all the comments made on the PR. -- ``: object - Each indidvidual comment is wrapped in this tag and is an object with the following properties: - - ``: string - The username of the comment author. - - ``: datetime - The date and time the comment was created. - - ``: datetime - The date and time the comment was last updated. - - ``: markdown - The content of the comment. +- `${pr_comments}`: array of comment objects - Contains all the comments made on the PR. +- `${comment}`: object - Each individual comment is wrapped in this tag and is an object with the following properties: + - `${comment_author_username}`: string - The username of the comment author. + - `${comment_created_at}`: datetime - The date and time the comment was created. + - `${comment_updated_at}`: datetime - The date and time the comment was last updated. + - `${comment_body}`: markdown - The content of the comment. Here's an example prompt that uses these data points: @@ -252,17 +252,29 @@ Within each group, sort by: - Impact level ``` -### Time-Based Analysis +### Optional Data Sources -Add temporal analysis to your reports: +You can also include optional data sources in your custom reports. By default, CodeRabbit will not include the following data sources. In a custom report you will see the option to include these data sources by clicking the `Select Optional Data Sources` button. This adds special XML tags to your prompt that allow you to include this data in your report. -```text -Provide: -- Week-over-week comparison -- Trend analysis for the past month -- Velocity metrics -- Time to merge statistics -``` +#### Bot Comments + +Bot comments are comments made by bots and Coderabbit AI on a PR. To enable bot comments you must include the tag `` in your prompt. + +These are very similar in structure to regular user comments but with a few key differences: + +- ``: array of comment objects - Contains all the comments made on the PR. +- ``: object - Each individual comment is wrapped in this tag and is an object with the following properties: + - ``: string - The username of the comment author. + - ``: datetime - The date and time the comment was created. + - ``: datetime - The date and time the comment was last updated. + - ``: markdown - The content of the comment. + +#### Issues and Tickets + +Issues and tickets brings in conversations, descriptions, and comments from Jira and Linear in your repository. To enable issues and tickets you must include the tag `` in your prompt. + +- ``: array of comment objects - Contains all the comments made on the PR. +- ``: object - Each individual comment is wrapped in this tag and is an object with the following properties: ## Best Practices From cd21b7b1975abcca8e5af7840155ecffd4e7ef04 Mon Sep 17 00:00:00 2001 From: alex Date: Wed, 2 Apr 2025 13:47:35 -0400 Subject: [PATCH 2/4] add issues --- docs/guides/custom-reports.md | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/docs/guides/custom-reports.md b/docs/guides/custom-reports.md index bbb89713..3862357b 100644 --- a/docs/guides/custom-reports.md +++ b/docs/guides/custom-reports.md @@ -254,7 +254,7 @@ Within each group, sort by: ### Optional Data Sources -You can also include optional data sources in your custom reports. By default, CodeRabbit will not include the following data sources. In a custom report you will see the option to include these data sources by clicking the `Select Optional Data Sources` button. This adds special XML tags to your prompt that allow you to include this data in your report. +You can also include optional data sources in your custom reports. By default, CodeRabbit will not include the following data sources. In a custom report you will see the option to include these data sources by clicking the `Select Optional Data Sources` button. This adds special XML tags to your prompt that allow you to include this data in your report. #### Bot Comments @@ -273,8 +273,17 @@ These are very similar in structure to regular user comments but with a few key Issues and tickets brings in conversations, descriptions, and comments from Jira and Linear in your repository. To enable issues and tickets you must include the tag `` in your prompt. -- ``: array of comment objects - Contains all the comments made on the PR. -- ``: object - Each individual comment is wrapped in this tag and is an object with the following properties: +- ``: array of issue objects - Contains all the linked issues and tickets. +- ``: object - Each individual issue is wrapped in this tag and is an object with the following properties: + - ``: string - The title or thread ID of the issue. + - ``: string - The URL to the issue. + - ``: string - The unique identifier of the issue. + - ``: string - The username of who created the issue. + - ``: datetime - The date and time the issue was created. + - ``: datetime - The date and time the issue was last updated. + - ``: markdown - The content/description of the issue. This contains the following sections: + - ``: markdown - The description of the issue. + - ``: array of comment objects - Contains all the comments made on the issue. ## Best Practices From 125a354b1b0135018df898d618b6b626339ad771 Mon Sep 17 00:00:00 2001 From: alex Date: Wed, 2 Apr 2025 13:48:23 -0400 Subject: [PATCH 3/4] put comments back the way it was --- docs/guides/custom-reports.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/guides/custom-reports.md b/docs/guides/custom-reports.md index 3862357b..68fbf7f9 100644 --- a/docs/guides/custom-reports.md +++ b/docs/guides/custom-reports.md @@ -105,12 +105,12 @@ Contained within the `` tag. #### Comments -- `${pr_comments}`: array of comment objects - Contains all the comments made on the PR. -- `${comment}`: object - Each individual comment is wrapped in this tag and is an object with the following properties: - - `${comment_author_username}`: string - The username of the comment author. - - `${comment_created_at}`: datetime - The date and time the comment was created. - - `${comment_updated_at}`: datetime - The date and time the comment was last updated. - - `${comment_body}`: markdown - The content of the comment. +- ``: array of comment objects - Contains all the comments made on the PR. +- ``: object - Each indidvidual comment is wrapped in this tag and is an object with the following properties: + - ``: string - The username of the comment author. + - ``: datetime - The date and time the comment was created. + - ``: datetime - The date and time the comment was last updated. + - ``: markdown - The content of the comment. Here's an example prompt that uses these data points: From c65bfbfe7f662755847d36633ec0026341903bab Mon Sep 17 00:00:00 2001 From: alex Date: Wed, 2 Apr 2025 13:55:55 -0400 Subject: [PATCH 4/4] fix english --- docs/guides/custom-reports.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/guides/custom-reports.md b/docs/guides/custom-reports.md index 68fbf7f9..2efbab41 100644 --- a/docs/guides/custom-reports.md +++ b/docs/guides/custom-reports.md @@ -271,7 +271,7 @@ These are very similar in structure to regular user comments but with a few key #### Issues and Tickets -Issues and tickets brings in conversations, descriptions, and comments from Jira and Linear in your repository. To enable issues and tickets you must include the tag `` in your prompt. +Issues and tickets brings in conversations, descriptions, and comments from Jira and Linear as part of your report if the ticket is linked in your PR description. To enable issues and tickets you must include the tag `` in your prompt. - ``: array of issue objects - Contains all the linked issues and tickets. - ``: object - Each individual issue is wrapped in this tag and is an object with the following properties: