You need very good tests in place to automatically change something or a lot of trust in your dependencies :P.
It's not the case on most of my project, so I never commit directly to the main branch, instead I commit on a temporary branch then open a PR on GitHub so we just review and merge the changes.