Skip to content

🐛 add a codeowner expansion limit to prevent api exhaustion#4817

Merged
spencerschrock merged 3 commits intoossf:mainfrom
spencerschrock:codeowners-fix
Nov 10, 2025
Merged

🐛 add a codeowner expansion limit to prevent api exhaustion#4817
spencerschrock merged 3 commits intoossf:mainfrom
spencerschrock:codeowners-fix

Conversation

@spencerschrock
Copy link
Member

What kind of change does this PR introduce?

bug fix

What is the current behavior?

Some repositories have 5,000+ CODEOWNERS, which completely exhaust API quota.
https://github.com/DefinitelyTyped/DefinitelyTyped/blob/95890e39aca378c38427afd218e76cc2bbd3fc31/.github/CODEOWNERS

What is the new behavior (if this is a feature change)?**

100 was arbitrarily chosen as the number of codeowners to parse, as a large but not extreme amount of API quota to try and stay under.

  • Tests for the changes have been added (for bug fixes/features)

Which issue(s) this PR fixes

Fixes #4816

Special notes for your reviewer

Does this PR introduce a user-facing change?

For user-facing changes, please add a concise, human-readable release note to
the release-note

(In particular, describe what changes users might need to make in their
application as a result of this pull request.)

NONE

@spencerschrock spencerschrock requested a review from a team as a code owner October 10, 2025 23:37
@spencerschrock spencerschrock requested review from AdamKorcz and jeffmendoza and removed request for a team October 10, 2025 23:37
@dosubot dosubot bot added the size:S This PR changes 10-29 lines, ignoring generated files. label Oct 10, 2025
@codecov
Copy link

codecov bot commented Oct 10, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 69.60%. Comparing base (353ed60) to head (2ed3804).
⚠️ Report is 278 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4817      +/-   ##
==========================================
+ Coverage   66.80%   69.60%   +2.80%     
==========================================
  Files         230      251      +21     
  Lines       16602    15655     -947     
==========================================
- Hits        11091    10897     -194     
+ Misses       4808     3888     -920     
- Partials      703      870     +167     
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@github-actions
Copy link

This pull request has been marked stale because it has been open for 10 days with no activity

@github-actions github-actions bot added Stale and removed Stale labels Oct 21, 2025
@spencerschrock
Copy link
Member Author

Spencer to look at if a test case makes sense here, and not too artficial.

Some repositories have 5,000+ CODEOWNERS, which completely exhaust API
quota. 100 was arbitrarily chosen, as a large but not extreme amount of
API quota to try and stay under.

https://github.com/DefinitelyTyped/DefinitelyTyped/blob/95890e39aca378c38427afd218e76cc2bbd3fc31/.github/CODEOWNERS

Signed-off-by: Spencer Schrock <sschrock@google.com>
Signed-off-by: Spencer Schrock <sschrock@google.com>
@dosubot dosubot bot added size:L This PR changes 100-499 lines, ignoring generated files. and removed size:S This PR changes 10-29 lines, ignoring generated files. labels Nov 5, 2025
@spencerschrock spencerschrock enabled auto-merge (squash) November 10, 2025 18:33
@spencerschrock spencerschrock merged commit ae20577 into ossf:main Nov 10, 2025
37 checks passed
@spencerschrock spencerschrock deleted the codeowners-fix branch November 10, 2025 18:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:L This PR changes 100-499 lines, ignoring generated files.

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

BUG - Contributors check runs till rate limit is exhausted

2 participants