File tree Expand file tree Collapse file tree 1 file changed +41
-0
lines changed Expand file tree Collapse file tree 1 file changed +41
-0
lines changed Original file line number Diff line number Diff line change
1
+ # -*- mode: yaml -*-
2
+
3
+ manifest :
4
+ version : 1.0
5
+
6
+ automations :
7
+ best_practices :
8
+ if :
9
+ - {{ branch.diff.size < 150 }}
10
+ - {{ (has.jira_ticket_in_title or has.jira_ticket_in_desc) }}
11
+ - {{ branch | estimatedReviewTime < 10 }}
12
+ - {{ files | match(regex=r/Standard\/best-practices\//) | every }}
13
+ run :
14
+ - action : add-label@v1
15
+ args :
16
+ label : " 🌟 Best Practices 🌟"
17
+ color : {{ colors.green }}
18
+ - action : add-comment@v1
19
+ args :
20
+ comment : " Thank you for following the team's recommended development practices!"
21
+ estimated_time_to_review :
22
+ if :
23
+ - true
24
+ run :
25
+ - action : add-label@v1
26
+ args :
27
+ label : " {{ calc.etr }} min review"
28
+ color : {{ colors.red if (calc.etr >= 20) else ( colors.yellow if (calc.etr >= 5) else colors.green ) }}
29
+
30
+ calc :
31
+ etr : {{ branch | estimatedReviewTime }}
32
+
33
+
34
+ colors :
35
+ red : ' b60205'
36
+ yellow : ' fbca04'
37
+ green : ' 0e8a16'
38
+
39
+ has :
40
+ jira_ticket_in_title : {{ pr.title | includes(regex=r/\b[A-Za-z]+-\d+\b/) }}
41
+ jira_ticket_in_desc : {{ pr.description | includes(regex=r/atlassian.net/) }}
You can’t perform that action at this time.
0 commit comments