Melissa Donnelly, who has led the Community and Public Sector Union for seven years, will replace ACTU secretary Sally McManus at the end of August.