Skip to main content

Changelog


v4.9.0

16 May 2023

Introduction

This release updates the built-in $assignCodeAuthorReviewers.

Improvements 🚀

  • The built-in $assignCodeAuthorReviewers now does not assign a code author as a reviewer if they already have performed a review on the pull request.

v4.8.0

5 May 2023

Introduction

This release deprecates the property always-run, updates the command assign-reviewers and improves the built-in $assignRandomReviewer.

Improvements 🚀

  • The property always-run from the workflow specification is deprecated and workflows are now executed independently of each other. This means that a workflow is executed regardless of the result of the previous workflow.
  • The command assign-reviewers now takes the total number of reviewers to assign as an argument and assigns them using the built-in $assignCodeAuthorReviewers.
  • The built-in $assignRandomReviewer now fails silently when there are no reviewers available. A warning is logged into the execution log.

v4.7.0

20 April 2023

Introduction

This release introduces the run property which allows running one or multiple actions and to use if statements that include both then and else fields.

Improvements 🚀

YAML Specification

We are introducing the run property which allows us to:

  • Run one or multiple actions.
  • Use an if statement that includes both then and else fields.
  • Use nested if statements by placing them within other if statements.

Here's an example of the new syntax:

workflows:
# Running a single action
- name: Run single action
run: $addLabel("test")

# Running multiple actions
- name: Run multiple actions
run:
- $addLabel("test")
- $info("test")

# Running action with if statement
- name: Run with if
run:
- if: $author() == "bot"
then: $addLabel("bot")
else: $addLabel("human")

# Running action with nested if statements
- name: Run with nested if
run:
- if: $author() == "bot"
then:
- if: $state() == "open"
then: $addLabel("open")
else: $addLabel("closed")
else: $addLabel("human")

For more information, please refer to the syntax guide.


v4.6.0

13 April 2023

Introduction

This release introduces a more condensed version of the if, then, and actions fields. It also includes a bug fix for the $hasRequiredApprovals built-in and a fix for a bug that caused Reviewpad to fail when a review was dismissed.

Improvements 🚀

YAML Specification

We have introduced a more concise form for the if, then, and actions fields. This compact form can be used when there is a one-line condition for if and/or a single action for then.

For instance:

workflows:
- name: label too large pull requests
if: $size() >= 100
then: $addLabel("large")

Instead of:

workflows:
- name: label too large pull requests
if:
- $size() >= 100
then:
- $addLabel("large")

As for the actions field, it can be used when there is a single action to be executed. For instance:

pipelines:
- name: renovate-bot
trigger: $author() == "renovate[bot]"
stages:
- actions: $assignAssignees($group("owners"), 1)
until: $assignees() != []

Instead of:

pipelines:
- name: renovate-bot
trigger: $author() == "renovate[bot]"
stages:
- actions:
- $assignAssignees($group("owners"), 1)
until: $assignees() != []

Bugs 🐛

  • $hasRequiredApprovals built-in now only takes into account opinionated reviews, meaning that reviews with a state of APPROVED or CHANGES_REQUESTED will be considered, while those with a different state will not be considered.
  • Previously, Reviewpad would fail when a review was dismissed, but now this issue has been resolved.

v4.5.0

6 April 2023

Introduction

This release introduces the new built-ins $subMatchesString and $extractMarkdownHeadingContent. The former extracts the first match on a string based on a given regular expression pattern. The latter extracts content from a Markdown heading with the title and the heading level. It also includes an improvement on the $eventType built-in that now works for issues.

New features 🔥

Built-ins

Improvements 🚀


v4.4.0

30 March 2023

Introduction

This update includes the fix on the $eventType built-in that now does not throw an error when the event type is not available.

Bugs 🐛

  • $eventType built-in now does not throw an error when the event type is not available. When the event type is not available, the built-in is ignored.

v4.3.0

22 March 2023

Introduction

