How general a connection on $TM$ can be used in the Chern-Gauss-Bonnet theorem? Wikipedia only states the theorem for the Levi-Civita connection, but this is probably needlessly restrictive. (If the theorem can be proven for the LC connection of some metric then it holds for the LC connection for any metric, and so we see already that there is some family of connections for which it holds. This is also asserted in Q. Yuan's answer here).
What I understand of Chern-Weil theory suggests that the theorem should hold for any connection whatsoever on $TM$, but perhaps I am missing something. Chern seems to only consider Levi-Civita connections in A Simple Intrinsic Proof of the Gauss-Bonnet Formula for Closed Riemannian Manifolds.