-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
4 changed files
with
82 additions
and
0 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
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 |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# Warn when there is a big PR | ||
warn("Big PR") if git.lines_of_code > 500 | ||
|
||
# Sometimes its a README fix, or something like that - which isn't relevant for | ||
# including in a CHANGELOG for example | ||
has_app_changes = !git.modified_files.grep(/Source/).empty? | ||
has_test_changes = !git.modified_files.grep(/Tests/).empty? | ||
|
||
# Add a CHANGELOG entry for app changes | ||
if !git.modified_files.include?("CHANGELOG.md") && has_app_changes | ||
fail("Please include a CHANGELOG entry to credit yourself! \nYou can find it at [CHANGELOG.md](https://github.com/realm/SwiftLint/blob/master/CHANGELOG.md).") | ||
markdown <<-MARKDOWN | ||
Here's an example of your CHANGELOG entry: | ||
```markdown | ||
* #{github.pr_title}#{' '} | ||
[#{github.pr_author}](https://github.com/#{github.pr_author}) | ||
[#issue_number](https://github.com/realm/SwiftLint/issues/issue_number) | ||
``` | ||
*note*: There are two invisible spaces after the entry's text. | ||
MARKDOWN | ||
end | ||
|
||
# Non-trivial amounts of app changes without tests | ||
if git.lines_of_code > 50 && has_app_changes && !has_test_changes | ||
warn "This PR may need tests." | ||
end |
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 |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# frozen_string_literal: true | ||
source "https://rubygems.org" | ||
|
||
gem "danger" |
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 |
---|---|---|
@@ -0,0 +1,51 @@ | ||
GEM | ||
remote: https://rubygems.org/ | ||
specs: | ||
addressable (2.5.0) | ||
public_suffix (~> 2.0, >= 2.0.2) | ||
claide (1.0.1) | ||
claide-plugins (0.9.2) | ||
cork | ||
nap | ||
open4 (~> 1.3) | ||
colored (1.2) | ||
cork (0.2.0) | ||
colored (~> 1.2) | ||
danger (4.0.3) | ||
claide (~> 1.0) | ||
claide-plugins (>= 0.9.2) | ||
colored (~> 1.2) | ||
cork (~> 0.1) | ||
faraday (~> 0.9) | ||
faraday-http-cache (~> 1.0) | ||
git (~> 1) | ||
kramdown (~> 1.5) | ||
octokit (~> 4.2) | ||
terminal-table (~> 1) | ||
faraday (0.10.0) | ||
multipart-post (>= 1.2, < 3) | ||
faraday-http-cache (1.3.1) | ||
faraday (~> 0.8) | ||
git (1.3.0) | ||
kramdown (1.13.1) | ||
multipart-post (2.0.0) | ||
nap (1.1.0) | ||
octokit (4.6.2) | ||
sawyer (~> 0.8.0, >= 0.5.3) | ||
open4 (1.3.4) | ||
public_suffix (2.0.4) | ||
sawyer (0.8.1) | ||
addressable (>= 2.3.5, < 2.6) | ||
faraday (~> 0.8, < 1.0) | ||
terminal-table (1.7.3) | ||
unicode-display_width (~> 1.1.1) | ||
unicode-display_width (1.1.2) | ||
|
||
PLATFORMS | ||
ruby | ||
|
||
DEPENDENCIES | ||
danger | ||
|
||
BUNDLED WITH | ||
1.13.6 |