This update includes the improvement of the $hasAnyCheckRunCompleted built-in. The built-in now ignores reviewpad check runs. This update also includes the new built-in $summarize. The built-in automatically adds a comment to the pull request with a summary of the pull request generated with GPT-4.

New features 🔥

Built-ins

  • $summarize - This built-in automatically adds a comment to the pull request with a summary of the pull request generated with GPT-4.

Improvements 🚀


v4.2.0

15 March 2023

Introduction

This update includes two bug fixes. The $hasRequiredApprovals built-in now looks into the latest reviews of the required approvals. The $workflowStatus now returns the correct status of the workflow.

Bugs 🐛

  • $hasRequiredApprovals built-in now looks into the latest reviews of the required approvals. This ensures that the built-in is true only when all required reviewers have approved their latest review.
  • $workflowStatus built-in now returns the correct status of the workflow. Before this update, the built-in was not able to return the status of the workflow when the workflow was triggered by a pull request.

v4.1.0

8 March 2023

Introduction

This update includes the new built-ins $hasAnyCheckRunCompleted and $hasCodeWithoutSemanticChanges. The $assignAssignees built-in now accepts the total number of assignees to select from the provided assignees. The api-version is no longer required in the reviewpad file. Finally, the pipelines now only run on pull requests.

New features 🔥

Built-ins

  • $hasAnyCheckRunCompleted - Checks, whether any check runs for a pull request, have been completed with the provided conclusions.
  • $hasCodeWithoutSemanticChanges (experimental) - Checks if a pull request contains only code changes that do not touch the semantics of the software.

Improvements 🚀

  • $assignAssignees built-in now accepts an optional parameter total to select the amount of desired assignees from the provided list of assignees.
  • api-version is now no longer required in the reviewpad file.

Bugs 🐛

  • pipelines now only run on pull requests. Before this update, they were also running on issues.

v4.0.0

2 March 2023

Introduction

This release adds the built-in $removeFromProject that removes a pull request / issue from a project with a particular title. Also, the $rebase built-in now works on private repositories.

New features 🔥

Built-ins

  • $removeFromProject - Removes a pull request / issue from a project with a particular title.

Improvements 🚀

  • $rebase built-in now works on private repositories.

v3.27.0

24 February 2023

Introduction

This update introduces several new features and improvements. One of the latest additions is the $isUpdatedWithBaseBranch built-in that verifies if the pull request has been updated with the base branch. Additionally, the new /reviewpad run command has been added to trigger a reviewpad run. The $haveAllChecksRunCompleted built-in now includes a new check_conclusions_to_ignore parameter, and the algorithm for the $assignCodeAuthorReviewers built-in has been enhanced.

Furthermore, the $review built-in has been improved to enable it to perform a review even when the state or body of the review being conducted is different from the current review. Finally, this update addresses a bug where the transform action was missing in the pipeline's until expressions.

New features 🔥

Built-ins

Commands

Improvements 🚀

  • $haveAllChecksRunCompleted built-in now accepts an optional parameter check_conclusions_to_ignore with the list of check conclusions to ignore.
  • $assignCodeAuthorReviewers built-in has an improved algorithm to assign a random reviewer when there aren't any code authors to assign.
  • $review built-in now performs a review whenever the state or body of the review to be performed is different from the existing review.

Bugs 🐛

  • pipeline's until expressions are now appropriately transformed.

v3.26.0

17 February 2023

Introduction

This release removes the check reviewpad merge gate along with the built-in disableMerge that disabled the merge button on a pull request.


v3.25.0

15 February 2023

Introduction

This release introduces two new built-ins: $approve and $assignCodeAuthorReviewers. It also improves the $deleteHeadBranch built-in to verify if the branch exists before deleting it.

New features 🔥

Built-ins

Improvements 🚀


v3.24.0

9 February 2023

Introduction

