forked from sidkshatriya/awesome-php
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
65 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,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). |