mirror of https://github.com/grpc/grpc-go.git
github: add mergeable config (#3008)
This PR causes mergeable to enforce the following rules on PRs: - must include a "Type:" label - must include either the "no release notes" label or a Release milestone
This commit is contained in:
parent
5735d6dcf1
commit
74f33a446d
|
@ -0,0 +1,36 @@
|
|||
version: 2
|
||||
mergeable:
|
||||
- when: pull_request.*
|
||||
validate:
|
||||
- do: label
|
||||
must_include:
|
||||
regex: '^Type:'
|
||||
fail:
|
||||
- do: checks
|
||||
status: 'failure'
|
||||
payload:
|
||||
title: 'Need an appropriate "Type:" label'
|
||||
summary: 'Need an appropriate "Type:" label'
|
||||
- when: pull_request.*
|
||||
# This validator requires either the "no release notes" label OR a "Release" milestone
|
||||
# to be considered successful. However, validators "pass" in mergeable only if all
|
||||
# checks pass. So it is implemented in reverse.
|
||||
# I.e.: !(!no_relnotes && !release_milestone) ==> no_relnotes || release_milestone
|
||||
# If both validators pass, then it is considered a failure, and if either fails, it is
|
||||
# considered a success.
|
||||
validate:
|
||||
- do: label
|
||||
must_exclude:
|
||||
regex: '^no release notes$'
|
||||
- do: milestone
|
||||
must_exclude:
|
||||
regex: 'Release$'
|
||||
pass:
|
||||
- do: checks
|
||||
status: 'failure' # fail on pass
|
||||
payload:
|
||||
title: 'Need Release milestone or "no release notes" label'
|
||||
summary: 'Need Release milestone or "no release notes" label'
|
||||
fail:
|
||||
- do: checks
|
||||
status: 'success' # pass on fail
|
Loading…
Reference in New Issue