Skip to content

Conversation

@MikeMcQuaid
Copy link
Member

This will increase the threshold for not complaining about new formulae if it's a self-submission.

This will increase the threshold for not complaining about new
formulae if it's a self-submission.
@MikeMcQuaid MikeMcQuaid marked this pull request as ready for review February 3, 2026 13:11
Copilot AI review requested due to automatic review settings February 3, 2026 13:11
Copy link
Contributor

Copilot AI left a 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 in SharedAudits.
  • 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.

Comment on lines +676 to 678
self_submission = self_submission?(user)
warning = SharedAudits.github(user, repo, self_submission:)
return if warning.nil?
Copy link

Copilot AI Feb 3, 2026

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.

Copilot uses AI. Check for mistakes.
Comment on lines +1084 to 1086
self_submission = self_submission?(user)
error = SharedAudits.github(user, repo, self_submission:)
add_error error, location: url.location if error
Copy link

Copilot AI Feb 3, 2026

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.

Copilot uses AI. Check for mistakes.
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