Skip to content

join multiple skip messages and improve output formatting#21707

Closed
rexmhall09 wants to merge 1 commit into
Homebrew:mainfrom
rexmhall09:main
Closed

join multiple skip messages and improve output formatting#21707
rexmhall09 wants to merge 1 commit into
Homebrew:mainfrom
rexmhall09:main

Conversation

@rexmhall09

Copy link
Copy Markdown
Contributor

Join multiple skip messages with ", " instead of displaying only the first
message. This ensures all skip reasons are shown when multiple apply
(e.g. "Not maintained, Archived upstream").

Also update the output formatting for both skipped and non-skipped
statuses to improve consistency.

A test was added to verify that multiple skip messages are joined and
displayed correctly.

  • Have you followed the guidelines in our Contributing document?
  • Have you checked to ensure there aren't other open Pull Requests for the same change?
  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you written new tests for your changes?
  • Have you successfully run brew lgtm with your changes locally?
  • AI was used to assist with generating this PR.

Codex was used to help speed up implementing the change and drafting the
update. The code and tests were manually reviewed and verified locally,
and brew lgtm was run to ensure all checks pass (on my machine).

Join multiple skip messages with ", " and print the combined string instead of only the first message. Update output formatting for both skipped and non-skipped statuses and add a test to verify multiple messages are displayed (e.g. "Not maintained, Archived upstream").
Copilot AI review requested due to automatic review settings March 10, 2026 23:27

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR improves livecheck skip output by displaying all skip reasons when multiple apply, and updates the printing logic/tests to match.

Changes:

  • Join multiple skip messages with ", " in SkipConditions.print_skip_information.
  • Update printed output for statuses that include a messages array (both skipped and non-skipped).
  • Add an RSpec example verifying multiple skip messages are displayed together.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
Library/Homebrew/livecheck/skip_conditions.rb Joins :messages arrays and prints the combined message instead of only the first entry.
Library/Homebrew/test/livecheck/skip_conditions_spec.rb Adds coverage for printing multiple skip messages in one line.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +328 to 333
messages = skip_hash[:messages].join(", ")
if skip_hash[:status] == "skipped"
puts "#{Tty.red}#{name}#{Tty.reset}: skipped - #{skip_hash[:messages][0]}"
puts "#{Tty.red}#{name}#{Tty.reset}: skipped - #{messages}"
else
puts "#{Tty.red}#{name}#{Tty.reset}: #{skip_hash[:messages][0]}"
puts "#{Tty.red}#{name}#{Tty.reset}: #{messages}"
end

Copilot AI Mar 10, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

print_skip_information now joins multiple entries in :messages for both skipped and non-skipped statuses, but the spec only covers the status == "skipped" branch. Please add a test case where status is something else (e.g. "error") with multiple messages to exercise the else branch and prevent regressions.

Copilot uses AI. Check for mistakes.
@rexmhall09 rexmhall09 marked this pull request as draft March 10, 2026 23:38
@rexmhall09 rexmhall09 closed this Mar 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants