Ignore files/folders in pull request changes #30686
Replies: 6 comments 1 reply
-
In our monorepo, we have a /docs folder that contains the generated files needed for our pages deployment. |
Beta Was this translation helpful? Give feedback.
-
Just not rendering the files with |
Beta Was this translation helpful? Give feedback.
-
We do consider this official recommendation Customizing how changed files appear on GitHub to be Broken. We store our |
Beta Was this translation helpful? Give feedback.
-
In addition to what @manoadamro described, it would also be useful if those files/folders hidden from the PR file tree did not count toward the total diff line count. For instance, in the Go ecosystem, it is not uncommon to have dependencies in a Then the actual feature may be comprised of 100 lines of code, but the PR shows something like |
Beta Was this translation helpful? Give feedback.
-
I'd love to see an option added for generated files in the files filter dropdown that shows/hides all generated files marked by the Ideally there should also be a way to default it to unchecked (if it's not going to be the default to begin with). |
Beta Was this translation helpful? Give feedback.
-
i also have jenkinsfile , kubernetes manifest file for different environments in different branched I don't want to merge them |
Beta Was this translation helpful? Give feedback.
-
I'm loving the file tree view in pull requests, it's incredibly useful! I do have one suggestion for a possible improvement.
In our monorepo, we have a
/docs
folder that contains the generated files needed for our pages deployment.When a pull request triggers particular actions, those actions result in extra commits being pushed to the triggering branch. This means that each pull request will contain at least 60+ changed files, almost all of which are auto-generated by an action.
It would be handy to have a sort of
.gitignore
equivalent in the.github
folder (eg:.diff-ignore
or something) to define files or folders (using the same syntax as.gitignore
) that are omitted from the changed files tree, as well as the changed files count. Perhaps there could be a message or note somewhere on the UI to note thatx
files are omitted due to these rules to make that clear.Alternatively, instead of completely omitting them, they could be "switched off" with a checkbox, where toggling the checkbox would toggle visibility of the item in the files tree (and all children down the hierarchy if it is a folder). Perhaps the ignore file could be used to define files or folders that are "switched off" by default in this case.
This would allow trunk-based development heavily automated in monorepos without making pull requests bigger than what is actually intended for review.
Beta Was this translation helpful? Give feedback.
All reactions