The resolve to not sin again stems from the sincere regret that one feels when one sins.
If there is no regret, the person will have no problem going back to the sin.
Hence, regret is the main condition.
In addition to regret, you need to make a firm resolve not to sin again and ask Allaah for forgiveness as doing so is mentioned throughout out the Qur'aan and Sunnah.
When you take everything into context, you realize that you need to have regret, ask forgiveness, and have a firm resolve no to return to the sin.