Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: reviewpad onboarding #1904

Merged
merged 11 commits into from
May 21, 2023
74 changes: 0 additions & 74 deletions .cm/gitstream.cm

This file was deleted.

49 changes: 0 additions & 49 deletions .github/workflows/gitstream.yml

This file was deleted.

62 changes: 62 additions & 0 deletions reviewpad.yml
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")