This release introduces the check reviewpad merge gate that enables the use of the new built-in disableMerge to disable the merge button on a pull request. It updates the JSON schema that can be used to help edit the reviewpad.yml file. It adds to the logs of the Reviewpad to check the errors when extends fails or the reviewpad.yml configuration is invalid. Finally, it fixes the report when using Reviewpad on mode: verbose, and no actions are triggered.

New features 🔥

  • reviewpad merge gate check created for each pull request.

Built-ins

Improvements 🚀

  • reviewpad.yml JSON schema updated to the latest version.
  • Loading errors are reported when extends fails.
  • Configuration errors are reported when reviewpad.yml configuration is invalid.

Bugs 🐛

  • Fix empty report when using Reviewpad on mode: verbose and no actions are triggered.

v3.23.0

New features 🔥

Built-ins

Commands

  • /reviewpad dry-run - Runs Reviewpad in dry-run mode on the pull request where the command is invoked.

Improvements 🚀

Bugs 🐛


v3.22.0

New features 🔥

Commands

  • /reviewpad assign-random-reviewer - Assigns a random reviewer to a pull request

v3.21.0

New features 🔥

  • Reviewpad onboarding on installation.

Improvements 🚀

  • Ability to re-run reviewpad check when it fails.
  • Show detailed execution logs for reviewpad check.
  • review action only creates a review if the pull request has updates.

Bug 🐛

  • Fix close action to work properly for pull requests and issues.

v3.20.0

New features 🔥

Built-ins

  • toNumber - Converts a string into a number.
  • toBool - Converts a string into a boolean.
  • toStringArray - Converts a given JSON string into an array of strings.

Improvements 🚀

  • sprintf - Add support for integers and booleans.

v3.19.0

New features 🔥

Built-ins

  • context - Get a JSON serialized string of the current context (pull request / issue)
  • filesPath - Retrieve the list of all file paths changed in the pull request.
  • join - Concatenate an array of strings, using the specified separator between each member.
  • matchString - Verify if a provided regular expression pattern is matched by a given text.
  • selectFromContext - Select arbitrary value(s) from the current context (pull request / issue) using a JSONPath expression.
  • selectFromJSON - Select arbitrary value(s) from a JSON type using a JSONPath expression.
  • setProjectField - Set the value of a custom field of a GitHub project for the pull request / issue in the current context.
  • toJSON - Convert a JSON serialized string to a JSON object.

Bug 🐛

  • review built-in now properly creates a review for a pull request.

v3.18.0

New features 🔥

Configuration

  • metrics-on-merge - Specify if the Reviewpad should add a metrics report when the pull request is merged.

Built-ins

  • isBinary - Verifies whether the file in the provided path is a binary file.
  • approvalsCount - Retrieves the total number of approvals for a pull request.
  • triggerWorkflow - Triggers a workflow run for the given workflow file.
  • eventType - Retrieves the type of the pull request event.

Improvements 🚀

  • merge - By default, the merge action is only enabled for open and non-draft pull requests.

Bug 🐛

  • Changes on labels within the labels property in the Reviewpad configuration are now properly propagated to the repository.
  • extends now extends all properties of a Reviewpad configuration.

v3.17.0

New features 🔥

extends section - Reuse other Reviewpad configurations in the specification.

Built-ins

isMerged - Checks if a pull request is merged.


v3.16.0

New features 🔥

Built-ins

hasBinaryFile - Checks if a pull request has a binary file in the patch.

haveAllChecksRunCompleted - Checks if all check runs for a pull request have been completed.

isLinkedToProject - Checks if an issue is linked to a project by the title.

state - Gets the state (open or closed) of an issue or pull request.


v3.15.0

New features 🔥

Commands

We are introducing a new way to run Reviewpad - Reviewpad Commands 🎉 You can now run Reviewpad using the /reviewpad command by commenting the pull request on GitHub. The command will run the selected Reviewpad instruction on the commented pull request.

  • /reviewpad assign-reviewers - Assigns the provided reviewers to the pull request.

Built-ins

checkRunConclusion - Gets the conclusion of the given check run.

