forked from ziadoz/awesome-php
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.varci.yml
65 lines (57 loc) · 2.04 KB
/
.varci.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
ruleset:
body_link:
name: "Pull requests that add links should also include them in the body"
events: [ pull_request ]
when:
- action = "opened"
- files = ["README.md"]
- deletions = 0
- not (body_links.added contains diff_links.added)
comment: |
This pull request adds the following suggestion:
{{ diff.added.0 }}
broken_link:
name: "Pull request diff contains broken links"
events: [ pull_request ]
when:
- action = "opened"
- count(diff_links.broken) > 0
comment: >
@{{ user.login }}, at least one of the links in the pull request diff was
reported as broken:
- {{ diff_links.broken.0 }}
missing_link:
name: "Suggestions should include a link"
events: [ pull_request ]
when:
- action = "opened"
- files = ["README.md"]
- deletions = 0
- additions = 1
- count(grep("/^\* /", diff.added)) = 1
- count(diff_links.added) != 1
comment: >
@{{ user.login }}, it looks like you have added a new suggestion to the
`README.md` file but haven't linked to the project. Please update the
`README.md` to also link to the project, thanks!
multiple_additions:
name: "Pull request should only suggest one addition at a time"
events: [ pull_request ]
comment: |
@{{ user.login }}, it looks like you are trying to add multiple suggestions in a single pull request.
If so, please split these into multiple pull requests so each item's inclusion in the list can be discussed separately.
when:
- action = "opened"
- files = ["README.md"]
- deletions = 0
- count(grep("/^\* /", diff.added)) > 1
needs_explanation:
name: 'Pull request bodies should have a detailed explanation'
events: [ pull_request ]
label: 'needs: explanation'
when:
- action = "opened"
- length(body) < 25
message: >
@{{ user.login }}, please update the pull request body with a description
of what you are adding or changing (of at least 25 characters).