-
Notifications
You must be signed in to change notification settings - Fork 226
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat: add reviewpad.yml file * chore: update reviewpad.yml configuration file * chore: update reviewpad.yml configuration file * chore: update reviewpad.yml configuration file * chore: update reviewpad.yml configuration file * chore: update reviewpad.yml configuration file * Delete gitstream.cm * Assign team-reviewer * Delete gitstream.yml * Simplify reviewer-assignment logic --------- Co-authored-by: reviewpad[bot] <104832597+reviewpad[bot]@users.noreply.github.com> Co-authored-by: Damian Ho <[email protected]>
- Loading branch information
1 parent
9a0fd87
commit fa6a5f8
Showing
3 changed files
with
62 additions
and
123 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
# This file is used to configure Reviewpad. | ||
# The configuration is a proposal to help you get started. | ||
# You can use it as a starting point and customize it to your needs. | ||
# For more details see https://docs.reviewpad.com/guides/syntax. | ||
|
||
# Define the list of labels to be used by Reviewpad. | ||
# For more details see https://docs.reviewpad.com/guides/syntax#label. | ||
labels: | ||
small: | ||
description: Pull request is small | ||
color: "#76dbbe" | ||
medium: | ||
description: Pull request is medium | ||
color: "#2986cc" | ||
large: | ||
description: Pull request is large | ||
color: "#c90076" | ||
|
||
# Define the list of workflows to be run by Reviewpad. | ||
# A workflow is a list of actions that will be executed based on the defined rules. | ||
# For more details see https://docs.reviewpad.com/guides/syntax#workflow. | ||
workflows: | ||
# This workflow calls Reviewpad AI agent to summarize the pull request. | ||
- name: summarize | ||
description: Summarize the pull request | ||
run: | ||
# Summarize the pull request on pull request synchronization. | ||
- if: ($eventType() == "synchronize" || $eventType() == "opened") && $state() == "open" | ||
then: $summarize() | ||
|
||
# This workflow assigns a random current developer as a reviewer | ||
- name: reviewer-assignment | ||
description: Assign a random reviewer to pull requests | ||
run: | ||
# Automatically assign reviewer when the pull request is ready for review; | ||
- if: $isDraft() == false | ||
then: $assignReviewer($team("developers-current"), 1, "reviewpad") | ||
|
||
# This workflow labels pull requests based on the total number of lines changed. | ||
# This helps pick pull requests based on their size and to incentivize small pull requests. | ||
- name: size-labeling | ||
description: Label pull request based on the number of lines changed | ||
run: | ||
- if: $size() < 100 | ||
then: $addLabel("small") | ||
else: $removeLabel("small") | ||
- if: $size() >= 100 && $size() < 300 | ||
then: $addLabel("medium") | ||
else: $removeLabel("medium") | ||
- if: $size() >= 300 | ||
then: $addLabel("large") | ||
else: $removeLabel("large") | ||
|
||
# This workflow signals pull requests waiting for reviews. | ||
# This helps guarantee that pull requests are reviewed and approved by at least one person. | ||
- name: check-approvals | ||
description: Check that pull requests have the required number of approvals | ||
run: | ||
# Label pull requests with `waiting-for-review` if there are no approvals; | ||
- if: $isDraft() == false && $approvalsCount() < 1 | ||
then: $addLabel("waiting-for-review") | ||
|