Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Updates brew audit’s git-based comparisons to use the merge-base between origin/HEAD and HEAD, so audits evaluate changes relative to the branch point rather than the moving tip of origin/HEAD (avoiding false positives from unrelated upstream commits).
Changes:
- Switch
changed_formulae_pathsto diff from a merge-base SHA (with fallback toorigin/HEAD). - Switch
committed_version_infohistory traversal to start from the merge-base SHA. - Add regression specs covering merge-base behavior for both paths and version-history logic.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
Library/Homebrew/formula_auditor.rb |
Introduces git_audit_base_ref and uses it for git diff/history lookups instead of origin/HEAD. |
Library/Homebrew/test/formula_auditor_spec.rb |
Adds/adjusts specs to assert merge-base is used for diffs and history traversal. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- compare `brew audit` changes to the branch point, not contemporary `origin/HEAD` commits - avoid false positives when unrelated dependency bumps land after a branch is cut - cover `changed_formulae_paths` and `committed_version_info` with merge-base regression specs
e44b677 to
33cda80
Compare
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 auditchanges to the branch point, not contemporaryorigin/HEADcommitschanged_formulae_pathsandcommitted_version_infowith merge-base regression specsFixes #21861
brew lgtm(style, typechecking and tests) with your changes locally?Used OpenAI Codex with manual review and feedback.