Sayyiduna Imran bin Husayn (may Allah be pleased with him) narrates that a woman from the tribe of Juhaynah came to the Messenger of Allah (peace and blessings be upon him) while she was pregnant from zina. He (peace and blessings be upon him) ordered her guardians to treat her well and said: "When she gives birth, bring her to me." They did so. He (peace and blessings be upon him) gave the order, and her clothes were tied firmly around her; then the order was given to stone her, and she was stoned. Then he (peace and blessings be upon him) offered her funeral prayer, and Sayyiduna Umar (may Allah be pleased with him) said: O Messenger of Allah, will you offer her funeral prayer when she has committed zina? He (peace and blessings be upon him) said: "She has repented with such a repentance that, if it were distributed among the people of Madinah, it would suffice them. Have you found anything better than this, that she sacrificed her life (in repentance)?"
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الجنائز / 6829