Skip to content

Review

Review is the GitHub component that works with a repository’s pull requests, the proposed code changes a team reviews before accepting them. With it you can look up one pull request or the list of pull requests, add a comment, look up its reviews, and create a review that comments, approves or requests changes.

It is useful to automate the repetitive part of code review: tell the team about pending proposals, leave a comment with the result of a check, or let an AI agent review a proposal and leave its opinion.

When to use it

  • Every morning you want to send the team the list of open pull requests.
  • An AI agent reviews a proposed change and leaves its review in GitHub.
  • You want to leave an automatic comment on a pull request when a check finishes in another system.
  • You want to know who reviewed a pull request, and with what result, before a process continues.

Configuration

You need a GitHub API credential with a GitHub Personal Access Token that has access to the repository. See Credentials.

FieldWhat it does
Credential (required)The GitHub API credential used to access your account.
Repository Input TypeHow you specify the repository. Select picks it from a list; Manual lets you type it. Default: Select.
Repository (required)With Select. The repository to work with. The list loads when you choose the credential and shows up to 100 repositories from your account; if yours is not there, use Manual.
Repository ID (required)With Manual. The repository in the format owner/repository, for example my-company/app. It also accepts the repository’s GitHub link.
Operation (required)What the component does. See Operations. Default: List PRs.
Pull Request Number (required)The pull request’s number, shown next to its title in GitHub. Used in every operation except List PRs.
Review ID (required)Only in Get Review. The ID of the review you want to look up. You get it with List Reviews.
Comment Body (required)Only in Create PR Comment. The text of the comment.
Review BodyOnly in Create Review. The text of the review. Required when Review Event is COMMENT or REQUEST_CHANGES.

Operations

OperationWhat it does
Get PRReturns a pull request’s details.
List PRsReturns the repository’s list of pull requests.
Create PR CommentAdds a simple comment to a pull request, without approving it or requesting changes.
Get ReviewReturns the details of one review of a pull request.
List ReviewsReturns all the reviews of a pull request.
Create ReviewCreates a formal review that comments, approves or requests changes, depending on Review Event.

Advanced options

FieldWhat it does
Review EventOnly in Create Review. The type of review: COMMENT (comment only), APPROVE (approves the proposal) or REQUEST_CHANGES (asks for changes). Default: COMMENT.
PR StateOnly in List PRs. all, open or closed, to filter by state. Default: open.
LimitOnly in List PRs and List Reviews. The maximum number of items to return, up to 1000. Default: 100.

Output

The Data output depends on the operation:

  • Get PR: the number, title, description, state, author, dates, whether it has been merged and whether it can be merged, the link, the source and target branches, and the number of commits, added and deleted lines and changed files.
  • List PRs: one item per pull request with its number, title, state, author, dates, link and branches.
  • Create PR Comment: a confirmation with the comment’s ID and link.
  • Get Review and List Reviews: the review’s ID, who wrote it, its result, its text, the date and the link.
  • Create Review: a confirmation with the review’s ID, its type and its link.

You can connect the result to a messaging component to alert the team, or to an agent so it can analyse it. The component can also be connected to an Agent as a tool, so the agent can look up pull requests and leave its reviews. See Tool Mode.

Example

A development team wants a daily alert with the proposals waiting for review.

  1. Add Review with the List PRs operation and pick the team’s repository.
  2. Leave PR State (advanced options) at open.
  3. Connect the Data output to an agent that prepares a summary with each proposal’s title, author and link.
  4. Send the summary to the team’s channel and schedule the flow to run every morning.
  • Issue: manage a repository’s issues.
  • Repository: lists the repositories in your account.
  • File: read and write files in a repository.
  • Release: manage published releases.