| /** |
| * Copyright (C) 2019 The Android Open Source Project |
| * |
| * Licensed under the Apache License, Version 2.0 (the "License"); |
| * you may not use this file except in compliance with the License. |
| * You may obtain a copy of the License at |
| * |
| * http://www.apache.org/licenses/LICENSE-2.0 |
| * |
| * Unless required by applicable law or agreed to in writing, software |
| * distributed under the License is distributed on an "AS IS" BASIS, |
| * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| * See the License for the specific language governing permissions and |
| * limitations under the License. |
| */ |
| |
| {namespace com.google.gerrit.server.mail.template.CombinedCheckStateUpdated} |
| |
| /** |
| * The .CombinedCheckStateUpdated template will determine the contents of the email related to a |
| * change for which the combined check state was updated. |
| */ |
| {template .CombinedCheckStateUpdated kind="text"} |
| {@param email: ?} |
| {@param change: ?} |
| {@param patchSet: ?} |
| {@param checker: ?} |
| {@param oldCombinedCheckState: ?} |
| {@param newCombinedCheckState: ?} |
| {@param allCheckers: ?} |
| The combined check state has been updated to {$newCombinedCheckState} for patch set{sp} |
| {$patchSet.patchSetId} of this change |
| {if $email.changeUrl}{sp}( {$email.changeUrl} ){/if} |
| .{\n} |
| {if $checker and $checker.check.state == 'FAILED' |
| and ($newCombinedCheckState == 'FAILED' |
| or ($newCombinedCheckState == 'WARNING' and $oldCombinedCheckState != 'FAILED'))} |
| {\n} |
| Checker {$checker.name} |
| {if $checker.url}{sp}( {$checker.url} ){/if} |
| {sp}updated the check state to {$checker.check.state} |
| {if $checker.check.url}{sp}( {$checker.check.url} ){/if} |
| {if $checker.check.message} |
| :{\n} |
| {$checker.check.message}{\n} |
| {else} |
| .{\n} |
| {/if} |
| {/if} |
| {\n} |
| {if $allCheckers} |
| All checks:{\n} |
| {call .PrintCheckers_Text} |
| {param state: 'Successful' /} |
| {param checkers: $allCheckers.successful /} |
| {/call} |
| {call .PrintCheckers_Text} |
| {param state: 'Not Relevant' /} |
| {param checkers: $allCheckers.notRelevant /} |
| {/call} |
| {call .PrintCheckers_Text} |
| {param state: 'Failed' /} |
| {param checkers: $allCheckers.failed /} |
| {/call} |
| {call .PrintCheckers_Text} |
| {param state: 'Running' /} |
| {param checkers: $allCheckers.running /} |
| {/call} |
| {call .PrintCheckers_Text} |
| {param state: 'Scheduled' /} |
| {param checkers: $allCheckers.scheduled /} |
| {/call} |
| {call .PrintCheckers_Text} |
| {param state: 'Not Started' /} |
| {param checkers: $allCheckers.notStarted /} |
| {/call} |
| {/if} |
| {\n} |
| Change subject: {$change.subject}{\n} |
| ......................................................................{\n} |
| {/template} |
| |
| {template .PrintCheckers_Text kind="text"} |
| {@param state: ?} |
| {@param checkers: ?} |
| {if length($checkers) > 0} |
| {$state}:{sp} |
| {for $checker, $index in $checkers} |
| {$checker.name}{if $index < length($checkers) - 1},{sp}{/if} |
| {/for} |
| {\n} |
| {/if} |
| {/template} |