Revert "Limit usage of GitHub Actions Annotations"
This commit is contained in:
parent
051069c0b3
commit
1c390093f8
@ -65,11 +65,8 @@ module Kernel
|
|||||||
sig { params(message: T.any(String, Exception)).void }
|
sig { params(message: T.any(String, Exception)).void }
|
||||||
def opoo(message)
|
def opoo(message)
|
||||||
Tty.with($stderr) do |stderr|
|
Tty.with($stderr) do |stderr|
|
||||||
if ENV["HOMEBREW_GITHUB_ACTIONS"].present?
|
|
||||||
GitHub::Actions.puts_annotation_if_env_set(:warning, message.to_s)
|
|
||||||
else
|
|
||||||
stderr.puts Formatter.warning(message, label: "Warning")
|
stderr.puts Formatter.warning(message, label: "Warning")
|
||||||
end
|
GitHub::Actions.puts_annotation_if_env_set(:warning, message.to_s)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -82,11 +79,8 @@ module Kernel
|
|||||||
require "utils/github/actions"
|
require "utils/github/actions"
|
||||||
|
|
||||||
Tty.with($stderr) do |stderr|
|
Tty.with($stderr) do |stderr|
|
||||||
if ENV["HOMEBREW_GITHUB_ACTIONS"].present?
|
|
||||||
GitHub::Actions.puts_annotation_if_env_set(:error, message.to_s)
|
|
||||||
else
|
|
||||||
stderr.puts Formatter.error(message, label: "Error")
|
stderr.puts Formatter.error(message, label: "Error")
|
||||||
end
|
GitHub::Actions.puts_annotation_if_env_set(:error, message.to_s)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@ -51,7 +51,7 @@ module GitHub
|
|||||||
return unless env_set?
|
return unless env_set?
|
||||||
|
|
||||||
std = (type == :notice) ? $stdout : $stderr
|
std = (type == :notice) ? $stdout : $stderr
|
||||||
std.puts Annotation.new(type, message, file:, line:)
|
std.puts Annotation.new(type, message)
|
||||||
end
|
end
|
||||||
|
|
||||||
# Helper class for formatting annotations on GitHub Actions.
|
# Helper class for formatting annotations on GitHub Actions.
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user