Skip to content

fix: skip reviews from deleted GitHub accounts - #911

Merged
shyim merged 2 commits into
shyim:mainfrom
nfortier-shopware:fix/skip-reviews-from-deleted-users
Oct 13, 2026
Merged

shyim merged 2 commits into
shyim:mainfrom
nfortier-shopware:fix/skip-reviews-from-deleted-users

Conversation

@nfortier-shopware

@nfortier-shopware nfortier-shopware commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #910

The reviews API returns "user": null for a review written by an account that was deleted later. Github::getReviews() mapped every review to $review['user']['login'] through a closure typed to return string, so danger ci died with a TypeError before any rule ran, and kept dying on that pull request because such a review cannot be removed.

Reviews without a user are now skipped when collecting the reviewer logins. A regression test loads a reviews payload that carries one.

The first commit declares the key type of Collection::getIterator(). CI installs PHPStan 2.3.1 (the lock file is not committed), which rejects @return \Generator<T> as not covariant with IteratorAggregate<array-key, T>, so main is red on both the PHPStan job and CheckPhpStanTest without it.

@codecov

codecov Bot commented Oct 13, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.90%. Comparing base (4afecf4) to head (3dd3348).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##               main     #911   +/-   ##
=========================================
  Coverage     98.90%   98.90%           
- Complexity      309      311    +2     
=========================================
  Files            41       41           
  Lines           910      913    +3     
=========================================
+ Hits            900      903    +3     
  Misses           10       10           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@shyim
shyim merged commit 440d24e into shyim:main Oct 13, 2026
9 checks passed
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.

GitHub platform crashes on a review from a deleted user account

2 participants