Merged
Conversation
61cd2b3 to
483d4d0
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
This PR updates the documentation link-check task to send a custom User-Agent with HTMLProofer requests, aiming to avoid CI failures caused by servers rejecting the default request profile.
Changes:
- Refactors the HTMLProofer invocation to build options in an
argshash first. - Reads
HOMEBREW_USER_AGENTfrom the environment during the docs test task. - Adds Typhoeus request headers so HTMLProofer requests send a
User-Agent.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
d6ab584 to
43aaa84
Compare
Member
Author
|
Ahh yeah, |
43aaa84 to
ca0d51f
Compare
The brew documentation tests use `HTMLProofer` to check for broken links in generated documentation HTML and this is causing all brew PRs to fail CI because one of the linked pages will return a JavaScript challenge page if the request uses a user agent that the server doesn't like (or no user agent at all). The default `HTMLProofer` user agent is "Mozilla/5.0 (compatible; HTML Proofer/5.2.1; +https://github.com/gjtorikian/html-proofer)" and, for whatever reason, the Mozilla user agent triggers the upstream server's scraper safeguards. This updates docs/Rakefile to use a generic `HTMLProofer/5.2.1` user agent for these requests, which addresses this particular failure. I've set this up to conditionally prepend `HOMEBREW_USER_AGENT` if it's available in the environment, though it's not currently present in this context.
ca0d51f to
8b39e4e
Compare
MikeMcQuaid
approved these changes
May 2, 2026
Member
MikeMcQuaid
left a comment
There was a problem hiding this comment.
Thanks! LGTM when 🟢. Merge sooner rather than later to unblock CI 🙇🏻
chenrui333
approved these changes
May 2, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
brew lgtm(style, typechecking and tests) with your changes locally?The brew documentation tests use
HTMLProoferto check for broken links in generated documentation HTML and this is causing all brew PRs to fail CI because one of the linked pages will return a JavaScript challenge page if the request uses a user agent that the server doesn't like (or no user agent at all). The defaultHTMLProoferuser agent is "Mozilla/5.0 (compatible; HTML Proofer/5.2.1; +https://github.com/gjtorikian/html-proofer)" and, for whatever reason, the Mozilla user agent triggers the upstream server's scraper safeguards.This updates docs/Rakefile to use a generic "HTMLProofer/5.2.1" user agent for these requests, which addresses this particular failure. I've set this up to conditionally prepend
HOMEBREW_USER_AGENTif it's available in the environment, though it's not currently present in this context, so I can drop that if it's not wanted/needed.