Did commander Cody help kill general grievous?

Depends on how you look at it. Obi-Wan was the one who killed Grievous, but Cody and his men kept the droids "distracted" so Obi-Wan could do so