Improvements 🚀

  • Metrics report is now less verbose reporting the time spent on each step.

Bugs 🐛

  • Extra arguments on sprintf are now ignored.

v3.14.0

New features 🔥

Aladino Language

  • New Func type - Func(<PARAMETERS_TYPE_LIST>) <RETURN_TYPE> (e.g. Func(Int) String)
  • Nested array types - <NESTED_ARRAYS_TYPE><ITEMS_TYPE> (e.g. [][]String or [][][]Int)

Improvements 🚀

Aladino Language

  • Array type syntax updated to []<RETURN_TYPE> (e.g. []String)

Aladino Built-ins

Functions

  • Set pullRequestCountBy parameter state as optional (e.g. $pullRequestCountBy("username"))
  • Set issueCountBy parameter state as optional (e.g. $issueCountBy("username"))

Bugs 🐛

  • Do not re-request a review unless a new commit has been pushed.

v3.13.0

New features 🔥

Improvements 🚀

  • Add closure reason to close. Applicable only for issues.

v3.12.0

New features 🔥

Aladino Built-ins

Functions

hasRequiredApprovals - Checks if a pull request has the required number of approvals from a defined set of users.

Actions

review - Submits a pull request review.


v3.11.0

New features 🔥

Aladino Built-ins

Actions

deleteHeadBranch - Deletes the head branch of the pull request.


v3.10.0

Improvements 🚀


v3.9.0

New features 🔥

Aladino Built-ins

Actions

removeLabels - Removes the provided labels from the issue or pull request.

Bugs 🐛

  • ./reviewpad-cli check properly checks pipelines specification on reviewpad.yml file.

v3.8.0

Improvements 🚀

  • Support escaped strings on reviewpad.yml file.

Example:

$comment("<a href=\"https://reviewpad.com/discord\">Join our Discord server</a>")

Bugs 🐛

  • Support for the schedule event.
  • Run Reviewpad on safe mode when changing reviewpad.yml file.

v3.7.0

New features 🔥

Aladino Built-ins

Functions

reviewers - Returns the list of GitHub user login that have reviewed the pull request.

totalCodeReviews - Returns the total number of code reviews made by the given GitHub user login.

Improvements 🚀

  • Update the label in the repository with the description defined in the reviewpad.yml if they are different.
  • Rename previous reviewers built-in to requestedReviewers.

v3.6.0

New features 🔥

Aladino Built-ins

Functions

any - Determines if any element of a slice satisfies a given predicate.

all - Determines if all elements of a slice satisfy a given predicate.

hasGitConflicts - Determines if the pull request has git conflicts.

Improvements 🚀

  • Do not re-request a review when the reviewer has already approved the review.

v3.5.0

Improvements 🚀

Reviewpad

  • Allow number sign in label color hex values.

Aladino Language

  • Restrict typed expressions to lambda parameters.

Example:

($dev: String => $isElementOf($dev, $team("security"))))

Aladino Built-ins

Functions

  • Add excluded patterns to size built-in.

Example:

rules:
- name: size-without-lock-files
spec: $size(["*.lock"]) < 50

Actions

  • close issue/pull request with comment.

v3.4.0

New features 🔥

Aladino Language

Lambda expressions - Aladino now supports lambda functions.

Aladino Built-ins

Functions

addToProject - Adds a pull request to a project with a particular status. It is not supported for GitHub issues. issueCountBy - Returns the total number of issues created by the given GitHub user and issue state. pullRequestCountBy - Returns the total number of pull requests created by the given GitHub user and state.

Actions

titleLint - Checks if the pull request title follows the conventional commits specification.

Improvements 🚀

  • Fix issue_comment event handling to support GitHub issues and pull requests.

v3.3.1

New features 🔥

Reviewpad

  • Feature: Support for workflows on issues using the on field in the workflows. Check use case for workflow in issues here.

  • Feature: All built-ins are now open source.

Aladino Built-ins

