-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrevy.yml
75 lines (64 loc) · 1.85 KB
/
revy.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
apiVersion: reviewpad.com/v001
groups:
juniors:
description: Group of junior devs
kind: developers
spec: '["shay2025"]'
seniors:
description: Group of devs that have created more than 2 PRs
kind: developers
type: filter
param: dev
where: $totalCreatedPRs($dev) > 2
rules:
changesToMDFiles:
kind: patch
description: Patch contains changes to files with extension .md
spec: $filesExtensions([".md"])
changesMainFile:
kind: patch
description: Patch contains changes to the main file
spec: $hasFileName("go/main.go")
authoredByJunior:
kind: author
description: Patch is authored by a junior dev
spec: $isMemberOf($name(), $group("juniors"))
isSmallPatch:
kind: patch
description: Patch has less than 90 changes and 6 files
spec: $size() < 90 && $fileCount() <= 5
changesCriticalCode:
description: Patch involves a critical method or function
kind: patch
spec: $hasAnnotation("critical")
callsQuicksort:
kind: patch
description: Patch contains the keyword quicksort
spec: $codeQuery("quicksort")
protectionGates:
- name: critical
description: Modifications of critical code require careful review
patchRules:
- rule: changesCriticalCode
- rule: callsQuicksort
actions:
- $addLabel("priority")
- $assignReviewer($group("seniors"))
- name: standard
description: Standard review process
patchRules:
- rule: changesMainFile
extraActions:
- $assignReviewer(["ferreiratiago"])
- rule: authoredByJunior
actions:
- $addLabel("ask")
- $assignRandomReviewer()
- name: ship
description: Ship process - bypass the review and automerge with rebase
patchRules:
- rule: changesToMDFiles
- rule: isSmallPatch
actions:
- $addLabel("ship")
- $merge("rebase")