-
-
Notifications
You must be signed in to change notification settings - Fork 10.9k
Add self-submission audit logic #21512
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
This will increase the threshold for not complaining about new formulae if it's a self-submission.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Adds self-submission awareness to repository notability audits so that new formulae/casks submitted by the upstream repo owner are held to stricter notability thresholds before suppressing “not notable enough” warnings.
Changes:
- Introduce PR-author detection (via
GITHUB_EVENT_PATH) and self-submission helpers/caching inSharedAudits. - Parameterize GitHub/GitLab/Bitbucket/Forgejo notability audits to apply higher thresholds for self-submissions.
- Wire the self-submission flag through formula and cask repository audit paths.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
Library/Homebrew/utils/shared_audits.rb |
Adds PR-author lookup + self-submission detection and applies multiplied notability thresholds when self-submitted. |
Library/Homebrew/formula_auditor.rb |
Passes a computed self_submission flag into SharedAudits repo audits for new formulae. |
Library/Homebrew/cask/audit.rb |
Passes a computed self_submission flag into SharedAudits repo audits for new casks. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| self_submission = self_submission?(user) | ||
| warning = SharedAudits.github(user, repo, self_submission:) | ||
| return if warning.nil? |
Copilot
AI
Feb 3, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The new self-submission path (deriving self_submission and passing it into SharedAudits.github/gitlab/bitbucket/forgejo) changes audit behavior, but there are no specs asserting the stricter notability thresholds and the updated "Self-submitted … not notable enough" messages. Please add test coverage (e.g., stubbing SharedAudits.pull_request_author and the repo metadata methods) to verify both self-submission and non-self-submission outcomes.
| self_submission = self_submission?(user) | ||
| error = SharedAudits.github(user, repo, self_submission:) | ||
| add_error error, location: url.location if error |
Copilot
AI
Feb 3, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change introduces self-submission-aware repo notability auditing for new casks, but there doesn’t appear to be spec coverage exercising the new self_submission? logic or verifying the stricter thresholds/messages when the PR author matches the repo owner. Please add/extend cask/audit_spec.rb coverage with stubs for the relevant SharedAudits.*_repo_data calls (and SharedAudits.pull_request_author) to lock down the behavior.
This will increase the threshold for not complaining about new formulae if it's a self-submission.