Update CommitDiff to collapse generated files
As discussed in, #5570 (comment 1607988606) We want to be able to collapse diffs for generated files.
To do that we need to update CommitDiff
and set collapsed
and add new generated
flag. Use go-enry
if linguist-generated
override is not in use to allow users to make adjustments as they need.
We also need to do some benchmark testing to estimate the performance impact. We may need to fall back to just handling linguist-generated
override if using go-enry
proves to be too expensive.
Probably we also should have a way to turn off this behaviour with feature flag so we would need a flag for that too.
Availability and Testing
Add feature spec where a diff contains a generated file. Ensure generated file is collapsed when FF is on. Exploratory testing of feature.
Edited by Jay McCure