Merge pull request #18778 from elijaholmos/too-many-prs-saml-patch
fix: `too_many_open_prs()` fails without SSO access
This commit is contained in:
commit
a12a215239
@ -924,6 +924,7 @@ module GitHub
|
|||||||
|
|
||||||
homebrew_prs_count = 0
|
homebrew_prs_count = 0
|
||||||
|
|
||||||
|
begin
|
||||||
API.paginate_graphql(query) do |result|
|
API.paginate_graphql(query) do |result|
|
||||||
data = result.fetch("viewer")
|
data = result.fetch("viewer")
|
||||||
github_user = data.fetch("login")
|
github_user = data.fetch("login")
|
||||||
@ -941,6 +942,10 @@ module GitHub
|
|||||||
|
|
||||||
pull_requests.fetch("pageInfo")
|
pull_requests.fetch("pageInfo")
|
||||||
end
|
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")
|
||||||
|
end
|
||||||
|
|
||||||
false
|
false
|
||||||
end
|
end
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user