2017-03-30 17:36:27 +08:00
|
|
|
bot: "webpack-bot"
|
|
|
|
rules:
|
2017-03-30 20:47:22 +08:00
|
|
|
|
|
|
|
# Add ci-ok, ci-not-ok labels depending on travis status
|
|
|
|
# comment to point the user to the results
|
|
|
|
# comment in case of success
|
2017-03-30 17:36:27 +08:00
|
|
|
- filters:
|
|
|
|
open: true
|
|
|
|
status:
|
|
|
|
context: "continuous-integration/travis-ci/pr"
|
2017-03-30 18:01:11 +08:00
|
|
|
ensure:
|
|
|
|
value: "{{status.state}}"
|
|
|
|
equals: "success"
|
2017-03-30 17:36:27 +08:00
|
|
|
actions:
|
|
|
|
label:
|
|
|
|
add: "PR: CI-ok"
|
|
|
|
remove: "PR: CI-not-ok"
|
|
|
|
comment:
|
|
|
|
identifier: "ci-result"
|
|
|
|
message: |-
|
|
|
|
The most important CI builds succeeded. Great work so far.
|
|
|
|
- filters:
|
|
|
|
open: true
|
|
|
|
status:
|
|
|
|
context: "continuous-integration/travis-ci/pr"
|
2017-03-30 18:01:11 +08:00
|
|
|
ensure:
|
|
|
|
value: "{{status.state}}"
|
|
|
|
equals: "failure"
|
2017-03-30 17:36:27 +08:00
|
|
|
actions:
|
|
|
|
label:
|
|
|
|
add: "PR: CI-not-ok"
|
|
|
|
remove: "PR: CI-ok"
|
2017-04-01 07:27:32 +08:00
|
|
|
comment:
|
2017-03-30 17:36:27 +08:00
|
|
|
identifier: "ci-result"
|
|
|
|
message: |-
|
|
|
|
@{{issue.user.login}} The most important CI builds failed. This way your PR can't be merged.
|
2017-04-01 07:27:32 +08:00
|
|
|
|
2017-03-30 17:36:27 +08:00
|
|
|
Please take a look at the [CI results]({{status.target_url}}) and fix these issues.
|
2017-04-01 07:27:32 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
2017-03-30 21:05:40 +08:00
|
|
|
# Add tests-needed label depending on codedov status
|
|
|
|
# comment to point the user writing test cases
|
|
|
|
# comment in case of success
|
|
|
|
- filters:
|
|
|
|
open: true
|
|
|
|
status:
|
|
|
|
context: "codecov/patch"
|
|
|
|
ensure:
|
|
|
|
value: "{{status.state}}"
|
|
|
|
equals: "success"
|
|
|
|
actions:
|
|
|
|
label:
|
|
|
|
remove: "PR: tests-needed"
|
|
|
|
- filters:
|
|
|
|
open: true
|
|
|
|
status:
|
|
|
|
context: "codecov/patch"
|
|
|
|
ensure:
|
|
|
|
value: "{{status.state}}"
|
|
|
|
equals: "success"
|
|
|
|
label: "PR: tests-needed"
|
|
|
|
actions:
|
|
|
|
comment:
|
|
|
|
identifier: "tests-result"
|
|
|
|
message: |-
|
|
|
|
The minimum test ratio has been reached. Thanks!
|
|
|
|
- filters:
|
|
|
|
open: true
|
|
|
|
status:
|
|
|
|
context: "codecov/patch"
|
|
|
|
ensure:
|
|
|
|
value: "{{status.state}}"
|
|
|
|
equals: "failure"
|
2017-04-05 00:40:59 +08:00
|
|
|
age:
|
|
|
|
value: "{{status.created_at}}"
|
|
|
|
minimum: 1h
|
2017-03-30 21:05:40 +08:00
|
|
|
actions:
|
|
|
|
label:
|
|
|
|
add: "PR: tests-needed"
|
2017-04-01 07:27:32 +08:00
|
|
|
comment:
|
2017-03-30 21:05:40 +08:00
|
|
|
identifier: "tests-result"
|
|
|
|
message: |-
|
2017-03-30 21:19:14 +08:00
|
|
|
It looks like this Pull Request doesn't include [enough test cases]({{status.target_url}}).
|
2017-04-01 07:27:32 +08:00
|
|
|
|
2017-03-30 21:05:40 +08:00
|
|
|
@{{issue.user.login}} Please add more test cases.
|
2017-04-01 07:27:32 +08:00
|
|
|
|
2017-03-30 21:05:40 +08:00
|
|
|
See [test readme](https://github.com/webpack/webpack/blob/master/test/README.md) for details how to write test cases.
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-03-30 20:47:22 +08:00
|
|
|
# add unreviewed, reviewed, review-outdated labels
|
|
|
|
# comment to ping reviewer
|
|
|
|
# comment on new PR
|
|
|
|
- filters:
|
|
|
|
open: true
|
|
|
|
in_order:
|
|
|
|
commit: true
|
|
|
|
review:
|
|
|
|
state: APPROVED|CHANGES_REQUESTED
|
2017-04-01 07:27:32 +08:00
|
|
|
ensure:
|
|
|
|
value: "{{review.state}}"
|
|
|
|
equals: APPROVED
|
2017-03-30 20:47:22 +08:00
|
|
|
actions:
|
|
|
|
label:
|
2017-04-01 07:27:32 +08:00
|
|
|
add: "PR: reviewed-approved"
|
2017-03-30 20:47:22 +08:00
|
|
|
remove:
|
|
|
|
- "PR: review-outdated"
|
|
|
|
- "PR: unreviewed"
|
2017-04-01 07:27:32 +08:00
|
|
|
- "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"
|
2017-03-30 20:47:22 +08:00
|
|
|
- filters:
|
|
|
|
open: true
|
|
|
|
in_order:
|
|
|
|
review:
|
|
|
|
state: APPROVED|CHANGES_REQUESTED
|
|
|
|
commit: true
|
2017-04-04 16:31:54 +08:00
|
|
|
not:
|
|
|
|
label: "review-outdated"
|
|
|
|
ensure:
|
|
|
|
value: "{{commit.author.login}}"
|
|
|
|
notEquals: "{{review.user.login}}"
|
2017-03-30 20:47:22 +08:00
|
|
|
actions:
|
|
|
|
label:
|
|
|
|
add: "PR: review-outdated"
|
|
|
|
remove:
|
2017-04-01 07:27:32 +08:00
|
|
|
- "PR: reviewed-approved"
|
|
|
|
- "PR: reviewed-changes-requested"
|
2017-03-30 20:47:22 +08:00
|
|
|
- "PR: unreviewed"
|
2017-04-01 07:27:32 +08:00
|
|
|
- "PR: reviewed"
|
2017-03-30 21:13:08 +08:00
|
|
|
comment:
|
|
|
|
identifier: "review-outdated"
|
2017-03-30 21:13:53 +08:00
|
|
|
message: |-
|
2017-04-01 07:27:32 +08:00
|
|
|
@{{commit.author.login}} Thanks for your update.
|
|
|
|
|
2017-03-30 21:13:08 +08:00
|
|
|
I labeled the Pull Request so reviewers will review it again.
|
2017-04-01 07:27:32 +08:00
|
|
|
|
2017-03-30 21:13:08 +08:00
|
|
|
@{{review.user.login}} Please review the new changes.
|
2017-03-30 20:47:22 +08:00
|
|
|
- filters:
|
|
|
|
open: true
|
|
|
|
commit: true
|
|
|
|
not:
|
|
|
|
review:
|
|
|
|
state: APPROVED|CHANGES_REQUESTED
|
|
|
|
actions:
|
|
|
|
label: "PR: unreviewed"
|
|
|
|
- filters:
|
|
|
|
open: true
|
|
|
|
commit: true
|
|
|
|
not:
|
|
|
|
review:
|
|
|
|
state: APPROVED|CHANGES_REQUESTED
|
|
|
|
age:
|
|
|
|
maximum: 1w
|
|
|
|
actions:
|
2017-04-01 07:27:32 +08:00
|
|
|
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 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:
|
2017-04-05 00:40:59 +08:00
|
|
|
open: true
|
|
|
|
age:
|
|
|
|
minimum: 1d
|
|
|
|
maximum: 1w
|
2017-04-01 07:27:32 +08:00
|
|
|
pull_request:
|
|
|
|
head_ref: "^master$"
|
|
|
|
actions:
|
|
|
|
comment:
|
|
|
|
identifier: "head-master"
|
|
|
|
edit: true
|
|
|
|
message: |-
|
|
|
|
Hi @{{pull_request.user.login}}.
|
|
|
|
|
2017-04-05 00:40:59 +08:00
|
|
|
Just a little hint from a friendly bot about the best practice when submitting pull requests:
|
2017-04-01 07:27:32 +08:00
|
|
|
|
|
|
|
> 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:
|
2017-04-05 00:40:59 +08:00
|
|
|
open: true
|
2017-04-01 07:27:32 +08:00
|
|
|
pull_request:
|
|
|
|
additions: "<= 10"
|
|
|
|
deletions: "<= 10"
|
|
|
|
changed_files: "<= 2"
|
|
|
|
actions:
|
|
|
|
label: "PR: small"
|