|
1 | | -# MessageKit, 2020 |
| 1 | +# |
| 2 | +# MIT License |
| 3 | +# |
| 4 | +# Copyright (c) 2017-2020 MessageKit |
| 5 | +# |
| 6 | +# Permission is hereby granted, free of charge, to any person obtaining a copy |
| 7 | +# of this software and associated documentation files (the "Software"), to deal |
| 8 | +# in the Software without restriction, including without limitation the rights |
| 9 | +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
| 10 | +# copies of the Software, and to permit persons to whom the Software is |
| 11 | +# furnished to do so, subject to the following conditions: |
| 12 | + |
| 13 | +# The above copyright notice and this permission notice shall be included in all |
| 14 | +# copies or substantial portions of the Software. |
| 15 | + |
| 16 | +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
| 17 | +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
| 18 | +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
| 19 | +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
| 20 | +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
| 21 | +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE |
| 22 | +# SOFTWARE. |
2 | 23 |
|
3 | 24 | # This runs on CI |
4 | 25 | mergeable_state = github.pr_json["mergeable_state"] |
5 | 26 |
|
6 | 27 | # Make it more obvious that a PR a draft |
7 | 28 | if mergeable_state == "draft" |
8 | | - warn("PR is marked as Draft") |
| 29 | + warn("PR is marked as Draft") |
9 | 30 | end |
10 | 31 |
|
11 | 32 | # Mainly to encourage writing up some reasoning about the PR, rather than just leaving a title |
12 | 33 | if github.pr_body.length < 5 |
13 | | - fail("Please provide a summary in the Pull Request description") |
| 34 | + fail("Please provide a summary in the Pull Request description") |
14 | 35 | end |
15 | 36 |
|
16 | 37 | declared_hashtag = github.pr_title.include?("#trivial") |
17 | 38 | hasChangelogEntry = git.modified_files.include?("CHANGELOG.md") |
18 | 39 | if !hasChangelogEntry && !declared_hashtag |
19 | | - fail("Please include a CHANGELOG entry. \nYou can find it at [CHANGELOG.md](https://github.com/MessageKit/MessageKit/blob/master/CHANGELOG.md).") |
| 40 | + fail("Please include a CHANGELOG entry. \nYou can find it at [CHANGELOG.md](https://github.com/MessageKit/MessageKit/blob/master/CHANGELOG.md).") |
20 | 41 | end |
21 | 42 |
|
22 | 43 | # Warn when there is a big PR |
23 | 44 | if git.lines_of_code > 1000 |
24 | | - warn("Big Pull Request - Please consider splitting up your changes into smaller Pull Requests.") |
| 45 | + warn("Big Pull Request - Please consider splitting up your changes into smaller Pull Requests.") |
25 | 46 | end |
26 | 47 |
|
27 | 48 | swiftlint.config_file = '.swiftlint.yml' |
28 | | -swiftlint.lint_files inline_mode:true |
29 | | -swiftlint.lint_files fail_on_error:true |
| 49 | +swiftlint.lint_files inline_mode:true, fail_on_error:true |
0 commit comments