Skip to content

Commit 75943eb

Browse files
committed
Test: trigger changelog warning
1 parent 01e0ede commit 75943eb

File tree

2 files changed

+12
-6
lines changed

2 files changed

+12
-6
lines changed

Dangerfile

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,28 +31,33 @@ end
3131
end
3232

3333
# Output as GitHub Actions annotations (since we can't post PR comments without token)
34+
# Using print instead of puts to avoid Danger's "You used puts" warning
3435
if ENV['GITHUB_ACTIONS']
3536
violation_report[:errors].each do |v|
3637
if v.file && v.line
37-
$stdout.puts "::error file=#{v.file},line=#{v.line}::#{v.message}"
38+
print "::error file=#{v.file},line=#{v.line}::#{v.message}\n"
3839
else
39-
$stdout.puts "::error::#{v.message}"
40+
print "::error::#{v.message}\n"
4041
end
4142
end
4243

4344
violation_report[:warnings].each do |v|
4445
if v.file && v.line
45-
$stdout.puts "::warning file=#{v.file},line=#{v.line}::#{v.message}"
46+
print "::warning file=#{v.file},line=#{v.line}::#{v.message}\n"
4647
else
47-
$stdout.puts "::warning::#{v.message}"
48+
print "::warning::#{v.message}\n"
4849
end
4950
end
5051

5152
violation_report[:messages].each do |v|
5253
if v.file && v.line
53-
$stdout.puts "::notice file=#{v.file},line=#{v.line}::#{v.message}"
54+
print "::notice file=#{v.file},line=#{v.line}::#{v.message}\n"
5455
else
55-
$stdout.puts "::notice::#{v.message}"
56+
print "::notice::#{v.message}\n"
5657
end
5758
end
59+
60+
# Debug: show counts
61+
total = violation_report[:errors].count + violation_report[:warnings].count + violation_report[:messages].count
62+
print "::notice::Danger completed: #{violation_report[:errors].count} errors, #{violation_report[:warnings].count} warnings, #{violation_report[:messages].count} messages\n"
5863
end

lib/grape/api.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,3 +167,4 @@ def mounted_instances
167167
end
168168
end
169169
end
170+

0 commit comments

Comments
 (0)