Ability to exclude specific generated files from PR "Files changed" list #186824
Replies: 3 comments
-
|
💬 Your Product Feedback Has Been Submitted 🎉 Thank you for taking the time to share your insights with us! Your feedback is invaluable as we build a better GitHub experience for all our users. Here's what you can expect moving forward ⏩
Where to look to see what's shipping 👀
What you can do in the meantime 💻
As a member of the GitHub community, your participation is essential. While we can't promise that every suggestion will be implemented, we want to emphasize that your feedback is instrumental in guiding our decisions and priorities. Thank you once again for your contribution to making GitHub even better! We're grateful for your ongoing support and collaboration in shaping the future of our platform. ⭐ |
Beta Was this translation helpful? Give feedback.
-
|
I second this. It’s a total nightmare to open a PR and see "thousands of lines changed" only to realize it's just a lockfile update because of a single dependency change. It creates so much unnecessary noise and makes it harder to focus on the actual logic changes that need a human eye. |
Beta Was this translation helpful? Give feedback.
-
|
Dear github, this atrocity needs to change ASAP, please accept this proposal ! |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Select Topic Area
Product Feedback
Body
The Problem
Currently, when we commit generated files (specifically lockfiles like
package-lock.json,yarn.lock, etc.), we can use.gitattributessettings likelinguist-generated=trueorbinary. While this successfully collapses the diff by default in the Pull Request view, the file still remains in the file list, contributes to the "Files Changed" count, and importantly, presents a "Viewed" checkbox that remains unchecked.Context & Pain Point
In a modern development workflow,
package-lock.jsonupdates happen frequently. These files are meant to be machine-readable, not human-reviewable.Even though the diff is collapsed:
Proposed Solution
I propose a new attribute for
.gitattributes(perhaps something likelinguist-hiddenorgithub-pr-hide) that allows a repository maintainer to signal: "This file tracks version history, but should not be presented in the Code Review interface."Example:
.gitattributes:Desired Result:
The file is totally removed from the "Files changed" left-hand navigation and the main diff view (perhaps tucked behind a "Show hidden files" toggle filter at the top of the file list), and removed from the total calculation of files requiring review.
This would allow teams to keep their diffs clean and focus strictly on human-authored code.
Beta Was this translation helpful? Give feedback.
All reactions