This repository has been archived by the owner on Sep 3, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 85
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
1 parent
3a0e777
commit ef457e0
Showing
1 changed file
with
51 additions
and
19 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 |
---|---|---|
@@ -1,22 +1,54 @@ | ||
version: 2 | ||
mergeable: | ||
- when: pull_request.* | ||
name: 'PR description: versioning' | ||
- when: pull_request.*, pull_request_review.* | ||
name: Change Control Pre-Merge-Check | ||
validate: | ||
- do: or | ||
validate: | ||
- do: dependent | ||
changed: | ||
file: '**/*' | ||
required: ['HISTORY.md'] | ||
- do: description | ||
must_include: | ||
regex: 'New version is not required' | ||
message: 'Should cut a new version or explicitly documents new version not required in description' | ||
- when: pull_request.* | ||
name: 'PR description: testing' | ||
validate: | ||
- do: description | ||
must_include: | ||
regex: 'Testing completed successfully|Testing not required' | ||
message: 'Please describe how testing was done or explicitly state testing not required' | ||
- do: or | ||
validate: | ||
- do: and | ||
validate: | ||
- do: approvals | ||
min: | ||
count: 1 | ||
- do: description | ||
or: | ||
- and: | ||
- must_exclude: | ||
regex: Testing completed successfully | ||
- must_include: | ||
regex: Testing not required | ||
- and: | ||
- must_include: | ||
regex: Testing completed successfully | ||
- must_exclude: | ||
regex: Testing not required | ||
- must_include: | ||
regex: 'CC-\d{4,5}' | ||
- do: title | ||
must_include: | ||
regex: stage|staging|README|non-prod|docs | ||
pass: | ||
- do: checks | ||
status: success | ||
payload: | ||
title: Mergeable Run has been Completed! | ||
summary: All the validators are passing! | ||
fail: | ||
- do: checks | ||
status: failure | ||
payload: | ||
title: Mergeable Run has been Completed! | ||
summary: "### Status: {{toUpperCase validationStatus}}\ | ||
\nHere are some stats of the run:\ | ||
\n{{#with validationSuites.[0]}} {{ validations.length }} validations were ran. {{/with}}\n" | ||
text: "{{#each validationSuites}}\n | ||
### {{{statusIcon status}}} Change-Control Pre-Merge Check \n | ||
#### All PRs must follow bellow Change-Control rules: \n | ||
* ##### {{#with validations.[0]}} {{{statusIcon status}}} Must have at least one approval.\n {{/with}} | ||
* ##### {{#with validations.[1]}} {{{statusIcon status}}} Description includes a testing plan: \n | ||
\t ##### \"Testing not required\" OR \"Testing completed successfully\" but NOT BOTH. \n | ||
\t ##### OR \n | ||
\t ##### Jira Change-Control ticket is included.\n {{/with}}\n\n | ||
#### PRs that are exempt from Change-Control: \n | ||
* ##### {{#with validations.[2]}} {{{statusIcon status}}} Title includes stage, staging, README, non-prod, docs.\n {{/with}}\n | ||
{{/each}}" |