Don't Dismiss Stale Reviews After Merge Conflict Resolution For Generated Files

You can currently have GitHub dismiss stale approvals when new commits are pushed. If a clean merge occurs, then approvals are kept. If a merge conflict occurs, then the approvals are dismissed.

This is a problem when it comes to generated files. Generated files can have conflicts, but don’t really represent a change that needs to be re-reviewed.

I would like there to be a way to exclude certain files from this auto-dismissal. For example, if a file matches a pattern like *.generated.* then tolerate any changes to this file and do not dismiss reviews. We also have a required CI check that re-generates all generated assets and ensures they are up-to-date and checked in, so someone incorrectly modifying one of these files by hand would fail our CI checks.

An alternative solution would be for Github to support custom merge drivers so that these sorts of merge conflicts can be auto-resolved by github entirely by simply adding a driver that regenerates generated assets.