<pr_details>
tag.
Merged
: boolean (true/false) - Whether the PR has been merged
Draft
: boolean (true/false) - Whether the PR is in draft state
State
: string (“open”/“closed”) - Current state of the PR
Mergeable
: boolean (true/false) - Whether the PR can be merged
Is stale
: boolean - Whether PR has been inactive for over 168 hours
PR Stage
: string - The current stage of open PRs in Open or Draft state, can be one of:
<pr_details>
tag.
Pull request number
: number - The PR’s identifierTitle
: string - PR titleURL
: string - Link to the PRAuthor name
: string - PR creator’s usernameCreated at
: datetime - When the PR was createdLast activity
: datetime - Most recent activity timestampClosed at
: datetime (if applicable) - When the PR was closedSource branch
: string - Source branch nameTarget branch
: string - Target branch nameLabels
: array of strings - All labels applied to the PRReviewers
: array of strings - Assigned reviewers’ usernames<pr_description>
: string - Contains the body of your pull request (aka the PR description at the top of the PR page).
<file_changes_summary>
: string - Contains a file by file summary of the changes made in the PR in markdown format. This summary is generated by CodeRabbit AI during the PR review process. This includes several sections for each file that was changed:
filename
: string - The name of the file that was changed.AI-generated summary of changes
: markdown - An overall summary of the changes made in the file.Alterations to the declarations of exported or public entities
: markdown - A more specific breakdown of the changes made to the file such as exactly what was added, removed, or modified.<pr_comments>
: array of comment objects - Contains all the comments made on the PR.
<comment>
: object - Each indidvidual 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.<pr_checks>
: array of check objects - Contains all CI/CD checks for the PR. GitHub Only.
<pr_check>
: object - Each individual check is wrapped in this tag and is an object with the following properties:
<pr_check_name>
: string - The name of the CI/CD check.<pr_check_status>
: string - The status of the check (e.g., “success”, “failure”, “in_progress”, “canceled”).<pr_check_url>
: string - The URL to view the detailed results of the check.#
, ##
, ###
)Executive Summary Template
then this string will appear on the subject of your emails and start of all message chains.
When using the Preview Report
button in the CodeRabbit menu, the subject will begin with Preview: <report name>
.
The reports will also have an overall title describing the report content such as Pull Request Summary Report (January 2025)
.
To change these details of this overall title you should include specific instructions in your custom prompt with examples such as:
Select Optional Data Sources
button. This adds special XML tags to your prompt that allow you to include this data in your report.
<include_bot_comments>
in your prompt.
These are very similar in structure to regular user comments but with a few key differences:
<bot_comments>
: array of comment objects - Contains all the comments made on the PR.
<bot_comment>
: object - Each individual comment is wrapped in this tag and is an object with the following properties:
<bot_name>
: string - The username of the comment author.<bot_comment_created_at>
: datetime - The date and time the comment was created.<bot_comment_updated_at>
: datetime - The date and time the comment was last updated.<bot_comment_body>
: markdown - The content of the comment.<include_issues_and_tickets>
in your prompt.
<issues_and_tickets>
: array of issue objects - Contains all the linked issues and tickets.
<issue>
: object - Each individual issue is wrapped in this tag and is an object with the following properties:
<issue_title>
: string - The title or thread ID of the issue.
<issue_url>
: string - The URL to the issue.
<issue_id>
: string - The unique identifier of the issue.
<issue_author>
: string - The username of who created the issue.
<issue_created_at>
: datetime - The date and time the issue was created.
<issue_updated_at>
: datetime - The date and time the issue was last updated.
<issue_body>
: markdown - The content/description of the issue. This contains the following sections:
<issue_description>
: markdown - The description of the issue.<issue_comments>
: array of comment objects - Contains all the comments made on the issue.<pr_score_card>
in your prompt.
IMPORTANT: This will automatically remove any pull requests from your reports if they do not contain a “Score Card” or “Score Chart” bot comment. Using this option without setting up a flow to create these comments will result in No new pull request activity in the last XYZ hours
errors. Do not enable this option unless you have asked CodeRabbit to create a “Score Card” through a comment or implemented the “Score Chart” bot comment flow below.
For example, you can ask CodeRabbit to check several conditions on a pull request and produce a “Score Chart”:
Click to view example User Score Card/Chart Comment:
Click to view resulting Score Card/Chart bot comment:
Click to view example Report Prompt when using Score Card/Chart:
@coderabbitai
in the comment.<overall_summary>
and <example>
tag blocks to keep consistency across reports: