Skip to content
This repository was archived by the owner on Sep 3, 2022. It is now read-only.

Commit ef457e0

Browse files
some test commit message (#222)
1 parent 3a0e777 commit ef457e0

File tree

1 file changed

+51
-19
lines changed

1 file changed

+51
-19
lines changed

.github/mergeable.yml

+51-19
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,54 @@
11
version: 2
22
mergeable:
3-
- when: pull_request.*
4-
name: 'PR description: versioning'
3+
- when: pull_request.*, pull_request_review.*
4+
name: Change Control Pre-Merge-Check
55
validate:
6-
- do: or
7-
validate:
8-
- do: dependent
9-
changed:
10-
file: '**/*'
11-
required: ['HISTORY.md']
12-
- do: description
13-
must_include:
14-
regex: 'New version is not required'
15-
message: 'Should cut a new version or explicitly documents new version not required in description'
16-
- when: pull_request.*
17-
name: 'PR description: testing'
18-
validate:
19-
- do: description
20-
must_include:
21-
regex: 'Testing completed successfully|Testing not required'
22-
message: 'Please describe how testing was done or explicitly state testing not required'
6+
- do: or
7+
validate:
8+
- do: and
9+
validate:
10+
- do: approvals
11+
min:
12+
count: 1
13+
- do: description
14+
or:
15+
- and:
16+
- must_exclude:
17+
regex: Testing completed successfully
18+
- must_include:
19+
regex: Testing not required
20+
- and:
21+
- must_include:
22+
regex: Testing completed successfully
23+
- must_exclude:
24+
regex: Testing not required
25+
- must_include:
26+
regex: 'CC-\d{4,5}'
27+
- do: title
28+
must_include:
29+
regex: stage|staging|README|non-prod|docs
30+
pass:
31+
- do: checks
32+
status: success
33+
payload:
34+
title: Mergeable Run has been Completed!
35+
summary: All the validators are passing!
36+
fail:
37+
- do: checks
38+
status: failure
39+
payload:
40+
title: Mergeable Run has been Completed!
41+
summary: "### Status: {{toUpperCase validationStatus}}\
42+
\nHere are some stats of the run:\
43+
\n{{#with validationSuites.[0]}} {{ validations.length }} validations were ran. {{/with}}\n"
44+
text: "{{#each validationSuites}}\n
45+
### {{{statusIcon status}}} Change-Control Pre-Merge Check \n
46+
#### All PRs must follow bellow Change-Control rules: \n
47+
* ##### {{#with validations.[0]}} {{{statusIcon status}}} Must have at least one approval.\n {{/with}}
48+
* ##### {{#with validations.[1]}} {{{statusIcon status}}} Description includes a testing plan: \n
49+
\t ##### \"Testing not required\" OR \"Testing completed successfully\" but NOT BOTH. \n
50+
\t ##### OR \n
51+
\t ##### Jira Change-Control ticket is included.\n {{/with}}\n\n
52+
#### PRs that are exempt from Change-Control: \n
53+
* ##### {{#with validations.[2]}} {{{statusIcon status}}} Title includes stage, staging, README, non-prod, docs.\n {{/with}}\n
54+
{{/each}}"

0 commit comments

Comments
 (0)