I have asked for this feature many times before, and GitHub support has always responded that it is infeasible to implement, but I have new information.
Right now it’s possible to review diffs, but not whole files (or repository trees). The ability to audit a codebase without being constrained by its revision history is crucial for many important workflows.
You can see that many people are interested in this capability here.
There are two reasons I think this feature is implementable:
- ReviewNB provides an existence proof for Jupyter Notebooks, which are surely more difficult than ordinary source files.
- GitHub’s own PR review mechanism allows me to leave comments on lines that weren’t changed, but are included in the diff as context lines. By notionally making the context size of diff hunks infinite, and creating a PR that makes no changes, that provides a reasonable semantics for what it means to leave a comment anywhere in the project.