Skip to content
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

shared_audits: allow GitHub's IP not permitted error #15909

Merged

Conversation

bayandin
Copy link
Member

@bayandin bayandin commented Aug 25, 2023

  • 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? Here's an example.
  • Have you successfully run brew style with your changes locally?
  • Have you successfully run brew typecheck with your changes locally?
  • Have you successfully run brew tests with your changes locally?

For some formulae during the homepage audit, we're getting an error:

Error: GitHub API Error: Although you appear to have the correct authorization credentials, the `<org-name>` organization has an IP allow list enabled, and your IP address is not permitted to access this resource.

Ref Homebrew/homebrew-core#140255 (comment)

This PR ignores this error in SharedAudits (while getting information about repo via API).

@bayandin bayandin marked this pull request as draft August 25, 2023 12:12
@bayandin bayandin force-pushed the ignore-github-ip-not-permitted-error branch from 2ad6450 to e2e14bb Compare August 25, 2023 13:00
@bayandin bayandin changed the title audit_homepage: allow GitHub's IP not permitted error shared_audits: allow GitHub's IP not permitted error Aug 25, 2023
@bayandin bayandin marked this pull request as ready for review August 25, 2023 13:05
@bayandin
Copy link
Member Author

I'm still not 100% sure I found the right place, which causes the audit failure.

Any ideas on how we can check it with real data?
(I've tried to reproduce the problem on a custom tap with GitHub runners, but it didn't fail: bayandin/homebrew-tap#24)

Copy link
Member

@MikeMcQuaid MikeMcQuaid left a comment

Choose a reason for hiding this comment

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

Looks good! One style tweak, happy to merge after this. If it doesn't work: can iterate after merge.

Library/Homebrew/utils/shared_audits.rb Outdated Show resolved Hide resolved
Library/Homebrew/utils/shared_audits.rb Outdated Show resolved Hide resolved
Co-authored-by: Mike McQuaid <mike@mikemcquaid.com>
@MikeMcQuaid MikeMcQuaid force-pushed the ignore-github-ip-not-permitted-error branch from 504c325 to 89d52f1 Compare August 26, 2023 13:54
@MikeMcQuaid MikeMcQuaid merged commit 37791fe into Homebrew:master Aug 26, 2023
23 of 24 checks passed
@bayandin bayandin deleted the ignore-github-ip-not-permitted-error branch August 26, 2023 15:12
@github-actions github-actions bot added the outdated PR was locked due to age label Sep 26, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 26, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
outdated PR was locked due to age
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants