Question: Who is credited with collecting and codifying the chants of the medieval church?
Answer: Pope Gregory
Natural Questions answer: Pope Gregory I (from the Wikipedia article "Gregorian chant")