Functions

lastEventAt - Returns the timestamp of the last event in the timeline.


v3.2.0

New features 🔥

Aladino Built-ins

Functions

hasUnaddressedThreads - Verifies whether the pull request has review threads that aren't either resolved or outdated.

Utilities

sprintf - Returns a formatted string.

Actions

addToProject - Adds a pull request to a project with a particular status.

Improvements 🚀

  • Report simplified to a list of triggered action.

v3.1.0

New features 🔥

Aladino Built-ins

Functions

reviewerStatus - Returns the status of a reviewer in the pull request.

hasUnaddressedReviewThreads - Verifies whether the pull request has review threads that are unaddressed.

isWaitingForReview - Verifies whether a pull request is waiting for review.

length - Returns the length of an array.

Actions

disableActions - Disables the list of Aladino actions passed as argument.

Improvements 🚀

  • Do not re-request a review when the reviewer has already approved the review.
  • Run reviewpad on dry-run when the configuration reviewpad.yml has been updated in the pull request.
  • Added reviewpad-cli to run reviewpad commands.

Bugs 🐛

  • Do not create labels when running on dry-run

v3.0.0

New features 🔥

This is a major version of the Reviewpad Action.

Action

  • Feature: Use GitHub event to react to more workflow run triggers beside pull_request and pull_request_target.
  • Feature: Allow file as input of the GitHub action.

Aladino Built-ins

Functions

workflowStatus - Returns the result of a GitHub workflow run.


v2.4.0

New features 🔥

Aladino Built-ins

Action

commitLint - Checks if the commits in the pull request follow the conventional commits specification.


v2.3.0

New features 🔥

Aladino Built-ins

Action

assignAssignees - Assigns up to 10 assignees to a pull request.

fail - Fails the action with a given fail message which will appear in the logs of the GitHub action.

Functions

commentCount - Returns the total number of comments made into the pull request.

comments - List comment bodies of the pull request.


v2.2.0

New features 🔥

YAML Specification

  • ignore-errors property - Specify if the GitHub action should ignore execution errors. The default value is false which means the action will fail if an error occurs.
  • labels now have a name property - Allow readable references to labels. For instance, a label can how have spaces or emojis.

Aladino Built-ins

Action

Improvements 🚀

YAML Processing

  • Fix labels section processing by creating the label in the repository whenever the defined label does not exist.

Aladino Built-ins

Action

  • assignRandomReviewer - Fetches assignees instead of collaborators. This is because GitHub API does not provide the correct list of reposittory collaborators when using GitHub Action token.
  • addLabel - Automatically creates the label if it does not exist and uses the labels section to retrieve name.
  • removeLabel - Uses the labels section to retrieve name.

New Contributors 🍻

Many thanks to our new contributors 👏


v2.1.0

New features 🔥

Aladino Built-ins

Action

Improvements 🚀

  • Fix report when on silent mode.

v2.0.0

New features 🔥

YAML Specification

  • Groups and rules are now lists instead of sets.

Improvements 🚀

  • Fix LICENSE in open source files
  • Fix 'hasLinearHistory' built-in
  • Improve linter for rules and groups
  • Fix dynamic groups

v1.2.0

Improvements 🚀

  • Add program to reviewpad run's output.

v1.1.0

New features 🔥

Aladino Built-ins

Functions

  • rule - Evaluates a rule.

Improvements 🚀

  • Fix bug in report information of a rule.

v1.0.0

New features 🔥

YAML Specification

  • Updated protectionGates syntax to workflows format.
  • Edition property

Aladino Language

  • Timestamps - RFC3339 timestamps or relative timestamps.

Aladino Built-ins

Actions

  • close - Closes a pull request.
  • comment - Adds a comment to the pull request.
  • error - Add a message to the errors section of the report.
  • info - Add a message to the info section of the report.
  • warn - Add a message to the warnings section of the report.

Functions

  • changed - Checks for correlations between file patterns.