Skip to main content
Version: 3.23.0

Common Pitfalls and How To Avoid Them

Reviewpad is a powerful tool that can help streamline your review process, but like any software, it can be easy to make mistakes.

On this page, we will be listing some of the most common pitfalls that users encounter when using Reviewpad.

By familiarizing yourself with these common mistakes, you can avoid them and get the most out of Reviewpad.

We hope that this page will help you become a more efficient and effective user of Reviewpad.

1. Parse error: failed to build AST

This error means that Reviewpad wasn't able to parse a property spec defined in the configuration.

Some of the common parsing errors are:

1.1 Using ' instead of " for strings

$addLabel('hello')$addLabel("hello")

1.2 Missing the $ prefix when using a built-in

hasFileName("README.md")$hasFileName("README.md")

1.3 Missing the parenthesis () when using a built-in

$isMerged$isMerged()

2. Using seconds on relative timestamps

For now, Reviewpad only supports minutes, hours, days, weeks, months, and years on relative timestamps. Using seconds will result in an error.

60 seconds ago1 minute ago

Here's an example of the error:

api-version: reviewpad.com/v3.x

workflows:
- name: maybe-LGTM
if:
# This will fail because we are using seconds
- rule: $totalCodeReviews() > 1 && $createdAt() < 60 seconds
then:
- $comment("This PR got a fast review. Is it a LGTM?")

3. Resource not accessible by integration

This error happens when Reviewpad has no permission to perform the requested action.

This may happen when you are using Reviewpad GitHub Action with a token that doesn't have the necessary permissions.

Or not using a token but using built-ins that require a token.

If you are using Reviewpad GitHub App you should not encounter this error. If you do, please reach out to us on our #help channel on reviewpad.com/discord or send us an email at help@reviewpad.com.