The Messenger of Allah ﷺ used to fast until we would say he never breaks his fast, and he would go without fasting until we would say he never fasts. He used to fast all of Shaban, or most of Shaban.
أخبرنا الربيع بن سليمان قال حدثنا ابن وهب قال أخبرني أسامة بن زيد أن محمد بن إبراهيم حدثه عن أبي سلمة بن عبد الرحمن أنه
كان رسول الله ﷺ يصوم حتى نقول لا يفطر ويفطر حتى نقول لا يصوم وكان يصوم شعبان أو عامة شعبان
[Sahih] It is in Kubra, no: 2487, and its chain is hasan. Ibn Khuzayma graded it sahih, no: 2133, from Rabi bin Sulayman, with the same wording. Ahmad narrated it, 6/268, from the hadith of Muhammad bin Ibrahim Taymi with the same wording, and Bukhari narrated it, no: 1969, and Muslim, no: 1156, from the hadith of Abu Salama with the same wording.