Drop GitHub ReviewRequestedEvents when reviewer has been deleted
Created by: mrnugget
This is another follow-up to #10264 (closed). After fixing one of the symptoms of deleted reviewers in #10267 I decided to follow @ryanslade's suggestion and actually "remove" the events.
Now, actually removing the matching entry from the database is not possible with out current architecture, since it would require us to persist the GitHub-Node-ID of each event and then, on sync, map the now-with-deleted-reviewer event to the one in the database and then not only drop the new event but also delete the one in the DB.
I think we can tackle in the future, when we want to make sure that our "sync" is actually a full sync (i.e. deletes items in the DB that do not exist on the code host anymore).
For now, this lets me sleep better at night.
Merge request reports
Activity
Created by: codecov[bot]
Codecov Report
Merging #10284 into master will increase coverage by
0.00%
. The diff coverage is77.77%
.@@ Coverage Diff @@ ## master #10284 +/- ## ======================================= Coverage 43.97% 43.98% ======================================= Files 1382 1382 Lines 76133 76142 +9 Branches 6845 6899 +54 ======================================= + Hits 33480 33489 +9 Misses 39522 39522 Partials 3131 3131
Flag Coverage Δ #go 46.95% <77.77%> (+<0.01%)
#typescript 34.84% <ø> (ø)
#unit 43.98% <77.77%> (+<0.01%)
Impacted Files Coverage Δ internal/extsvc/github/pulls.go 52.47% <0.00%> (-0.41%)
internal/campaigns/types.go 11.77% <100.00%> (+1.29%)