Exclude golang Vendor folders in Merge Requests
<!--IssueSummary start--> <details> <summary> Everyone can contribute. [Help move this issue forward](https://handbook.gitlab.com/handbook/marketing/developer-relations/contributor-success/community-contributors-workflows/#contributor-links) while earning points, leveling up and collecting rewards. </summary> - [Close this issue](https://contributors.gitlab.com/manage-issue?action=close&projectId=278964&issueIid=17123) </details> <!--IssueSummary end--> ## Description When committing vendor directories in Go projects, Merge Requests can be larger and harder to review as content from the vendor packages is included in the changes of the merge request. ### Additional Details From Go's [FAQ](https://github.com/golang/dep/blob/master/docs/FAQ.md#should-i-commit-my-vendor-directory) on dependencies: > It's up to you: > > **Pros** > > - It's the only way to get truly reproducible builds, as it guards against upstream renames, deletes and commit history overwrites. > - You don't need an extra dep ensure step to sync vendor/ with Gopkg.lock after most operations, such as go get, cloning, getting latest, merging, etc. > > **Cons** > > - Your repo will be bigger, potentially a lot bigger, though prune can help minimize this problem. > - PR diffs will include changes for files under vendor/ when Gopkg.lock is modified, however files in vendor/ are **hidden by default on GitHub.** ## Proposal Files in Go's `vendor folder` don't need to be reviewed as part of the code review workflow. These files should be automatically suppressed in Merge Requests. ## Current Workaround In GitLab 16.10 we introduced [collapse generated files](https://docs.gitlab.com/ee/user/project/merge_requests/changes.html#collapse-generated-files) which automatically collapses generated style files. It's also possible to use this and configure your `.gitattributes` with [custom paths](https://docs.gitlab.com/ee/user/project/merge_requests/changes.html#configure-collapse-behavior-for-a-file-type) that would then follow this behavior.
issue