From 0cce2be16258058def30bb03a30ec56c0649c8b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Go=CC=88drei=20Krisztia=CC=81n?= Date: Wed, 11 Sep 2019 17:30:51 +0200 Subject: [PATCH 1/4] add Danger --- Dangerfile | 9 +++++++++ Gemfile | 7 +++++++ Gemfile.lock | 56 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 72 insertions(+) create mode 100644 Dangerfile create mode 100644 Gemfile create mode 100644 Gemfile.lock diff --git a/Dangerfile b/Dangerfile new file mode 100644 index 0000000..3907e84 --- /dev/null +++ b/Dangerfile @@ -0,0 +1,9 @@ +# Sometimes it's a README fix, or something like that - which isn't relevant for +# including in a project's CHANGELOG for example +declared_trivial = github.pr_title.include? "#trivial" + +# Make it more obvious that a PR is a work in progress and shouldn't be merged yet +warn("PR is classed as Work in Progress") if github.pr_title.include? "[WIP]" + +# Warn when there is a big PR +warn("Big PR") if git.lines_of_code > 500 diff --git a/Gemfile b/Gemfile new file mode 100644 index 0000000..8340315 --- /dev/null +++ b/Gemfile @@ -0,0 +1,7 @@ +# frozen_string_literal: true + +source "https://rubygems.org" + +git_source(:github) {|repo_name| "https://github.com/#{repo_name}" } + +gem "danger" diff --git a/Gemfile.lock b/Gemfile.lock new file mode 100644 index 0000000..c0cdb37 --- /dev/null +++ b/Gemfile.lock @@ -0,0 +1,56 @@ +GEM + remote: https://rubygems.org/ + specs: + addressable (2.7.0) + public_suffix (>= 2.0.2, < 5.0) + claide (1.0.3) + claide-plugins (0.9.2) + cork + nap + open4 (~> 1.3) + colored2 (3.1.2) + cork (0.3.0) + colored2 (~> 3.1) + danger (6.0.9) + claide (~> 1.0) + claide-plugins (>= 0.9.2) + colored2 (~> 3.1) + cork (~> 0.1) + faraday (~> 0.9) + faraday-http-cache (~> 2.0) + git (~> 1.5) + kramdown (~> 2.0) + kramdown-parser-gfm (~> 1.0) + no_proxy_fix + octokit (~> 4.7) + terminal-table (~> 1) + faraday (0.15.4) + multipart-post (>= 1.2, < 3) + faraday-http-cache (2.0.0) + faraday (~> 0.8) + git (1.5.0) + kramdown (2.1.0) + kramdown-parser-gfm (1.1.0) + kramdown (~> 2.0) + multipart-post (2.1.1) + nap (1.1.0) + no_proxy_fix (0.1.2) + octokit (4.14.0) + sawyer (~> 0.8.0, >= 0.5.3) + open4 (1.3.4) + public_suffix (4.0.1) + sawyer (0.8.2) + addressable (>= 2.3.5) + faraday (> 0.8, < 2.0) + terminal-table (1.8.0) + unicode-display_width (~> 1.1, >= 1.1.1) + unicode-display_width (1.6.0) + +PLATFORMS + ruby + +DEPENDENCIES + danger + +BUNDLED WITH + 2.0.2 From 9f8db35a64ea84b3174746b5903e63345c49d5c3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Go=CC=88drei=20Krisztia=CC=81n?= Date: Thu, 12 Sep 2019 10:54:29 +0200 Subject: [PATCH 2/4] danger file update --- Dangerfile | 7 ------- 1 file changed, 7 deletions(-) diff --git a/Dangerfile b/Dangerfile index 3907e84..77310dc 100644 --- a/Dangerfile +++ b/Dangerfile @@ -1,9 +1,2 @@ -# Sometimes it's a README fix, or something like that - which isn't relevant for -# including in a project's CHANGELOG for example -declared_trivial = github.pr_title.include? "#trivial" - -# Make it more obvious that a PR is a work in progress and shouldn't be merged yet -warn("PR is classed as Work in Progress") if github.pr_title.include? "[WIP]" - # Warn when there is a big PR warn("Big PR") if git.lines_of_code > 500 From ce96e877c28c98831d779b0ebd9d01d36bce5066 Mon Sep 17 00:00:00 2001 From: Laszlo Szucs Date: Mon, 17 Feb 2020 17:06:34 +0100 Subject: [PATCH 3/4] utility rule to test Danger failures --- Dangerfile | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Dangerfile b/Dangerfile index 77310dc..a75d638 100644 --- a/Dangerfile +++ b/Dangerfile @@ -1,2 +1,7 @@ +# Utility check for easy testing +if ENV['FAIL_DANGER'] + fail("Marking as failed: FAIL_DANGER env set") +end + # Warn when there is a big PR -warn("Big PR") if git.lines_of_code > 500 +warn("Big PR") if git.lines_of_code > 500 \ No newline at end of file From 04daefaea2262faa3813008e4a598201143bc0e1 Mon Sep 17 00:00:00 2001 From: Adam Borbas Date: Tue, 1 Sep 2020 09:12:37 +0200 Subject: [PATCH 4/4] Update dependencies (#9) --- Gemfile.lock | 31 ++++++++++++++++++------------- 1 file changed, 18 insertions(+), 13 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index c0cdb37..5d93923 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -11,40 +11,45 @@ GEM colored2 (3.1.2) cork (0.3.0) colored2 (~> 3.1) - danger (6.0.9) + danger (8.0.5) claide (~> 1.0) claide-plugins (>= 0.9.2) colored2 (~> 3.1) cork (~> 0.1) - faraday (~> 0.9) + faraday (>= 0.9.0, < 2.0) faraday-http-cache (~> 2.0) - git (~> 1.5) - kramdown (~> 2.0) + git (~> 1.7) + kramdown (~> 2.3) kramdown-parser-gfm (~> 1.0) no_proxy_fix octokit (~> 4.7) terminal-table (~> 1) - faraday (0.15.4) + faraday (1.0.1) multipart-post (>= 1.2, < 3) - faraday-http-cache (2.0.0) - faraday (~> 0.8) - git (1.5.0) - kramdown (2.1.0) + faraday-http-cache (2.2.0) + faraday (>= 0.8) + git (1.7.0) + rchardet (~> 1.8) + kramdown (2.3.0) + rexml kramdown-parser-gfm (1.1.0) kramdown (~> 2.0) multipart-post (2.1.1) nap (1.1.0) no_proxy_fix (0.1.2) - octokit (4.14.0) + octokit (4.18.0) + faraday (>= 0.9) sawyer (~> 0.8.0, >= 0.5.3) open4 (1.3.4) - public_suffix (4.0.1) + public_suffix (4.0.5) + rchardet (1.8.0) + rexml (3.2.4) sawyer (0.8.2) addressable (>= 2.3.5) faraday (> 0.8, < 2.0) terminal-table (1.8.0) unicode-display_width (~> 1.1, >= 1.1.1) - unicode-display_width (1.6.0) + unicode-display_width (1.7.0) PLATFORMS ruby @@ -53,4 +58,4 @@ DEPENDENCIES danger BUNDLED WITH - 2.0.2 + 2.1.4