Merge pull request #20263 from MTCoster/pr-count-ip-allow-list

Ignore IP allow list errors in `too_many_open_prs`
This commit is contained in:
Mike McQuaid 2025-07-16 14:24:45 +00:00 committed by GitHub
commit 46ba380c0a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -968,8 +968,12 @@ module GitHub
pull_requests.fetch("pageInfo")
end
rescue => e
# Ignore SAML access errors (https://github.com/Homebrew/brew/issues/18610)
raise unless e.message.include?("Resource protected by organization SAML enforcement")
# Ignore SAML access errors (https://github.com/Homebrew/brew/issues/18610) and related
# IP allow list errors (https://github.com/orgs/Homebrew/discussions/6263)
return false if e.message.include?("Resource protected by organization SAML enforcement") ||
e.message.include?("your IP address is not permitted to access this resource")
raise
end
false