Commands
Reviewpad commands introduce the ability to trigger reviewpad actions through a command-like instruction using pull request comments.
This is particularly useful when you want to trigger actions on a pull request that are not specified in the reviewpad configuration file.
A command is a comment that follows the following format:
/reviewpad [ACTION] [ACTION_ARGUMENTS]
Where ACTION is the action to be triggered and ACTION_ARGUMENTS are the arguments to be passed to the action.
Available commands
- /reviewpad assign-reviewer - Assign reviewer to a pull request.
- /reviewpad assign-random-reviewer - Assign a random reviewer to a pull request.
- /reviewpad dry-run - Run reviewpad in dry-run mode and adds a comment with the actions that would be triggered.
- /reviewpad run - Trigger a reviewpad run.
- /reviewpad summarize (🧪 EXPERIMENTAL) - Comment the pull request with the summary of the changes.
assign-reviewer
You can also use the assignCodeAuthorReviewers
as a built-in on your reviewpad.yml
configuration.
The assign-reviewer
command triggers the $assignCodeAuthorReviewers
action.
This command assigns a defined amount of reviewers to the pull request based on code author information.
Arguments:
Arguments | Description |
---|---|
total_required_reviewers | Total number of required reviewers |
Syntax:
/reviewpad assign-reviewer <total_required_reviewers>
Examples:
/reviewpad assign-reviewer
/reviewpad assign-reviewer 1
/reviewpad assign-reviewer 5
assign-random-reviewer
You can also use the assignRandomReviewer
as a built-in on your reviewpad.yml
configuration.
The assign-random-reviewer
command triggers the $assignRandomReviewer
action.
This command assigns a random user of the GitHub organization as the reviewer.
Arguments:
none
Syntax:
/reviewpad assign-random-reviewer
Examples:
/reviewpad assign-random-reviewer
dry-run
The dry-run
command runs reviewpad in dry-run mode on the pull request where the command is invoked.
The outcome of the dry-run is added as a pull request comment.
The reviewpad configuration used is the one from the pull request base branch or the head branch if the pull request updates the reviewpad configuration.
Arguments:
none
Syntax:
/reviewpad dry-run
Examples:
/reviewpad dry-run
run
The run
command triggers a reviewpad run.
The reviewpad configuration used is the one from the pull request base branch or the head branch if the pull request updates the reviewpad configuration.
Arguments:
none
Syntax:
/reviewpad run
Examples:
/reviewpad run
summarize 🧪
This is a command that is currently in beta phase.
We send information to OpenAI about the pull request, including parts of the git patch and git diff. We do not send any information that is not retrieved from the pull request. For more questions, contact us on discord.
You can also use the summarize
as a built-in on your reviewpad.yml
configuration.
The summarize
command adds a comment to the pull request with the summary of the changes.
Arguments:
none
Syntax:
/reviewpad summarize
Examples:
/reviewpad summarize