mirror of
https://github.com/namibia/awesome-php.git
synced 2024-12-23 08:08:55 +00:00
66 lines
2.0 KiB
YAML
66 lines
2.0 KiB
YAML
|
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).
|