Skip to content

Commit fa6a5f8

Browse files
feat: reviewpad onboarding (#1904)
* 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]>
1 parent 9a0fd87 commit fa6a5f8

File tree

3 files changed

+62
-123
lines changed

3 files changed

+62
-123
lines changed

.cm/gitstream.cm

Lines changed: 0 additions & 74 deletions
This file was deleted.

.github/workflows/gitstream.yml

Lines changed: 0 additions & 49 deletions
This file was deleted.

reviewpad.yml

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
# This file is used to configure Reviewpad.
2+
# The configuration is a proposal to help you get started.
3+
# You can use it as a starting point and customize it to your needs.
4+
# For more details see https://docs.reviewpad.com/guides/syntax.
5+
6+
# Define the list of labels to be used by Reviewpad.
7+
# For more details see https://docs.reviewpad.com/guides/syntax#label.
8+
labels:
9+
small:
10+
description: Pull request is small
11+
color: "#76dbbe"
12+
medium:
13+
description: Pull request is medium
14+
color: "#2986cc"
15+
large:
16+
description: Pull request is large
17+
color: "#c90076"
18+
19+
# Define the list of workflows to be run by Reviewpad.
20+
# A workflow is a list of actions that will be executed based on the defined rules.
21+
# For more details see https://docs.reviewpad.com/guides/syntax#workflow.
22+
workflows:
23+
# This workflow calls Reviewpad AI agent to summarize the pull request.
24+
- name: summarize
25+
description: Summarize the pull request
26+
run:
27+
# Summarize the pull request on pull request synchronization.
28+
- if: ($eventType() == "synchronize" || $eventType() == "opened") && $state() == "open"
29+
then: $summarize()
30+
31+
# This workflow assigns a random current developer as a reviewer
32+
- name: reviewer-assignment
33+
description: Assign a random reviewer to pull requests
34+
run:
35+
# Automatically assign reviewer when the pull request is ready for review;
36+
- if: $isDraft() == false
37+
then: $assignReviewer($team("developers-current"), 1, "reviewpad")
38+
39+
# This workflow labels pull requests based on the total number of lines changed.
40+
# This helps pick pull requests based on their size and to incentivize small pull requests.
41+
- name: size-labeling
42+
description: Label pull request based on the number of lines changed
43+
run:
44+
- if: $size() < 100
45+
then: $addLabel("small")
46+
else: $removeLabel("small")
47+
- if: $size() >= 100 && $size() < 300
48+
then: $addLabel("medium")
49+
else: $removeLabel("medium")
50+
- if: $size() >= 300
51+
then: $addLabel("large")
52+
else: $removeLabel("large")
53+
54+
# This workflow signals pull requests waiting for reviews.
55+
# This helps guarantee that pull requests are reviewed and approved by at least one person.
56+
- name: check-approvals
57+
description: Check that pull requests have the required number of approvals
58+
run:
59+
# Label pull requests with `waiting-for-review` if there are no approvals;
60+
- if: $isDraft() == false && $approvalsCount() < 1
61+
then: $addLabel("waiting-for-review")
62+

0 commit comments

Comments
 (0)