Improved bot
This commit is contained in:
parent
796ba56e92
commit
147c9bba68
|
@ -16,6 +16,10 @@ indent_size = 2
|
|||
indent_style = space
|
||||
indent_size = 2
|
||||
|
||||
[*.yaml]
|
||||
indent_style = space
|
||||
indent_size = 2
|
||||
|
||||
[test/cases/parsing/bom/bomfile.{css,js}]
|
||||
charset = utf-8-bom
|
||||
|
||||
|
|
132
open-bot.yaml
132
open-bot.yaml
|
@ -17,7 +17,6 @@ rules:
|
|||
remove: "PR: CI-not-ok"
|
||||
comment:
|
||||
identifier: "ci-result"
|
||||
readd: true
|
||||
message: |-
|
||||
The most important CI builds succeeded. Great work so far.
|
||||
- filters:
|
||||
|
@ -31,13 +30,15 @@ rules:
|
|||
label:
|
||||
add: "PR: CI-not-ok"
|
||||
remove: "PR: CI-ok"
|
||||
comment:
|
||||
comment:
|
||||
identifier: "ci-result"
|
||||
readd: true
|
||||
message: |-
|
||||
@{{issue.user.login}} The most important CI builds failed. This way your PR can't be merged.
|
||||
|
||||
|
||||
Please take a look at the [CI results]({{status.target_url}}) and fix these issues.
|
||||
|
||||
|
||||
|
||||
# Add tests-needed label depending on codedov status
|
||||
# comment to point the user writing test cases
|
||||
# comment in case of success
|
||||
|
@ -62,7 +63,6 @@ rules:
|
|||
actions:
|
||||
comment:
|
||||
identifier: "tests-result"
|
||||
readd: true
|
||||
message: |-
|
||||
The minimum test ratio has been reached. Thanks!
|
||||
- filters:
|
||||
|
@ -75,14 +75,13 @@ rules:
|
|||
actions:
|
||||
label:
|
||||
add: "PR: tests-needed"
|
||||
comment:
|
||||
comment:
|
||||
identifier: "tests-result"
|
||||
readd: true
|
||||
message: |-
|
||||
It looks like this Pull Request doesn't include [enough test cases]({{status.target_url}}).
|
||||
|
||||
|
||||
@{{issue.user.login}} Please add more test cases.
|
||||
|
||||
|
||||
See [test readme](https://github.com/webpack/webpack/blob/master/test/README.md) for details how to write test cases.
|
||||
|
||||
|
||||
|
@ -96,12 +95,32 @@ rules:
|
|||
commit: true
|
||||
review:
|
||||
state: APPROVED|CHANGES_REQUESTED
|
||||
ensure:
|
||||
value: "{{review.state}}"
|
||||
equals: APPROVED
|
||||
actions:
|
||||
label:
|
||||
add: "PR: reviewed"
|
||||
add: "PR: reviewed-approved"
|
||||
remove:
|
||||
- "PR: review-outdated"
|
||||
- "PR: unreviewed"
|
||||
- "PR: reviewed"
|
||||
- filters:
|
||||
open: true
|
||||
in_order:
|
||||
commit: true
|
||||
review:
|
||||
state: APPROVED|CHANGES_REQUESTED
|
||||
ensure:
|
||||
value: "{{review.state}}"
|
||||
equals: CHANGES_REQUESTED
|
||||
actions:
|
||||
label:
|
||||
add: "PR: reviewed-changes-requested"
|
||||
remove:
|
||||
- "PR: review-outdated"
|
||||
- "PR: unreviewed"
|
||||
- "PR: reviewed"
|
||||
- filters:
|
||||
open: true
|
||||
in_order:
|
||||
|
@ -112,16 +131,17 @@ rules:
|
|||
label:
|
||||
add: "PR: review-outdated"
|
||||
remove:
|
||||
- "PR: reviewed"
|
||||
- "PR: reviewed-approved"
|
||||
- "PR: reviewed-changes-requested"
|
||||
- "PR: unreviewed"
|
||||
- "PR: reviewed"
|
||||
comment:
|
||||
identifier: "review-outdated"
|
||||
readd: true
|
||||
message: |-
|
||||
@{{commit.committer.login}} Thanks for your update.
|
||||
|
||||
@{{commit.author.login}} Thanks for your update.
|
||||
|
||||
I labeled the Pull Request so reviewers will review it again.
|
||||
|
||||
|
||||
@{{review.user.login}} Please review the new changes.
|
||||
- filters:
|
||||
open: true
|
||||
|
@ -140,5 +160,83 @@ rules:
|
|||
age:
|
||||
maximum: 1w
|
||||
actions:
|
||||
comment: |-
|
||||
Thanks for your Pull Request. I labeled the Pull Request, so maintainers will review it.
|
||||
comment:
|
||||
identifier: "pr-thanks"
|
||||
message: |-
|
||||
Thanks for your Pull Request. I labeled the Pull Request, so maintainers will review it.
|
||||
|
||||
|
||||
|
||||
# add/remove mentioned-sokra label
|
||||
- filters:
|
||||
open: true
|
||||
any:
|
||||
in_order:
|
||||
comment_1:
|
||||
author: "^sokra$"
|
||||
comment_2: "@sokra"
|
||||
all:
|
||||
not:
|
||||
comment_1:
|
||||
author: "^sokra$"
|
||||
comment_2: "@sokra"
|
||||
actions:
|
||||
label: "mentioned-sokra"
|
||||
- filters:
|
||||
in_order:
|
||||
comment_1: "@sokra"
|
||||
comment_2:
|
||||
author: "^sokra$"
|
||||
actions:
|
||||
label:
|
||||
remove: "mentioned-sokra"
|
||||
|
||||
|
||||
|
||||
# add hot label for many comments
|
||||
- filters:
|
||||
open: true
|
||||
number_of_comments: 10
|
||||
actions:
|
||||
label: hot
|
||||
|
||||
|
||||
|
||||
# add non-master label to pull request to other branch
|
||||
- filters:
|
||||
pull_request:
|
||||
base_ref: "^(?!master)"
|
||||
actions:
|
||||
label: "PR: non-master"
|
||||
|
||||
|
||||
|
||||
# add non-master label to pull request to other branch
|
||||
- filters:
|
||||
pull_request:
|
||||
head_ref: "^master$"
|
||||
actions:
|
||||
comment:
|
||||
identifier: "head-master"
|
||||
edit: true
|
||||
message: |-
|
||||
Hi @{{pull_request.user.login}}.
|
||||
|
||||
First thanks for your pull request.
|
||||
|
||||
Just a little hint from a friendly bot about the best practice when submitting pull request:
|
||||
|
||||
> Don't submit pull request from your own `master` branch. It's recommended to create a feature branch for the PR.
|
||||
|
||||
*You don't have to change it for this PR, just make sure to follow this hint the next time you submit a PR.*
|
||||
|
||||
|
||||
|
||||
# add small label to small pull requests
|
||||
- filters:
|
||||
pull_request:
|
||||
additions: "<= 10"
|
||||
deletions: "<= 10"
|
||||
changed_files: "<= 2"
|
||||
actions:
|
||||
label: "PR: small"
|
||||
|
|
Loading…
Reference in New Issue