Giving Advice In Public
I think it is absolutely wrong unless the person agreed to it, but still there may be other parties involved that may be mentioned that may not have consented. If the event is used as a lesson for others then it can be mentioned with made up names and places. Mentioning the person and humiliating in public is against the guidance of Islam. If it is intended as a punishment perhaps it may be valid, but if it is a personal deed for which the person has repented and corrected the wrongdoing, then mentioning in public is absolutely wrong in my opinion.
I think if it was a public sin and after the person has repented with Allah, then the victims and then corrected the wrongdoing as much as possible an then afterwards the person wants to repent in public voluntarily, I think it is the most noble thing and epitome of humility, humbleness and repent.
Sorry for my misunderstanding Brother Haseeb. Quran specifically states to hide one’s personal shortcomings and the sins for which the person has repented. It is not allowed.