danger-additional-logging 0.0.17 → 0.0.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 162fb45ba515fdf18d27c7293e1eeeb66f20144026c384ae666c60769617d4d8
|
4
|
+
data.tar.gz: 07ce4010639f915a2b7726caa20beba5c0f59aac9db310a6d3c90f762dce90f4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c627be950937987daabacc7f09ddd0c7e19ee73fb92402f0dec728a7feaa16d279759a67f918acf644d30031b94fb6af0d50228b913977d54e536fd85c9352c9
|
7
|
+
data.tar.gz: 9377b33cd6465dc3ac94c6590a9958b5a3c00b40f50e5b8453646e9b40eab645ec30c52912a6cf9360cd4053100a1cd012af148416f0c5d05c01675810f38a45
|
@@ -249,6 +249,8 @@ module Danger
|
|
249
249
|
puts "post_results"
|
250
250
|
|
251
251
|
violations = violation_report
|
252
|
+
puts "violations: #{violations}"
|
253
|
+
|
252
254
|
report = {
|
253
255
|
warnings: violations[:warnings].uniq,
|
254
256
|
errors: violations[:errors].uniq,
|
@@ -278,7 +280,8 @@ module Danger
|
|
278
280
|
end
|
279
281
|
|
280
282
|
def run(base_branch, head_branch, dangerfile_path, danger_id, new_comment, remove_previous_comments, report_results = true)
|
281
|
-
puts "run(base_branch=#{base_branch}, head_branch=#{head_branch})"
|
283
|
+
puts "run(base_branch=#{base_branch}, head_branch=#{head_branch}, report_results=#{report_results})"
|
284
|
+
|
282
285
|
# Setup internal state
|
283
286
|
init_plugins
|
284
287
|
env.fill_environment_vars
|
@@ -68,6 +68,7 @@ module Danger
|
|
68
68
|
end
|
69
69
|
|
70
70
|
def update_pull_request!(warnings: [], errors: [], messages: [], markdowns: [], danger_id: "danger", new_comment: false, remove_previous_comments: false)
|
71
|
+
puts "update_pull_request(warnings=#{warnings.size}, messages=#{messages.size}, markdowns=#{markdowns}, new_comment=#{new_comment}, remove_previous_comments=#{remove_previous_comments})"
|
71
72
|
delete_old_comments(danger_id: danger_id) if !new_comment || remove_previous_comments
|
72
73
|
|
73
74
|
warnings = update_inline_comments_for_kind!(:warnings, warnings, danger_id: danger_id)
|
@@ -76,6 +77,9 @@ module Danger
|
|
76
77
|
markdowns = update_inline_comments_for_kind!(:markdowns, markdowns, danger_id: danger_id)
|
77
78
|
|
78
79
|
has_comments = (warnings.count.positive? || errors.count.positive? || messages.count.positive? || markdowns.count.positive?)
|
80
|
+
|
81
|
+
puts "has_comments=#{has_comments}"
|
82
|
+
|
79
83
|
if has_comments
|
80
84
|
comment = generate_description(warnings: warnings, errors: errors, template: "bitbucket_server")
|
81
85
|
comment += "\n\n"
|
@@ -86,6 +90,8 @@ module Danger
|
|
86
90
|
previous_violations: {},
|
87
91
|
danger_id: danger_id,
|
88
92
|
template: "bitbucket_server")
|
93
|
+
|
94
|
+
puts "comment=#{comment}"
|
89
95
|
@api.post_comment(comment)
|
90
96
|
end
|
91
97
|
end
|
@@ -94,6 +100,9 @@ module Danger
|
|
94
100
|
danger_id: "danger",
|
95
101
|
new_comment: false,
|
96
102
|
remove_previous_comments: false)
|
103
|
+
|
104
|
+
puts "update_pr_by_line!(new_comment=#{new_comment}, remove_previous_comments=#{remove_previous_comments})"
|
105
|
+
|
97
106
|
if !new_comment || remove_previous_comments
|
98
107
|
puts "delete_old_comments(danger_id=#{danger_id})"
|
99
108
|
delete_old_comments(danger_id: danger_id)
|
data/lib/danger/version.rb
CHANGED