Do credit to (someone)

To add to someone’s reputation.

The woman’s graduation thesis did credit to her hard work and patience.