move commit filtering outside the component